/* ============================================================
   smgr · css/pages/viz_tecnicas.css — DISEÑO de las SEIS tarjetas capturables
   de "Técnicas sancionadas" (visualizacion_tecnicas.php). Portado 1:1 del clásico.

   MULTI-CAPTURA: hay seis targets (capTecEquipo, capTecJugadores, capTecImpacto,
   capTecEquipoImp, capTecChart, capTecDetalle), no #captureArea, así que el reset
   scopeado de viz.css no los cubre → aquí se replica ese reset bajo la clase
   .viz-card (común a las seis). Todo el diseño va scopeado bajo .viz-card; sólo
   los helpers de maquetación fuera de las tarjetas (.viz-capbar / .viz-scroll /
   .tec-controls / .tec-empty) van sin scope. Ancho fijo 850px; en móvil se hace
   scroll horizontal.
   ============================================================ */

/* ---------- Maquetación fuera de las tarjetas (chrome Foco) ---------- */
.viz-capbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: var(--sp-4); }
.viz-capbar__title { font-size: 15px; font-weight: 700; color: var(--ink); }
.viz-scroll { margin-top: var(--sp-2); overflow-x: auto; }

.tec-empty {
  margin-top: var(--sp-4);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card, 12px);
}

.tec-controls {
  display: flex; align-items: center; gap: 15px; flex-wrap: wrap;
  margin-top: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card, 12px);
  padding: 14px 20px;
}
.tec-controls .control-group { display: flex; align-items: center; gap: 8px; }
.tec-controls label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.tec-controls select {
  font: inherit; font-size: 14px;
  padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--r-input); outline: none;
  background: var(--bg); color: var(--ink);
}
.tec-controls__note { font-size: 12px; color: var(--muted); }

