/* ============================================================
   smgr · css/pages/viz_influencia_x.css — DISEÑO DE LA TARJETA capturable de
   "Influencia sobre el marcador · formato X" (visualizacion_influencia_x.php).
   Portado 1:1 del clásico, con TODO scopeado bajo #captureArea. Sin
   `body{background}` ni reset global (los aporta viz.css). Tarjeta compacta
   1200px con aspect-ratio 16/9, sin columna DIF.
   ============================================================ */

#captureArea {
  font-family: 'Inter', sans-serif;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 1200px;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
}
#captureArea * { box-sizing: border-box; }

/* ---------- Cabecera de la tarjeta ---------- */
#captureArea .header {
  background: linear-gradient(135deg, #2c5282 0%, #2a4365 100%);
  color: #fff;
  padding: 8px 15px;
  text-align: center;
  position: relative;
  flex-shrink: 0;
}
#captureArea .header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><rect width="100" height="100" fill="%23000" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}
#captureArea .logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
#captureArea .logo {
  width: 60px;
  height: 45px;
  background: #fff;
  border-radius: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.3);
  overflow: hidden;
  flex-shrink: 0;
}
#captureArea .logo img { width: 100%; height: 100%; object-fit: contain; }
#captureArea .header h1 { font-size: 18px; font-weight: 800; margin: 0; position: relative; z-index: 1; }
#captureArea .header p { font-size: 11px; opacity: 0.9; margin-top: 2px; position: relative; z-index: 1; }

/* ---------- Info de criterios ---------- */
#captureArea .criteria-info {
  background: #f8f9fa;
  padding: 3px 15px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 10px;
  color: #6b7280;
  text-align: center;
  flex-shrink: 0;
}

/* ---------- Tabla ---------- */
#captureArea .content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#captureArea .table-header {
  background: #2d3748;
  color: #fff;
  padding: 4px 10px;
  display: grid;
  grid-template-columns: 55px 160px 55px 55px 55px 8px 160px 55px 55px 55px;
  gap: 4px;
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  flex-shrink: 0;
}
#captureArea .table-header > div:nth-child(2),
#captureArea .table-header > div:nth-child(7) { text-align: center; }

#captureArea .col-separator { background: #4a5568; }
#captureArea .header-separator { width: 100%; }

#captureArea .team-row {
  display: grid;
  grid-template-columns: 55px 160px 55px 55px 55px 8px 160px 55px 55px 55px;
  gap: 4px;
  padding: 2px 10px;
  border-bottom: 1px solid #edf2f7;
  align-items: center;
  font-size: 11px;
  text-align: center;
}
#captureArea .team-row > div:nth-child(2),
#captureArea .team-row > div:nth-child(7) { text-align: left; }
#captureArea .team-row:nth-child(even) { background: #f9fafb; }
#captureArea .team-row .col-separator { background: #e2e8f0; height: 100%; }

#captureArea .team-info {
  display: flex;
  align-items: center;
  justify-content: center;
}
#captureArea .team-shield-header {
  width: 20px;
  height: 24px;
  border-radius: 3px;
}

#captureArea .player-info {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}
#captureArea .player-photo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}
#captureArea .player-name {
  font-weight: 600;
  color: #2d3748;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
}
#captureArea .best-player .player-name { color: #059669; }
#captureArea .worst-player .player-name { color: #dc2626; }

#captureArea .stat-value { font-weight: 600; font-size: 10px; }
#captureArea .stat-value.positive { color: #059669; }
#captureArea .stat-value.negative { color: #dc2626; }
#captureArea .stat-value.neutral { color: #6b7280; }

#captureArea .minutes { font-size: 10px; color: #6b7280; }

#captureArea .section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 0;
}
#captureArea .section-label.best { color: #059669; }
#captureArea .section-label.worst { color: #dc2626; }

#captureArea .empty-state {
  padding: 30px 15px;
  text-align: center;
  color: #718096;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Pie de la tarjeta ---------- */
#captureArea .footer {
  background: #2d3748;
  color: #fff;
  padding: 5px 20px;
  text-align: center;
  font-size: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
#captureArea .footer .social-links { display: flex; gap: 15px; }
#captureArea .footer .social-links span { opacity: 0.8; font-size: 10px; }
