/* ══════════════════════════════════════════════════════════════════════════════
   GACETAS HÍPICAS — Estilos del módulo
   Depende de las variables CSS definidas en styles.css
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Contenedor de página ─────────────────────────────────────────────────── */

.gaceta-section {
  padding: 1.5rem 0 2rem;
  min-height: calc(100vh - var(--app-header-total, 56px) - 68px);
}

.gaceta-container {
  max-width: 640px;
}

/* ── Ícono de cabecera ────────────────────────────────────────────────────── */

.gac-header-icon {
  background: rgba(190, 210, 234, 0.1);
  border: 1px solid rgba(190, 210, 234, 0.3);
  color: var(--srh-gold);
}

/* ── Selector de fecha ────────────────────────────────────────────────────── */

.gac-date-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gac-date-row .filter-date {
  flex: 1;
  max-width: 210px;
}

/* ── Título de sección ────────────────────────────────────────────────────── */

.gac-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--srh-gold);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1.4rem 0 0.8rem;
}

.gac-section-title::before,
.gac-section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, transparent, var(--srh-border), transparent);
}

/* ── Pestañas internas ────────────────────────────────────────────────────── */

.gac-tab-nav {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--srh-border);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(10px);
}

.gac-tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, var(--srh-gold), var(--srh-gold-2, #b7c9df));
  border-radius: var(--radius-pill);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(190, 210, 234, 0.25);
  pointer-events: none;
}

.gac-tab {
  position: relative;
  flex: 1;
  padding: 0.38rem 0;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: color 0.18s;
  letter-spacing: 0.02em;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.gac-tab.active {
  color: #050816;
}

/* ── Cuadrícula de hipódromos ─────────────────────────────────────────────── */

.gac-track-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 0.5rem;
}

@media (max-width: 380px) {
  .gac-track-grid { grid-template-columns: 1fr; }
}

/* ── Tarjeta de hipódromo ─────────────────────────────────────────────────── */

.gac-track-card {
  position: relative;
  background: var(--srh-card);
  border: 1px solid var(--srh-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gac-track-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--srh-border);
  transition: background 0.22s;
}

.gac-track-card:hover,
.gac-track-card:active {
  border-color: rgba(190, 210, 234, 0.4);
  box-shadow: 0 0 28px rgba(190, 210, 234, 0.08);
  transform: translateY(-2px);
}

.gac-track-card:hover::before,
.gac-track-card:active::before {
  background: var(--srh-gold);
}

.gac-track-logo-wrap {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.gac-track-logo {
  max-height: 40px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(190, 210, 234, 0.15));
}

.gac-track-abbr {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--srh-gold);
  line-height: 1;
}

.gac-track-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 7px;
  width: 100%;
}

.gac-track-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.gac-track-badge {
  display: inline-block;
  background: rgba(190, 210, 234, 0.1);
  border: 1px solid rgba(190, 210, 234, 0.2);
  color: var(--srh-gold);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 800;
}

