/**
 * styles.css
 * Estilo compartido de Mateguarida: botones grandes, alto contraste, pensado
 * para tablet y pizarra digital (ver CLAUDE.md, etapa 4).
 */

:root {
  --azul: #1B6B93;
  --azul-oscuro: #124A65;
  --amarillo: #F3B62B;
  --verde: #2E9E5B;
  --rojo: #D14343;
  --tinta: #1C2733;
  --papel: #FBFBF6;
  --borde: #D8E0E6;
  --radio: 20px;
  --fuente-titulo: 'Baloo 2', system-ui, sans-serif;
  --fuente-texto: 'Nunito Sans', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papel: #10171D;
    --tinta: #EAF1F5;
    --borde: #2A3A45;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.salto {
  position: absolute;
  left: -9999px;
}
.salto:focus {
  left: 1rem;
  top: 1rem;
  background: var(--amarillo);
  color: var(--tinta);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 10;
}

.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--azul);
  color: white;
}

.marca {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 1.25rem;
}
.marca-icono { font-size: 1.5rem; }

.contenido {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.pantalla {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}
.pantalla--angosta { max-width: 420px; }

.titulo {
  font-family: var(--fuente-titulo);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  margin: 0;
  color: var(--azul-oscuro);
}

.texto { font-size: 1.1rem; line-height: 1.5; margin: 0; }
.texto.vacio { color: #6B7A85; }

.etiqueta-curso {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--azul);
  margin: 0;
}

.formulario {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}
.etiqueta { font-weight: 700; }

input {
  font-size: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 2px solid var(--borde);
  background: white;
  color: var(--tinta);
}
input:focus { outline: 3px solid var(--amarillo); }

.boton {
  font-family: var(--fuente-titulo);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 1rem 1.5rem;
  border-radius: var(--radio);
  border: none;
  background: var(--amarillo);
  color: var(--azul-oscuro);
  cursor: pointer;
  min-height: 56px;
}
.boton:disabled { opacity: 0.6; cursor: not-allowed; }
.boton--claro { background: transparent; border: 2px solid var(--borde); color: var(--tinta); }

.error {
  color: var(--rojo);
  font-weight: 700;
  min-height: 1.5rem;
  margin: 0;
}

.nombres {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.nombre {
  width: 100%;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: var(--radio);
  border: none;
  background: var(--azul);
  color: white;
  font-family: var(--fuente-titulo);
  font-weight: 700;
  cursor: pointer;
  padding: 0.75rem;
}
.nombre:disabled { opacity: 0.6; cursor: not-allowed; }
.nombre-inicial {
  font-size: 1.75rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.nombre-texto { font-size: 1rem; word-break: break-word; }

.nombre[data-color="1"] { background: var(--verde); }
.nombre[data-color="2"] { background: #7A5EC2; }
.nombre[data-color="3"] { background: #C2695E; }
.nombre[data-color="4"] { background: #2A9FA8; }
.nombre[data-color="5"] { background: #B6862E; }

.acciones { display: flex; justify-content: center; }

.aviso-noscript {
  padding: 1rem;
  text-align: center;
  font-weight: 700;
}
