/* en-vivo.css - Partidos en vivo (/en-vivo y bloque del inicio). Usa las variables de tema-verde.css.
   Lo pinta js/en-vivo.js con la API publica de ESPN. */

.ev-vivo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tt-bad); margin-right: 6px; box-shadow: 0 0 0 0 rgba(240,100,90,.6); animation: ev-pulso 1.6s infinite; vertical-align: middle; }
@keyframes ev-pulso { 0% { box-shadow: 0 0 0 0 rgba(240,100,90,.6); } 70% { box-shadow: 0 0 0 8px rgba(240,100,90,0); } 100% { box-shadow: 0 0 0 0 rgba(240,100,90,0); } }
.ev-tag-vivo { color: var(--tt-bad); font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- tira de partidos (A) */
.ev-tira { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.ev-chip { flex: 0 0 auto; min-width: 150px; background: var(--tt-surface); border: 1px solid var(--tt-border); border-radius: 12px; padding: 10px 12px; color: var(--tt-text); cursor: pointer; text-align: left; }
.ev-chip.sel { border-color: var(--tt-green); background: var(--tt-green-soft); }
.ev-chip .fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .9rem; }
.ev-chip .fila img { width: 26px; height: 21px; object-fit: contain; }
.ev-chip .fila .eq { display: flex; align-items: center; gap: 6px; }
.ev-chip .fila.pierde { color: var(--tt-muted); font-weight: 500; }
.ev-chip .est { font-size: .72rem; color: var(--tt-muted); margin-top: 6px; display: flex; justify-content: space-between; }
.ev-pos { color: #c98a4b; font-size: .78rem; }

/* ---------- marcador grande (A) */
.ev-marcador { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.ev-equipo { display: flex; align-items: center; gap: 16px; }
.ev-equipo.local { justify-content: flex-end; text-align: right; }
.ev-equipo .nom { font-weight: 700; font-size: 1.05rem; }
.ev-equipo .rec { font-size: .78rem; color: var(--tt-muted); }
.ev-equipo .pts { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ev-equipo .pts.pierde { color: var(--tt-muted); }
.ev-to { display: flex; gap: 4px; margin-top: 6px; }
.ev-equipo.local .ev-to { justify-content: flex-end; }
.ev-to i { width: 14px; height: 4px; border-radius: 2px; background: var(--tt-dif); }
.ev-to i.usado { background: var(--tt-border); }
.ev-centro { text-align: center; min-width: 120px; }
.ev-centro .reloj { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-centro .cuarto { color: var(--tt-muted); font-size: .85rem; }
.ev-balon { color: #c98a4b; font-size: 1.1rem; }

.ev-situacion { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.ev-down { background: var(--tt-surface-2); border: 1px solid var(--tt-border); border-radius: 999px; padding: 6px 16px; font-weight: 700; }
.ev-zonaroja { background: rgba(240,100,90,.15); color: var(--tt-bad); border: 1px solid rgba(240,100,90,.35); border-radius: 999px; padding: 4px 12px; font-size: .8rem; font-weight: 700; }

/* ---------- campo */
.ev-campo { margin-top: 18px; }
.ev-campo svg { width: 100%; height: auto; display: block; border-radius: 10px; }
.ev-serie { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: .82rem; color: var(--tt-muted); margin-top: 10px; }
.ev-serie b { color: var(--tt-text); }

/* ---------- pestañas (celular) */
.ev-tabs { display: flex; gap: 6px; background: var(--tt-surface); border: 1px solid var(--tt-border); border-radius: 12px; padding: 4px; }
.ev-tabs button { flex: 1; background: none; border: 0; color: var(--tt-muted); padding: 8px; border-radius: 9px; font-weight: 600; font-size: .9rem; }
.ev-tabs button.on { background: var(--tt-green-soft); color: var(--tt-green); }
@media (max-width: 991px) { .ev-oculto { display: none; } }
@media (min-width: 992px) { .ev-tabs { display: none; } }

/* ---------- jugada por jugada */
.ev-drive { border: 1px solid var(--tt-border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.ev-drive > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--tt-surface-2); }
.ev-drive > summary::-webkit-details-marker { display: none; }
.ev-drive > summary img { width: 30px; height: 24px; object-fit: contain; }
.ev-drive > summary .res { font-weight: 700; }
.ev-drive > summary .res.td { color: var(--tt-green); }
.ev-drive > summary .res.fg { color: var(--tt-dif); }
.ev-drive > summary .res.mal { color: var(--tt-bad); }
.ev-drive > summary .dat { margin-left: auto; color: var(--tt-muted); font-size: .78rem; text-align: right; }
.ev-jugada { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--tt-border); font-size: .88rem; align-items: start; }
.ev-jugada .dd { color: var(--tt-muted); font-size: .76rem; line-height: 1.3; }
.ev-jugada .dd b { color: var(--tt-text); display: block; font-size: .8rem; }
.ev-jugada .yds { font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-jugada .yds.mas { color: var(--tt-green); }
.ev-jugada .yds.menos { color: var(--tt-bad); }
.ev-jugada.anota { background: var(--tt-green-soft); }
.ev-anota { color: var(--tt-green); font-weight: 800; font-size: .74rem; letter-spacing: .05em; }
.ev-jugada.ultima { box-shadow: inset 3px 0 0 var(--tt-green); }

/* ---------- pronostico en vivo */
.ev-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ev-va { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.ev-va.bien { background: rgba(34,197,94,.12); color: var(--tt-green); border: 1px solid rgba(34,197,94,.3); }
.ev-va.mal { background: rgba(240,100,90,.12); color: var(--tt-bad); border: 1px solid rgba(240,100,90,.3); }
.ev-va small { display: block; font-weight: 400; color: var(--tt-muted); }
.ev-pbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.ev-pbar span:nth-child(1) { background: var(--tt-local); }
.ev-pbar span:nth-child(2) { background: var(--tt-dif); }
.ev-pbar span:nth-child(3) { background: var(--tt-visita); }
.ev-pley { display: flex; justify-content: space-between; font-size: .76rem; color: var(--tt-muted); }
.ev-wp svg { width: 100%; height: auto; display: block; }
.ev-lider { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--tt-border); font-size: .88rem; }
.ev-lider:first-of-type { border-top: 0; }
.ev-lider img { width: 30px; height: 24px; object-fit: contain; }
.ev-lider .cat { color: var(--tt-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.ev-lider .num { font-weight: 700; text-align: right; font-size: .85rem; }
.ev-fuente { font-size: .74rem; color: var(--tt-muted); margin-top: 12px; }

@media (max-width: 575px) {
  .tt-card { padding: 16px; }
  .ev-equipo { flex-direction: column-reverse; gap: 6px; text-align: center !important; }
  .ev-equipo.local { flex-direction: column; }
  .ev-equipo .tt-casco { width: 64px; height: 50px; }
  .ev-equipo .nom { font-size: .9rem; }
  .ev-equipo .rec { display: none; }
  .ev-equipo.local .ev-to, .ev-to { justify-content: center; }
  .ev-centro { min-width: 84px; }
  .ev-centro .reloj { font-size: 1.25rem; }
  .ev-jugada { grid-template-columns: 70px 1fr auto; padding: 9px 10px; font-size: .84rem; }
}


@media (max-width: 575px) { .ev-ley { display: none; } .ev-serie { gap: 10px; } }

a.ev-chip { text-decoration: none; display: block; }
a.ev-chip:hover { border-color: var(--tt-green); color: var(--tt-text); }
.ev-chip .fila img.flip { transform: none; }

/* ---------- bloque del inicio (solo con partidos en vivo) */
#ev-home .ev-vivo-dot { margin-right: 8px; }
.ev-home-card { display: block; color: var(--tt-text); text-decoration: none; transition: border-color .15s; }
.ev-home-card:hover { border-color: var(--tt-green); color: var(--tt-text); }
.ev-ultima { margin-top: 12px; font-size: .88rem; color: var(--tt-muted); text-align: center; }
.ev-ultima i { color: var(--tt-green); margin-right: 4px; }
.ev-wp svg { width: 100%; height: auto; display: block; }
.ev-mas { display: block; width: 100%; background: var(--tt-surface-2); border: 1px dashed var(--tt-border); color: var(--tt-green); border-radius: 12px; padding: 10px; font-weight: 600; font-size: .88rem; }
.ev-mas:hover { border-color: var(--tt-green); }
.tt-hero-img[hidden] { display: none !important; }
.ev-ley i { display: inline-block; width: 16px; height: 4px; border-radius: 2px; vertical-align: middle; margin: 0 5px 0 8px; }
.ev-ley-golpeo { background: #4cb4f0; }
.ev-ley-primera { background: #f5d33d; }

/* ---------- duelo de unidades (ataque vs defensa) */
.ev-duelo-t { display: flex; justify-content: space-between; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tt-green); margin: 12px 0 4px; font-weight: 600; }
.ev-duelo-f { display: grid; grid-template-columns: 74px 1fr 22px 1fr; gap: 4px 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--tt-border); font-size: .84rem; }
.ev-duelo-f .cat { color: var(--tt-muted); font-size: .78rem; }
.ev-duelo-f .vs { color: var(--tt-muted); font-size: .72rem; text-align: center; }
.ev-duelo-f > :nth-child(4) { text-align: right; }
.ev-duelo-f .ev-ven { grid-column: 2 / 5; font-size: .74rem; font-weight: 700; color: var(--tt-muted); text-align: center; }
.ev-ven.ata { color: var(--tt-green); }
.ev-ven.def { color: var(--tt-visita); }
.ev-rk { display: inline-block; min-width: 32px; padding: 1px 6px; border-radius: 6px; font-size: .74rem; text-align: center; background: var(--tt-surface-2); border: 1px solid var(--tt-border); color: var(--tt-text); }
.ev-rk.alto { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.35); color: var(--tt-green); }
.ev-rk.bajo { background: rgba(240,100,90,.12); border-color: rgba(240,100,90,.3); color: var(--tt-bad); }
.ev-panel[hidden] { display: none !important; }

/* Duelo de QB y numeros del partido */
.ev-qb-cab { display: grid; grid-template-columns: 1fr 26px 1fr; align-items: center; gap: 6px; margin-bottom: 4px; }
.ev-qb-cab > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.ev-qb-cab > div.der { align-items: flex-end; text-align: right; }
.ev-qb-cab img { width: 46px; height: 40px; object-fit: contain; }
.ev-qb-cab.mini img { width: 32px; height: 28px; }
.ev-qb-cab b { color: var(--tt-strong, #fff); font-size: .92rem; line-height: 1.15; }
.ev-qb-cab small { color: var(--tt-muted); font-size: .72rem; }
.ev-qb-cab .vs { color: var(--tt-muted); font-size: .72rem; text-align: center; }
.ev-qb-sec { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tt-green); margin: 12px 0 2px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ev-qb-f { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2px 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--tt-border); font-size: .9rem; font-weight: 700; color: var(--tt-strong, #fff); }
.ev-qb-f > :last-child, .ev-qb-f > :nth-child(3) { text-align: right; }
.ev-qb-f .cat { color: var(--tt-muted); font-size: .76rem; font-weight: 400; text-align: center; }
.ev-qb-f .mejor { color: var(--tt-green); }
.ev-st-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--tt-border); overflow: hidden; }
.ev-st-bar i { display: block; height: 100%; background: var(--tt-green); }
.ev-qb-h2h { font-size: .86rem; padding-top: 4px; }
.ev-qb-h2h b { color: var(--tt-strong, #fff); }
.ev-qb-h2h .ult { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ev-qb-h2h .ult span { font-size: .74rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--tt-border); color: var(--tt-muted); }
.ev-qb-h2h .ult span.g { border-color: var(--tt-green); color: var(--tt-green); }
.ev-qb-h2h .ult span.p { border-color: #f0645a; color: #f0645a; }

/* Secciones: en vivo / temporada e historial / jugada por jugada (contraida) */
.ev-sec { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--tt-border); color: var(--tt-strong, #fff); font-weight: 700; font-size: .95rem; letter-spacing: .02em; }
.ev-sec[hidden] { display: none; }
.row + .ev-sec { margin-top: 10px; }
.ev-jug-caja > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-weight: 700; color: var(--tt-strong, #fff); }
.ev-jug-caja > summary::-webkit-details-marker { display: none; }
.ev-jug-caja > summary small { color: var(--tt-muted); font-weight: 400; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-jug-caja > summary .fa-chevron-down { color: var(--tt-green); transition: transform .2s; }
.ev-jug-caja[open] > summary .fa-chevron-down { transform: rotate(180deg); }
#ev-campo { cursor: pointer; }
/* Parley VIP del partido (ficha izquierda) */
.ev-vip-est { font-size: .78rem; font-weight: 700; color: var(--tt-muted); margin-bottom: 6px; }
.ev-vip-est { font-size: 1rem; }
.ev-vip-est.bien { color: var(--tt-green); }
.ev-vip-est.gris { color: var(--tt-muted); }
.ev-vip-patas { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ev-vip-patas li { display: grid; grid-template-columns: 16px 1fr; gap: 6px; font-size: .76rem; line-height: 1.25; color: var(--tt-text, inherit); }
.ev-vip-patas li i { margin-top: 2px; color: var(--tt-muted); }
.ev-vip-patas li small { display: block; color: var(--tt-muted); font-size: .7rem; }
.ev-vip-patas li.si i, .ev-vip-patas li.va i { color: var(--tt-green); }
.ev-vip-patas li.si span { font-weight: 600; }
/* no se cumplio: gris opaco con su tache; lesionado o no jugo: tachada (no cuenta, como en las casas) */
.ev-vip-patas li.no { opacity: .45; }
.ev-vip-patas li.no i { color: var(--tt-muted); }
.ev-vip-patas li.lesion span, .ev-vip-patas li.anulada span { text-decoration: line-through; opacity: .6; }
.ev-vip-patas li.lesion i { color: var(--tt-gold, #d4a017); }
.ev-vip-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .8rem; font-weight: 700; color: var(--tt-gold-ink, #b7791f); }
