/* ============================================================
   css/resultados.css — Resultados con bolillas (resultados.php, 26-10-2026).
   Estilo del inicio: verde #0d5c35, tarjetas blancas con borde #d7e8df, Figtree, botones de 44 px o más.
   Los tamaños de letra van con var(--lg): el botón "Letra grande" los agranda un 20 %.
   ============================================================ */
@font-face { font-family: 'Figtree'; src: url('fuentes/figtree.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
.rs { font-family: 'Figtree', var(--fuente); color: #10241a; display: flex; flex-direction: column; gap: 14px; }
.rs .fj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Chips de fecha y de sorteo */
.rs-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0; }
.rs-chips::-webkit-scrollbar { display: none; }
.rs-chip { position: relative; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 2px solid #cfe0d6; background: #fff; color: #10241a; font-weight: 800; font-size: calc(15px * var(--lg, 1));
  white-space: nowrap; text-decoration: none; }
.rs-chip:hover { border-color: #0d5c35; }
.rs-chip.sel { background: #0d5c35; border-color: #0d5c35; color: #fff; }
.rs-chip.sin:not(.sel) { color: #4b6357; border-style: dashed; }
.rs-chip:focus-visible, .rs-btn:focus-visible, .rs-gano-btn:focus-visible, .rs-vacio-btn:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.rs-cal { width: 52px; padding: 0; cursor: pointer; }
.rs-cal svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; pointer-events: none; }
.rs-cal input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; margin: 0; font-size: 16px; }
.rs-cal:focus-within { outline: 3px solid #2563eb; outline-offset: 2px; }

.rs-titulo { margin: 4px 0 0; font-size: calc(24px * var(--lg, 1)); font-weight: 900; line-height: 1.15; }
.rs-titulo span { font-weight: 700; color: #4b6357; font-size: calc(17px * var(--lg, 1)); }

/* Cartel: ganó */
.rs-gano { background: #0d5c35; color: #fff; border-radius: 20px; padding: 18px; display: flex; gap: 14px; align-items: flex-start; animation: rsAparece .5s .2s ease both; }
.rs-gano-bola { flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; background: #fbbf24; color: #3b2a00; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); font-variant-numeric: tabular-nums; }
.rs-gano-bola.chica { font-size: 14px; }
.rs-gano-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rs-gano-txt strong { font-size: calc(22px * var(--lg, 1)); font-weight: 900; color: #fcd34d; line-height: 1.15; }
.rs-gano-txt span { font-size: calc(16px * var(--lg, 1)); line-height: 1.4; }
.rs-gano-txt ul { margin: 2px 0; padding-left: 18px; font-size: calc(16px * var(--lg, 1)); line-height: 1.4; }
.rs-gano-txt b { color: #fff; }
.rs-gano-btn { margin-top: 6px; align-self: flex-start; display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0;
  background: #fbbf24; color: #10241a; font: 900 calc(17px * var(--lg, 1)) 'Figtree', var(--fuente); text-decoration: none; cursor: pointer; }
.rs-gano-btn:hover { background: #fcd34d; color: #10241a; }

/* Cartel: jugó y no salió */
.rs-nosalio { background: #fff; border: 1px solid #d7e8df; border-radius: 16px; padding: 14px 16px; font-size: calc(16px * var(--lg, 1)); line-height: 1.45; color: #4b6357; }
.rs-nosalio b { color: #10241a; }
.rs-nosalio-t { display: block; font-size: calc(19px * var(--lg, 1)); color: #10241a; font-weight: 900; margin-bottom: 2px; }

/* Tarjeta de cada lotería */
.rs-card { background: #fff; border: 1px solid #d7e8df; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.rs-card-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rs-card-cab h2 { margin: 0; font-size: calc(21px * var(--lg, 1)); font-weight: 900; line-height: 1.2; }
.rs-card-sub { display: block; font-size: calc(15px * var(--lg, 1)); color: #4b6357; font-weight: 700; }
.rs-card-sub b { color: #0d5c35; font-size: calc(19px * var(--lg, 1)); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.rs-card-btns { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.rs-btn { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 2px solid #cfe0d6; background: #fff; color: #0d5c35;
  font: 800 calc(15px * var(--lg, 1)) 'Figtree', var(--fuente); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rs-btn:hover { border-color: #0d5c35; }
.rs-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rs-card:not(.abierta) .rs-solo-abierta { display: none; }
.rs-card.abierta .rs-solo-cerrada { display: none; }
.rs-ocultar { align-self: center; min-height: 44px; padding: 0 16px; border: 0; background: transparent; color: #0d5c35; font: 800 calc(15px * var(--lg, 1)) 'Figtree', var(--fuente); text-decoration: underline; cursor: pointer; }
.rs-ocultar:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.rs-card-falta { flex-direction: row; justify-content: space-between; align-items: center; color: #4b6357; font-size: calc(15px * var(--lg, 1)); background: #f7faf8; }
.rs-card-falta h2 { margin: 0; font-size: calc(18px * var(--lg, 1)); font-weight: 900; color: #10241a; }

/* Las 20 bolillas, de a 4 */
.rs-grilla { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
.rs-grilla[hidden] { display: none; }
.rs-celda { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.rs-pos { font-size: calc(13px * var(--lg, 1)); font-weight: 800; color: #4b6357; margin-bottom: 4px; }
.rs-bol { position: relative; width: 64px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; background: #fff; border: 2px solid #d7e8df;
  box-shadow: inset 0 -6px 0 rgba(13,92,53,.07), 0 2px 6px rgba(16,36,26,.12); display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: calc(18px * var(--lg, 1)); color: #10241a; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.rs-bol.cab { background: #0d5c35; border-color: #0d5c35; color: #fff; }
.rs-bol.mio { background: #fbbf24; border-color: #b45309; color: #3b2a00; box-shadow: 0 0 0 5px rgba(251,191,36,.35), 0 4px 10px rgba(180,83,9,.35); }
.rs-bol.cab.mio { border-color: #b45309; }
.rs-ley { margin: 0; font-size: calc(14px * var(--lg, 1)); color: #4b6357; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rs-ley i { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.rs-ley i.cab { background: #0d5c35; }
.rs-ley i.mio { background: #fbbf24; margin-left: 8px; }

/* Salen una por una (~1,8 s): sólo la primera vez que se ven o con "Ver salir" (js/resultados.js pone .animar) */
.rs-grilla.animar .rs-bol { animation: rsPop .45s cubic-bezier(.2,1.6,.4,1) both; animation-delay: calc(var(--i) * 85ms); }
.rs-grilla.animar .rs-bol.mio { animation: rsPop .45s cubic-bezier(.2,1.6,.4,1) both, rsBrillo 1.4s ease-in-out 3; animation-delay: calc(var(--i) * 85ms), calc(var(--i) * 85ms + .5s); }
@keyframes rsPop { from { opacity: 0; transform: scale(.3) translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes rsBrillo { 0%, 100% { box-shadow: 0 0 0 5px rgba(251,191,36,.35); } 50% { box-shadow: 0 0 0 12px rgba(251,191,36,.15); } }
@keyframes rsAparece { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Todavía no salió / no hay sorteo */
.rs-vacio { background: #fff; border: 1px solid #d7e8df; border-radius: 20px; padding: 22px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rs-vacio > svg { width: 44px; height: 44px; fill: none; stroke: #0d5c35; stroke-width: 1.8; }
.rs-vacio h2 { margin: 0; font-size: calc(23px * var(--lg, 1)); font-weight: 900; line-height: 1.2; text-wrap: balance; }
.rs-vacio p { margin: 0; font-size: calc(16px * var(--lg, 1)); color: #4b6357; line-height: 1.45; }
.rs-espera { background: #0d5c35; border-color: #0d5c35; color: #fff; }
.rs-espera h2 { color: #fff; }
.rs-espera p { color: #d1fae5; }
.rs-espera-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 12px; font-size: calc(14px * var(--lg, 1)); font-weight: 800; }
.rs-espera-pill i { width: 9px; height: 9px; border-radius: 50%; background: #fbbf24; animation: rsLatido 1.8s ease-out infinite; }
@keyframes rsLatido { 0% { box-shadow: 0 0 0 0 rgba(251,191,36,.7); } 70% { box-shadow: 0 0 0 9px rgba(251,191,36,0); } 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); } }
.rs-cd { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rs-cd > div { background: rgba(255,255,255,.12); border-radius: 16px; padding: 10px 0; }
.rs-cd b { display: block; font-size: calc(32px * var(--lg, 1)); font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rs-cd span { font-size: calc(13px * var(--lg, 1)); opacity: .9; }
.rs-cd-ya { font-weight: 800; color: #fcd34d !important; }
.rs-espera-mio { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; }
.rs-vacio-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px; background: #0d5c35; color: #fff;
  font-weight: 900; font-size: calc(17px * var(--lg, 1)); text-decoration: none; }
.rs-vacio-btn:hover { background: #0a4628; color: #fff; }
.rs-vacio-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.rs-envivo { background: #fff; color: #b91c1c; }
.rs-envivo:hover { background: #fef2f2; color: #991b1b; }

/* Los números del mes */
.rs-numeros { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.rs-numeros h2 { margin: 0; font-size: calc(21px * var(--lg, 1)); font-weight: 900; }
.rs-numeros-sub { margin: -6px 0 0; font-size: calc(14px * var(--lg, 1)); color: #4b6357; }
.rs-numeros-cab { margin: 0; font-size: calc(15px * var(--lg, 1)); color: #4b6357; }
.rs-numeros-cab b { color: #0d5c35; }
.rs-numeros-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #9a3412; font-weight: 900; font-size: calc(16px * var(--lg, 1)); text-decoration: none; }
.rs-numeros-link:hover { text-decoration: underline; }

.rs-pie { text-align: center; padding: 22px 0 8px; border-top: 1px solid #d7e8df; margin-top: 10px; }
.rs-pie p { margin: 0 0 12px; color: #4b6357; font-size: calc(16px * var(--lg, 1)); }
.rs-pie .btn { max-width: 300px; margin: 0 auto; }

@media (max-width: 359px) { .rs-bol { font-size: calc(16px * var(--lg, 1)); } .rs-card { padding: 14px 12px; } }
@media (prefers-reduced-motion: reduce) {
  .rs-grilla.animar .rs-bol, .rs-gano, .rs-espera-pill i { animation: none !important; }
}
