/*
 * Estilos del front de ANAIS Interactivo.
 * Diseñados con contraste AA, foco visible y sin depender solo del color.
 */

.anais-acertijo,
.anais-capitulo,
.anais-panel,
.anais-valoracion {
	--anais-borde: #5a5a5a;
	--anais-ok-bg: #e6f4ea;
	--anais-ok-fg: #0b6b2e;
	--anais-error-bg: #fde8e8;
	--anais-error-fg: #9b1c1c;
	--anais-acento: #1f4e79;
}

.anais-acertijo {
	border: 1px solid var(--anais-borde);
	border-radius: 6px;
	padding: 1rem 1.25rem;
	margin: 1.5rem 0;
}

.anais-acertijo h3 {
	margin-top: 0;
}

.anais-form label {
	display: block;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.anais-form input[type="text"] {
	width: 100%;
	max-width: 28rem;
	padding: 0.5rem 0.6rem;
	font-size: 1rem;
	border: 2px solid var(--anais-borde);
	border-radius: 4px;
}

/* Foco siempre visible y con suficiente grosor/contraste. */
.anais-form input[type="text"]:focus-visible,
.anais-boton:focus-visible,
.anais-estrella input:focus-visible + label,
.anais-pista summary:focus-visible {
	outline: 3px solid var(--anais-acento);
	outline-offset: 2px;
}

.anais-boton {
	display: inline-block;
	margin-top: 0.75rem;
	padding: 0.55rem 1.1rem;
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	background: var(--anais-acento);
	border: 2px solid var(--anais-acento);
	border-radius: 4px;
	cursor: pointer;
}

.anais-boton:hover {
	background: #163a5c;
}

.anais-pista {
	margin: 0.75rem 0;
}

.anais-pista summary {
	cursor: pointer;
	font-weight: 600;
}

/* El feedback no se basa solo en color: lleva símbolo y texto. */
.anais-feedback {
	margin: 0.75rem 0;
	padding: 0.6rem 0.8rem;
	border-radius: 4px;
	border: 2px solid;
	font-weight: 600;
}

.anais-feedback--ok {
	background: var(--anais-ok-bg);
	color: var(--anais-ok-fg);
	border-color: var(--anais-ok-fg);
}

.anais-feedback--ok::before {
	content: "\2714\00a0"; /* ✔ */
}

.anais-feedback--error {
	background: var(--anais-error-bg);
	color: var(--anais-error-fg);
	border-color: var(--anais-error-fg);
}

.anais-feedback--error::before {
	content: "\26a0\00a0"; /* ⚠ */
}

.anais-resuelto {
	color: var(--anais-ok-fg);
	font-weight: 700;
}

/* Valoración por estrellas: radios reales, accesibles por teclado. */
.anais-estrellas fieldset {
	border: 0;
	padding: 0;
	margin: 0;
}

.anais-estrella {
	display: inline-flex;
	align-items: center;
	margin-right: 0.75rem;
}

.anais-estrella input {
	margin-right: 0.25rem;
}

.anais-panel__lista {
	list-style: none;
	padding: 0;
}

.anais-panel__lista li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid #d0d0d0;
}

.anais-estado {
	font-weight: 700;
}

.anais-estado--completado {
	color: var(--anais-ok-fg);
}

.anais-estado--bloqueado {
	color: #6b6b6b;
}

.anais-aviso {
	background: #fff8e1;
	border-left: 4px solid #b7791f;
	padding: 0.6rem 0.9rem;
}

/* Registro y acceso. */
.anais-registro .anais-form p,
.anais-acceso p {
	margin: 0 0 0.9rem;
}

.anais-registro label {
	display: block;
	font-weight: 700;
	margin-bottom: 0.3rem;
}

.anais-registro input[type="text"],
.anais-registro input[type="email"],
.anais-registro input[type="tel"],
.anais-registro input[type="password"] {
	width: 100%;
	max-width: 28rem;
	padding: 0.5rem 0.6rem;
	font-size: 1rem;
	border: 2px solid var(--anais-borde, #5a5a5a);
	border-radius: 4px;
}

.anais-registro input:focus-visible {
	outline: 3px solid var(--anais-acento, #1f4e79);
	outline-offset: 2px;
}

.anais-req {
	color: #9b1c1c;
}

.anais-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	max-width: 32rem;
}

.anais-consent label {
	display: inline;
	font-weight: 400;
}

/* Expediente y materiales. */
.anais-expediente {
	margin: 1.5rem 0;
}

.anais-material {
	border-left: 4px solid var(--anais-acento, #1f4e79);
	background: #f7f9fc;
	padding: 0.75rem 1rem;
	margin: 1rem 0;
}

.anais-material h4 {
	margin: 0 0 0.5rem;
}

.anais-material__img {
	max-width: 100%;
	height: auto;
}

.anais-material__audio {
	width: 100%;
	max-width: 28rem;
}

.anais-material__alt summary {
	cursor: pointer;
	font-weight: 600;
	margin-top: 0.5rem;
}

/* Utilidad solo para lectores de pantalla. */
.anais-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
