/* =========================================================
   RatoLibre — Reto de hoy: selector de modo y cinta del reto
   Común a los juegos con reto diario. Este archivo es idéntico en
   juegos/ahorcado/, crucigramas/, memorama/, palabras-revueltas/,
   sopa-de-letras/ y sudoku/: si cambias uno, copia el cambio a los otros cinco.
   Depende de los tokens de ../../assets/css/base.css
   ========================================================= */

/* ---------- Selector: Juego libre | Reto de hoy ---------- */

.reto-modos {
  display: flex;
  max-width: 520px;
  margin: 16px 0 0;
  border: 2px solid var(--accent-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.reto-modo {
  flex: 1 1 50%;
  min-height: 52px;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--accent-2);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.reto-modo + .reto-modo {
  border-left: 2px solid var(--accent-2);
}

.reto-modo:hover {
  background: var(--accent-2-soft);
}

.reto-modo[aria-pressed="true"] {
  background: var(--accent-2);
  color: #ffffff;
  cursor: default;
}

.reto-modo:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -5px;
}

/* Lo que no se usa en el reto (Nuevo juego, nivel, tema) se oculta. */
.game-toolbar > [hidden] {
  display: none !important;
}

/* ---------- Cinta del reto ---------- */

.reto-cinta {
  margin: 0 0 14px;
  padding: 12px 14px 14px;
  border: 2px solid var(--accent-2);
  border-radius: var(--radius);
  background: var(--accent-2-soft);
}

.reto-cinta[hidden] {
  display: none;
}

.reto-cinta p {
  margin: 0;
}

.reto-titulo {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--accent-2);
}

.reto-racha {
  margin: 4px 0 10px !important;
}

.reto-semana {
  display: flex;
  gap: 6px;
  max-width: 420px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reto-dia {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--muted);
}

.reto-dia.es-hoy .reto-dia-nombre {
  color: var(--text);
}

.reto-dia-marca {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1;
}

.reto-dia.es-hoy .reto-dia-marca {
  border: 3px solid var(--accent);
}

.reto-dia.es-hecho .reto-dia-marca {
  border-color: var(--accent-2);
  background: var(--accent-2);
}

/* ---------- Otros retos de hoy ---------- */

.reto-otros {
  margin-top: 12px;
}

.reto-otros-titulo {
  font-weight: 700;
}

.reto-otros-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.reto-otros-lista li {
  flex: 1 1 140px;
  max-width: 240px;
  margin: 0;
}

.reto-otro {
  width: 100%;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-size: 0.95rem;
}

.reto-otro-marca {
  color: var(--accent-2);
  font-weight: 800;
}

@media (max-width: 479px) {
  .reto-modos {
    margin-top: 12px;
  }

  .reto-cinta {
    padding: 10px 12px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reto-modo {
    transition: none;
  }
}
