/* ============================================================
   smgr · css/pages/viz_balance_tiros_libres.css — DISEÑO DE LA TARJETA
   capturable de "Balance de tiros libres" (visualizacion_balance_tiros_libres.php).
   Portado 1:1 del clásico, con TODO scopeado bajo #captureArea. Sin
   `body{background}` ni reset global (los aporta viz.css). Ancho fijo 1024px.
   ============================================================ */

#captureArea {
  font-family: 'Inter', sans-serif;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 1024px;
}
#captureArea * { box-sizing: border-box; }

/* ---------- Cabecera de la tarjeta ---------- */
#captureArea .header {
  background: linear-gradient(135deg, #2c5282 0%, #2a4365 100%);
  color: #fff;
  padding: 10px;
  text-align: center;
  position: relative;
}
#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: 15px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
#captureArea .logo {
  width: 91px;
  height: 69px;
  background: #fff;
  border-radius: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.3);
  overflow: hidden;
}
#captureArea .logo img { width: 100%; height: 100%; object-fit: contain; }
#captureArea .header h1 { font-size: 28px; font-weight: 800; margin: 0; position: relative; z-index: 1; }
#captureArea .header p { font-size: 14px; opacity: 0.9; margin-top: 5px; position: relative; z-index: 1; }

/* ---------- Tabla ---------- */
#captureArea .content { padding: 0; }
#captureArea .table-header {
  background: #2d3748;
  color: #fff;
  padding: 8px;
  display: grid;
  grid-template-columns: 140px 110px 110px 100px 20px 90px 90px 20px 100px 100px;
  gap: 8px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}
#captureArea .table-header > div:nth-child(1) { text-align: left; padding-left: 15px; }
#captureArea .table-header > div:nth-child(5),
#captureArea .table-header > div:nth-child(8) { background: none; }

#captureArea .table-row {
  display: grid;
  grid-template-columns: 140px 110px 110px 100px 20px 90px 90px 20px 100px 100px;
  gap: 8px;
  padding: 6px 8px;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  border-left: 4px solid transparent;
}
#captureArea .table-row:nth-child(even) { background: #f8fafc; }
#captureArea .table-row > div:nth-child(1) { text-align: left; padding-left: 15px; font-weight: 700; }
#captureArea .table-row > div:not(:nth-child(1)) { text-align: center; }
#captureArea .table-row > div:nth-child(5),
#captureArea .table-row > div:nth-child(8) { background: none; }

#captureArea .team-info { display: flex; align-items: center; gap: 8px; }
#captureArea .team-shield {
  width: 25px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid #e2e8f0;
}
#captureArea .team-name { font-weight: 700; font-size: 14px; color: #2d3748; }

#captureArea .avg-row {
  background: #f1f5f9 !important;
  border-top: 2px solid #2d3748;
  font-weight: 700;
}

/* ---------- Sombreado top-3 / bottom-3 ---------- */
#captureArea .top-3 {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #059669;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-block;
  min-width: fit-content;
}
#captureArea .bottom-3 {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #dc2626;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-block;
  min-width: fit-content;
}

/* ---------- Pie de la tarjeta ---------- */
#captureArea .footer {
  background: #2d3748;
  color: #fff;
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
}
#captureArea .social-links { margin-top: 5px; font-size: 12px; opacity: 0.9; }