.gac-track-badge--gaceta {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* ── Estado de hipódromo en selector ─────────────────────────────────────── */

.gac-track-status {
  display: inline-block;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 6px;
  border: 1px solid;
}

.gac-track-status--cerrada {
  color: #90a4ae;
  background: rgba(120, 144, 156, 0.1);
  border-color: rgba(120, 144, 156, 0.28);
}

/* Cancelada va en VIOLETA, no en rojo: el rojo pasó a significar "en salida"
   —urgencia con la venta todavía abierta— y el gris, cerrada. Una carrera
   anulada no es ninguna de las dos cosas, así que se le da familia propia. */
.gac-track-status--cancelada {
  color: #D8B4FE;
  background: rgba(147, 51, 234, 0.08);
  border-color: rgba(147, 51, 234, 0.28);
}

/* Cards con todas las carreras bloqueadas */
.gac-track-card--cerrada,
.gac-track-card--cancelada {
  opacity: 0.6;
}

.gac-track-card--cerrada:hover,
.gac-track-card--cerrada:active,
.gac-track-card--cancelada:hover,
.gac-track-card--cancelada:active {
  border-color: rgba(120, 144, 156, 0.35);
  box-shadow: none;
  transform: none;
}

.gac-track-card--cerrada:hover::before,
.gac-track-card--cerrada:active::before {
  background: #546e7a;
}

.gac-track-card--cancelada:hover::before,
.gac-track-card--cancelada:active::before {
  background: #7E22CE;
}

/* ── Breadcrumb (topbar) ──────────────────────────────────────────────────── */

.gac-topbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.gac-topbar__row1 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gac-btn-back {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: var(--text-main);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.gac-btn-back:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
}

.gac-abr-pill {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(190, 210, 234, 0.08);
  border: 1px solid rgba(190, 210, 234, 0.25);
  color: var(--srh-gold);
  border-radius: 10px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.gac-fecha-pill {
  flex: 1;
  text-align: right;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--srh-border);
  color: var(--text-muted);
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 0.73rem;
  font-weight: 600;
}

.gac-topbar__actions {
  align-self: center;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
}

.gac-pdf-link,
.gac-live-link {
  flex: 1 1 0;
  justify-content: center;
  max-width: 210px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  transition: opacity 0.18s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.gac-pdf-link {
  background: #e8722a;
  border: 1.5px solid #e8722a;
}

.gac-live-link {
  background: #dc2626;
  border: 1.5px solid #dc2626;
  animation: srh-live-button-pulse 1.6s ease-in-out infinite;
}

.gac-pdf-link:hover,
.gac-live-link:hover {
  opacity: 0.82;
}

@media (max-width: 380px) {
  .gac-topbar__actions { gap: 0.45rem; }
  .gac-pdf-link,
  .gac-live-link {
    padding-inline: 8px;
    font-size: 0.7rem;
  }
}

/* ── Chips de carrera ─────────────────────────────────────────────────────── */

.gac-race-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 3px 2px 10px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gac-race-scroll::-webkit-scrollbar { display: none; }

.gac-race-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding: 7px 9px;
  background: var(--srh-card);
  border: 1px solid var(--srh-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.gac-race-chip__label {
  font-size: 0.6rem;
  font-weight: 700;
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  color: var(--text-muted);
}

.gac-race-chip__num {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1;
}

.gac-race-chip__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--srh-border);
  margin-top: 4px;
  transition: background 0.2s;
}

.gac-race-chip:hover {
  border-color: rgba(190, 210, 234, 0.3);
}

.gac-race-chip.active {
  background: linear-gradient(135deg, var(--srh-gold), var(--srh-gold-2, #b7c9df));
  border-color: var(--srh-gold);
  box-shadow: 0 0 18px rgba(190, 210, 234, 0.22);
  transform: scale(1.05);
}

.gac-race-chip.active .gac-race-chip__label,
.gac-race-chip.active .gac-race-chip__num {
  color: #050816;
}

.gac-race-chip.active .gac-race-chip__dot {
  background: rgba(5, 8, 22, 0.5);
}

.gac-race-chip--sin-gaceta {
  opacity: 0.4;
}

/* ── Banner de carrera ────────────────────────────────────────────────────── */

.gac-race-banner {
  background: var(--srh-card);
  border: 1px solid var(--srh-border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gac-race-banner__num {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--srh-gold);
  margin-bottom: 2px;
}

.gac-race-banner__desc {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.gac-race-banner__condlabel {
  display: block;
  font-size: 0.67rem;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gac-race-banner__cond {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #34d399;
  text-align: right;
}

/* ── Exóticas disponibles ─────────────────────────────────────────────────── */

.gac-exoticas-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: -0.4rem;
  margin-bottom: 1rem;
}

.gac-exotica-pill {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(0, 75, 135, 0.14);
  border: 1px solid rgba(100, 181, 246, 0.28);
  color: #64b5f6;
}

/* ── Toggle modo visual ───────────────────────────────────────────────────── */

.gac-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.gac-mode-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.gac-mode-toggle {
  display: flex;
  gap: 3px;
  background: var(--srh-card);
  border: 1px solid var(--srh-border);
  border-radius: 10px;
  padding: 3px;
}

.gac-mode-btn {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  color: var(--text-muted);
  background: none;
  border: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.gac-mode-btn.active {
  background: var(--blue-ve);
  color: #fff;
}

/* ── Tarjeta de caballo ───────────────────────────────────────────────────── */

.gac-horse-card {
  position: relative;
  background: var(--srh-card);
  border: 1px solid var(--srh-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: border-color 0.22s, box-shadow 0.22s;
}

.gac-horse-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--srh-border);
  transition: background 0.22s;
}

.gac-horse-card.gac--linea {
  border-color: rgba(190, 210, 234, 0.35);
  box-shadow: 0 0 22px rgba(190, 210, 234, 0.07);
}
.gac-horse-card.gac--linea::before   { background: var(--srh-gold); }

.gac-horse-card.gac--segunda {
  border-color: rgba(0, 75, 135, 0.45);
}
.gac-horse-card.gac--segunda::before { background: var(--blue-ve); }

.gac-horse-card.gac--descarte {
  opacity: 0.42;
}
.gac-horse-card.gac--descarte::before { background: var(--red-ve); }

/* ── Encabezado de la tarjeta ─────────────────────────────────────────────── */

.gac-horse-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
}

.gac-horse-left {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  flex: 1;
  min-width: 0;
}

/* Mantilla (saddle) */
.gac-saddle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: 900;
}

.gac-saddle__pp {
  font-size: 0.58rem;
  font-weight: 600;
  opacity: 0.7;
  line-height: 1;
  margin-top: 2px;
}

/* Info caballo */
.gac-horse-info {
  flex: 1;
  min-width: 0;
}

.gac-horse-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.gac-horse-name {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gac-ml-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--srh-surface);
  border: 1px solid var(--srh-border);
  font-family: 'Courier New', Courier, monospace;
}

.gac-ml-badge--fav   { color: #34d399; border-color: rgba(16, 185, 129, 0.28); }
.gac-ml-badge--mid   { color: var(--srh-gold); border-color: rgba(190, 210, 234, 0.28); }
.gac-ml-badge--amber { color: var(--srh-gold-ink, #435a74); border-color: rgba(190, 210, 234, 0.28); }
.gac-ml-badge--long  { color: var(--text-muted); }

.gac-horse-details {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.gac-horse-details b {
  color: var(--text-main);
  font-weight: 600;
}

/* Stats rápidos (columna derecha) */
.gac-horse-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 1px;
}

.gac-horse-ganancias {
  font-size: 0.7rem;
  font-weight: 700;
  color: #34d399;
  font-family: 'Courier New', Courier, monospace;
}

.gac-horse-record {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Courier New', Courier, monospace;
}

.gac-top-rat-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 5px;
  text-align: right;
}

.gac-top-rat-val {
  font-size: 0.95rem;
  font-weight: 900;
  font-family: 'Courier New', Courier, monospace;
  text-align: right;
}

.gac-top-rat-val--high   { color: var(--srh-gold); }
.gac-top-rat-val--normal { color: var(--text-main); }

/* ── Modo Estadísticas ────────────────────────────────────────────────────── */

.gac-horse-stats {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.gac-stats-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.gac-stats-label-row span:last-child {
  font-weight: 600;
  color: #34d399;
}

.gac-rating-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.gac-rating-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(to right, var(--srh-gold-2, #b7c9df), var(--srh-gold));
  transition: width 0.9s ease-out;
}

.gac-pos-dots {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.gac-pos-sep { color: rgba(165, 177, 216, 0.28); font-size: 0.65rem; }
.gac-pos--1st { color: #34d399; font-weight: 900; }
.gac-pos--2nd { color: var(--srh-gold); font-weight: 700; }
.gac-pos--3rd { color: var(--srh-gold-ink, #435a74); font-weight: 700; }

/* ── Modo Retrospecto ─────────────────────────────────────────────────────── */

.gac-retro-wrap {
  margin-top: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* El tamano y el peso van mas altos de lo que pediria una tabla de datos: en
   Courier New, a 0.67rem y peso normal, el trazo es tan fino que el texto se
   percibe mas claro de lo que es —el color ya es el mismo --text-muted que la
   descripcion del ejemplar, en Poppins, que si se lee comoda—. */
.gac-retro-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  font-family: 'Courier New', Courier, monospace;
  table-layout: auto;
}

.gac-retro-table th {
  color: var(--srh-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 5px;
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
}

.gac-retro-table td {
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(247, 247, 255, 0.7);
  font-weight: 700;
  white-space: nowrap;
}

.gac-retro-table tr:last-child td { border-bottom: none; }

/* Jerarquía interna de la tabla. Estos tonos iban como opacity en línea desde
   gacetas.js: sobre fondo oscuro funcionaban, pero la opacidad apaga igual en
   los dos temas y sobre fondo claro dejaba ilegible un texto ya de por sí
   pequeño y monoespaciado. Con clases, cada tema elige su propio tono. */
.gac-retro__l   { display: block; }
.gac-retro__sub { display: block; color: var(--text-main); }
.gac-retro__aux { color: var(--text-main); }
.gac-retro__win { display: block; color: var(--yellow-ve); font-weight: 700; }

.gac-retro--pos-1 { color: #34d399 !important; font-weight: 900; }
.gac-retro--pos-2 { color: var(--srh-gold) !important; font-weight: 700; }
.gac-retro--pos-3 { color: var(--text-main) !important; font-weight: 700; }
.gac-retro--rat-hi { color: var(--srh-gold) !important; }
.gac-retro--rat-md { color: #34d399 !important; }

/* ── Botonera de selección ────────────────────────────────────────────────── */

.gac-choice-btns {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--srh-border);
}

.gac-choice-btn {
  flex: 1;
  padding: 0.48rem 0;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  transition: all 0.18s;
  -webkit-tap-highlight-color: transparent;
  color: inherit;
}

.gac-choice-btn:disabled {
  cursor: not-allowed;
  opacity: 0.32;
  filter: grayscale(0.7);
}

.gac-choice-btn--linea {
  background: rgba(190, 210, 234, 0.07);
  border-color: rgba(190, 210, 234, 0.18);
  color: var(--srh-gold);
}
.gac-choice-btn--linea.selected {
  background: rgba(190, 210, 234, 0.22);
  border-color: rgba(190, 210, 234, 0.55);
}

.gac-choice-btn--segunda {
  background: rgba(0, 75, 135, 0.09);
  border-color: rgba(0, 75, 135, 0.22);
  color: #64b5f6;
}
.gac-choice-btn--segunda.selected {
  background: rgba(0, 75, 135, 0.28);
  border-color: rgba(0, 75, 135, 0.55);
}

.gac-choice-btn--descarte {
  background: rgba(229, 57, 53, 0.07);
  border-color: rgba(229, 57, 53, 0.18);
  color: #ef9a9a;
}
.gac-choice-btn--descarte.selected {
  background: rgba(229, 57, 53, 0.2);
  border-color: rgba(229, 57, 53, 0.5);
}

/* ── Simulador de cuadrito ────────────────────────────────────────────────── */

.gac-sim-card {
  background: var(--srh-card);
  border: 1px solid var(--srh-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  margin-bottom: 1.25rem;
}

.gac-sim-card__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--srh-gold);
  margin: 0 0 0.35rem;
}

.gac-sim-card__desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.55;
}

.gac-sim-stats {
  border-top: 1px dashed var(--srh-border);
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gac-sim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.77rem;
  color: var(--text-muted);
}

.gac-sim-row--total {
  border-top: 1px solid var(--srh-border);
  padding-top: 0.55rem;
  margin-top: 0.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
}

.gac-sim-val         { font-weight: 700; color: var(--text-main); }
.gac-sim-val--gold   { color: var(--srh-gold); }
.gac-sim-val--costo  { color: #34d399; font-weight: 700; font-size: 1rem; }

/* ── Cuadrito: lista de selecciones ──────────────────────────────────────── */

.gac-cuadrito-item {
  background: var(--srh-card);
  border-left: 3px solid #34d399;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-top: 1px solid var(--srh-border);
  border-right: 1px solid var(--srh-border);
  border-bottom: 1px solid var(--srh-border);
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.6rem;
}

.gac-cuadrito-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.gac-cuadrito-item__track {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--srh-gold);
}

.gac-cuadrito-item__carrera {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.gac-cuadrito-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.gac-cuadrito-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.67rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
}

.gac-cuadrito-chip--linea {
  background: rgba(190, 210, 234, 0.1);
  color: var(--srh-gold);
  border: 1px solid rgba(190, 210, 234, 0.22);
}

.gac-cuadrito-chip--segunda {
  background: rgba(0, 75, 135, 0.13);
  color: #64b5f6;
  border: 1px solid rgba(0, 75, 135, 0.28);
}

.gac-cuadrito-chip--descarte {
  background: rgba(229, 57, 53, 0.08);
  color: #ef9a9a;
  border: 1px solid rgba(229, 57, 53, 0.2);
}

/* ── Carrera cerrada: chip ────────────────────────────────────────────────── */

.gac-race-chip--closed {
  opacity: 0.42;
  filter: grayscale(0.6);
}

.gac-race-chip--closed .gac-race-chip__num {
  color: var(--text-muted);
}

.gac-race-chip--closed.active {
  background: linear-gradient(135deg, #37474f, #546e7a);
  border-color: #546e7a;
  box-shadow: 0 0 14px rgba(84, 110, 122, 0.25);
  opacity: 1;
  filter: none;
}

.gac-race-chip--closed.active .gac-race-chip__label,
.gac-race-chip--closed.active .gac-race-chip__num {
  color: #fff;
}

.gac-chip-lock {
  color: currentColor;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── Carrera cancelada: chip ─────────────────────────────────────────────── */

.gac-race-chip--cancelada {
  opacity: 0.38;
  filter: grayscale(0.8);
  text-decoration: line-through;
}

.gac-race-chip--cancelada .gac-race-chip__num {
  color: #C084FC;
}

.gac-race-chip--cancelada.active {
  background: linear-gradient(135deg, #4C1D95, #6B21A8);
  border-color: #7E22CE;
  box-shadow: 0 0 14px rgba(147, 51, 234, 0.3);
  opacity: 1;
  filter: none;
  text-decoration: none;
}

.gac-race-chip--cancelada.active .gac-race-chip__label,
.gac-race-chip--cancelada.active .gac-race-chip__num {
  color: #fff;
  text-decoration: none;
}

/* ── Carrera cerrada: banner ──────────────────────────────────────────────── */

.gac-race-banner__numrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gac-race-banner--closed {
  border-color: rgba(120, 144, 156, 0.4);
  background: rgba(120, 144, 156, 0.04);
}

.gac-race-banner--cancelada {
  border-color: rgba(147, 51, 234, 0.38);
  background: rgba(147, 51, 234, 0.04);
}

.gac-banner-closed-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b0bec5;
  background: rgba(120, 144, 156, 0.12);
  border: 1px solid rgba(120, 144, 156, 0.32);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.gac-banner-closed-pill--cancelada {
  color: #D8B4FE;
  background: rgba(147, 51, 234, 0.12);
  border-color: rgba(147, 51, 234, 0.34);
}

/* ── Carrera cerrada / cancelada: tarjeta caballo ───────────────────────── */

.gac-horse-card--closed {
  opacity: 0.72;
}

.gac-horse-card--closed .gac-horse-name {
  color: var(--text-muted);
}

.gac-horse-card--cancelada {
  opacity: 0.55;
  filter: grayscale(0.5);
}

.gac-horse-card--cancelada .gac-horse-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ── Botones bloqueados ────────────────────────────────────────────────────── */

.gac-choice-locked {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 0.85rem;
  padding: 0.52rem 0.75rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(120, 144, 156, 0.05);
  border: 1px dashed rgba(120, 144, 156, 0.22);
  font-style: italic;
}

.gac-choice-locked--cancelada {
  background: rgba(147, 51, 234, 0.06);
  border-color: rgba(147, 51, 234, 0.24);
  color: #D8B4FE;
}

/* ── Simulador: base editable ────────────────────────────────────────────── */

.gac-sim-base-label {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.gac-base-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.gac-base-input {
  width: 44px;
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(165, 177, 216, 0.35);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  padding: 0 2px 1px;
  outline: none;
  -moz-appearance: textfield;
  transition: border-color 0.18s;
}
.gac-base-input::-webkit-outer-spin-button,
.gac-base-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gac-base-input:focus { border-bottom-color: var(--srh-gold); }

/* ── Cuadrito: header con botón limpiar todo ────────────────────────────── */

.gac-cuadrito-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.4rem 0 0.8rem;
}

.gac-cuadrito-header .gac-section-title {
  flex: 1;
  margin: 0;
}

.gac-btn-clear-all {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ef9a9a;
  background: rgba(229, 57, 53, 0.07);
  border: 1px solid rgba(229, 57, 53, 0.22);
  border-radius: 6px;
  padding: 3px 9px;
  cursor: pointer;
  transition: background 0.18s;
}
.gac-btn-clear-all:hover {
  background: rgba(229, 57, 53, 0.18);
}

/* ── Cuadrito: botón × por carrera ──────────────────────────────────────── */

.gac-cuadrito-item__clear {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 2px 4px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.18s, color 0.18s;
  border-radius: 4px;
}
.gac-cuadrito-item__clear:hover {
  opacity: 1;
  color: #ef9a9a;
}

.gac-cuadrito-chip__num {
  opacity: 0.5;
  font-size: 0.65em;
}

/* ── Analíticas ───────────────────────────────────────────────────────────── */

.gac-stat-block {
  background: var(--srh-card);
  border: 1px solid var(--srh-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}

.gac-stat-block__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--srh-gold);
  margin: 0 0 1rem;
}

.gac-stat-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gac-stat-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gac-stat-row__label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  gap: 0.5rem;
}

.gac-stat-row__name {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.gac-stat-row__val {
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.gac-stat-row__mts {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.67rem;
}

.gac-stat-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.gac-stat-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.75s ease-out;
}

/* ── Estado vacío ─────────────────────────────────────────────────────────── */

.gac-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: var(--text-muted);
  text-align: center;
}

.gac-empty svg { opacity: 0.22; }

.gac-empty p {
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.55;
}

.gac-empty--sm {
  padding: 1.5rem 1rem;
  font-size: 0.77rem;
}

.gac-empty--sm p { font-size: 0.77rem; }

/* ── Chispas de selección ─────────────────────────────────────────────────── */

.gac-sparkle {
  position: fixed;
  pointer-events: none;
  background: var(--srh-gold);
  border-radius: 50%;
  z-index: 9999;
  animation: gac-sparkle-anim 0.65s ease-out forwards;
}

@keyframes gac-sparkle-anim {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.1); opacity: 0; }
}

@keyframes gac-spin { to { transform: rotate(360deg); } }

/* ── Nudge de redirección a módulos de apuesta ── */
.gac-nudge {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 950;
  background: rgba(18, 22, 48, 0.97);
  border: 1px solid rgba(190, 210, 234, 0.4);
  border-radius: 14px;
  padding: 12px 14px 10px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  transform: translateY(calc(100% + 80px));
  opacity: 0;
  transition: transform 0.32s cubic-bezier(.22,.68,0,1.2), opacity 0.25s ease;
}

.gac-nudge--visible {
  transform: translateY(0);
  opacity: 1;
}

.gac-nudge__body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.gac-nudge__icon {
  color: var(--srh-gold-ink, #435a74);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.gac-nudge__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.gac-nudge__title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.gac-nudge__sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.gac-nudge__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.7;
}

.gac-nudge__close:hover { opacity: 1; }

.gac-nudge__links {
  display: flex;
  gap: 8px;
}

.gac-nudge__link {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(190, 210, 234, 0.1);
  color: var(--srh-gold-ink, #435a74);
  border: 1px solid rgba(190, 210, 234, 0.3);
  text-decoration: none;
  transition: background 0.15s;
}

.gac-nudge__link:active,
.gac-nudge__link:hover {
  background: rgba(190, 210, 234, 0.22);
}

/* ── Error de carga ───────────────────────────────────────────────────────── */

.gac-load-error {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--red-ve);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* ── Estado "en salida" ──
   Hora post cumplida pero la carrera SIGUE ADMITIENDO JUGADAS, hasta que
   arranca de verdad (estado OFF). Va en ROJO, el color de máxima urgencia:
   es el momento en que más apremia jugar, porque la ventana se cierra sin
   previo aviso. Las cerradas ya estaban en gris, así que no hay confusión
   posible entre "corre" y "se acabó". */
.gac-race-chip--salida {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.1);
  opacity: 1;
  filter: none;
}
.gac-race-chip--salida .gac-race-chip__num {
  color: #EF4444;
}

.gac-race-banner--salida {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.04);
}

.gac-banner-closed-pill--salida {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.52);
  color: #EF4444;
}