/* ---------- Reset scopeado (equivalente al de viz.css para #captureArea) ---------- */
.viz-card, .viz-card * { margin: 0; padding: 0; box-sizing: border-box; }
.viz-card { line-height: normal; color: #2d3748; }
.viz-card img { display: inline; max-width: none; vertical-align: baseline; }

/* ---------- Tarjeta ---------- */
.viz-card {
  font-family: 'Inter', sans-serif;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 850px;
}
.viz-card.chart-light { background: #f8f9fa; }

.viz-card .header {
  background: linear-gradient(135deg, #2c5282 0%, #2a4365 100%);
  color: white; padding: 10px 20px; text-align: center;
}
.viz-card .logo-section { display: flex; align-items: center; justify-content: center; gap: 15px; }
.viz-card .logo {
  width: 70px; height: 53px; background: white; border-radius: 15%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.3); overflow: hidden;
}
.viz-card .logo img { width: 100%; height: 100%; object-fit: contain; }
.viz-card .header h1 { font-size: 22px; font-weight: 800; }
.viz-card .header p { font-size: 12px; opacity: 0.9; margin-top: 3px; }

/* ---------- Tablas ---------- */
.viz-card table { width: 100%; border-collapse: collapse; font-size: 11px; table-layout: fixed; }
.viz-card thead th {
  background: #2d3748; color: white; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px;
  padding: 6px 4px; text-align: center; font-size: 10px; white-space: nowrap;
}
.viz-card thead th.col-pos { width: 35px; }
.viz-card thead th.col-team { width: 100px; text-align: left; padding-left: 8px; }
.viz-card tbody td {
  padding: 3px 4px; text-align: center;
  border-bottom: 1px solid #e2e8f0; font-weight: 600; font-size: 13px;
}
.viz-card tbody tr:nth-child(even) td { background-color: rgba(0,0,0,0.02); }
.viz-card td.pos { font-weight: 800; font-size: 13px; color: #2d3748; }
.viz-card td.team-cell { text-align: left; white-space: nowrap; padding-left: 8px; }
.viz-card .team-info { display: flex; align-items: center; gap: 6px; }
.viz-card .team-shield { width: 22px; height: 26px; border-radius: 3px; border: 1px solid #e2e8f0; }
.viz-card .team-abbr { font-weight: 700; font-size: 12px; color: #2d3748; }
.viz-card .block-border-left { border-left: 1px dotted #2d3748 !important; }

.viz-card .totals-row td {
  background: #2d3748 !important; color: white; font-weight: 800;
  font-size: 13px; border-bottom: none; padding: 6px 4px;
}
.viz-card .totals-row td.team-cell { text-align: left; padding-left: 8px; }

.viz-card .player-name-cell { text-align: left; padding-left: 8px; }
.viz-card .player-info { display: flex; align-items: center; gap: 8px; }
.viz-card .player-photo { width: 28px; height: 32px; border-radius: 50%; border: 1px solid #e2e8f0; }
.viz-card .player-name { font-weight: 600; font-size: 13px; color: #2d3748; }
.viz-card .detail-x { color: #718096; font-weight: 400; font-size: 10px; }

.viz-card .footer {
  background: #2d3748; color: white; padding: 8px 20px;
  text-align: center; font-size: 12px;
  display: flex; justify-content: center; gap: 20px;
}
.viz-card .footer span { opacity: 0.8; }

/* ---------- Tarjeta de impacto medio ---------- */
.viz-card .impact-grid { padding: 15px 25px 10px; }
.viz-card .impact-label-row { display: grid; grid-template-columns: 1fr 120px 120px 100px; gap: 8px; margin-bottom: 8px; }
.viz-card .impact-col-header {
  text-align: center; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px; padding: 6px 8px; border-radius: 6px;
}
.viz-card .pre-header { background: #fed7d7; color: #9b2c2c; }
.viz-card .post-header { background: #c6f6d5; color: #276749; }
.viz-card .swing-header { background: #bee3f8; color: #2a4365; }
.viz-card .impact-row { display: grid; grid-template-columns: 1fr 120px 120px 100px; gap: 8px; margin-bottom: 6px; align-items: center; }
.viz-card .impact-metric-label { font-size: 13px; font-weight: 700; color: #2d3748; padding-left: 4px; }
.viz-card .impact-value { text-align: center; font-size: 20px; font-weight: 800; padding: 8px; border-radius: 8px; }
.viz-card .impact-value.negative { color: #c53030; background: #fff5f5; }
.viz-card .impact-value.positive { color: #276749; background: #f0fff4; }
.viz-card .impact-value.swing { font-size: 18px; }
.viz-card .impact-note {
  font-size: 10px; color: #718096; text-align: center;
  padding: 8px 0 0; border-top: 1px solid #e2e8f0; margin-top: 8px;
}

/* ---------- Tabla de impacto por equipo ---------- */
.viz-card .team-impact-table { font-size: 11px; }
.viz-card .team-impact-table thead th { font-size: 9px; padding: 5px 3px; }
.viz-card .team-impact-table tbody td { font-size: 12px; padding: 4px 3px; font-weight: 700; }
.viz-card .team-impact-table .col-pos { width: 28px; }
.viz-card .team-impact-table .col-team { width: 80px; text-align: left; padding-left: 8px; }
.viz-card .team-impact-table .col-tec { width: 35px; }
.viz-card .team-impact-table .col-iv { width: 62px; }
.viz-card .team-impact-table .group-header {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.3px; padding: 4px 3px;
}
.viz-card .team-impact-table .group-header.pre-bg { background: #feb2b2; color: #742a2a; }
.viz-card .team-impact-table .group-header.post-bg { background: #9ae6b4; color: #22543d; }
.viz-card .team-impact-table .group-header.cambio-bg { background: #90cdf4; color: #2a4365; }

.viz-card .val-pos { color: #276749; background: #f0fff4; font-weight: 800; }
.viz-card .val-neg { color: #c53030; background: #fff5f5; font-weight: 800; }
.viz-card .val-zero { color: #718096; font-weight: 600; }

/* ---------- Gráfico acumulado ---------- */
.viz-card .chart-toggles { display: flex; justify-content: center; gap: 8px; padding: 10px 20px 0; }
.viz-card .toggle-btn {
  border-radius: 16px; padding: 4px 14px; font-size: 11px; font-weight: 700;
  font-family: 'Inter', sans-serif; cursor: pointer;
}

/* ---------- Tabla de detalle ---------- */
.viz-card .detail-table { font-size: 11px; }
.viz-card .detail-table thead th { font-size: 9px; padding: 5px 3px; }
.viz-card .detail-table tbody td { font-size: 11px; padding: 3px 3px; }
.viz-card .detail-table .col-num { width: 28px; }
.viz-card .detail-table .col-eq { width: 70px; }
.viz-card .detail-table .col-player { width: auto; text-align: left; padding-left: 6px; }
.viz-card .detail-table .col-jor { width: 38px; }
.viz-card .detail-table .col-min { width: 65px; }
.viz-card .detail-table .col-score { width: 58px; }
.viz-card .detail-table .col-val { width: 52px; }
.viz-card .detail-table .player-photo { width: 22px; height: 26px; border-radius: 3px; object-fit: cover; }
.viz-card .score-cell { font-size: 11px; font-weight: 700; color: #2d3748; white-space: nowrap; }
.viz-card .minute-cell { font-size: 10px; color: #4a5568; white-space: nowrap; }
