/**
 * Verificación de edad y banner de cookies.
 */

/* ============================================================
   Verificación de edad
   ============================================================
   Bloquea el acceso: es un requisito regulatorio, no un aviso que se
   pueda ignorar. */

.lz-edad {
	position: fixed;
	inset: 0;
	/* Por encima de todo, incluido el aviso de operador. */
	z-index: calc(var(--lz-z-modal) + 10);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--lz-gutter);
	background: rgba(6, 16, 28, .92);
	backdrop-filter: blur(6px);
	overflow-y: auto;
}

.lz-edad[hidden] { display: none; }

.lz-edad__caja {
	width: 100%;
	max-width: 480px;
	padding: var(--lz-space-8) var(--lz-space-7);
	text-align: center;
	background: var(--lz-surface-raised);
	border: 1px solid var(--lz-line);
	border-radius: var(--lz-radius-md);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

.lz-edad__caja:focus-visible { outline: none; }

.lz-edad__marca {
	display: block;
	font-family: var(--lz-font-display);
	font-size: var(--lz-text-lg);
	color: var(--lz-heading);
	margin-bottom: var(--lz-space-6);
}

.lz-edad__marca span { color: var(--lz-accent); }

.lz-edad__sello {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: var(--lz-space-5);
	font-family: var(--lz-font-display);
	font-size: var(--lz-text-lg);
	color: #FFFFFF;
	background: #B3271E;
	border-radius: 50%;
}

.lz-edad__title {
	font-size: var(--lz-text-xl);
	line-height: 1.25;
	margin: 0 0 var(--lz-space-3);
}

.lz-edad__texto {
	color: var(--lz-muted);
	margin: 0 0 var(--lz-space-6);
}

.lz-edad__acciones {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--lz-space-4);
	margin-bottom: var(--lz-space-6);
}

.lz-edad__acciones .lz-btn { width: 100%; }

.lz-edad__ayuda {
	font-size: var(--lz-text-xs);
	color: var(--lz-faint);
	margin: 0;
	text-align: start;
}

.lz-edad__ayuda a { color: var(--lz-muted); text-decoration: underline; }

/* ============================================================
   Banner de cookies
   ============================================================
   Barra inferior en lugar de modal: informa sin bloquear la lectura,
   que es lo que exige que el consentimiento sea libre. */

.lz-cookies {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: var(--lz-z-modal);
	padding: var(--lz-space-4) var(--lz-gutter);
	background: var(--lz-surface-raised);
	border-top: 2px solid var(--lz-accent);
	box-shadow: 0 -8px 30px rgba(15, 42, 74, .18);
	/* Entra deslizándose desde abajo. */
	transform: translateY(100%);
	transition: transform var(--lz-duration) var(--lz-ease);
}

.lz-cookies[hidden] { display: none; }

.lz-cookies.is-visible { transform: translateY(0); }

.lz-cookies__caja {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--lz-space-6);
	max-width: var(--lz-container);
	margin-inline: auto;
}

.lz-cookies__title {
	font-size: var(--lz-text-base);
	margin: 0 0 var(--lz-space-2);
}

.lz-cookies__texto {
	min-width: 0;
}

.lz-cookies__texto p {
	font-size: var(--lz-text-sm);
	color: var(--lz-muted);
	margin: 0;
}

.lz-cookies__texto a {
	color: var(--lz-heading);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Ambos botones con el mismo tamaño: rechazar no puede costar más que
   aceptar, o el consentimiento deja de ser libre. */
.lz-cookies__acciones {
	display: flex;
	gap: var(--lz-space-3);
	flex-shrink: 0;
}

.lz-cookies__acciones .lz-btn {
	min-width: 130px;
}

/* Con la barra móvil presente, el banner se coloca por encima. */
@media (max-width: 767px) {
	body.lz-tiene-barra .lz-cookies {
		bottom: calc(58px + env(safe-area-inset-bottom, 0px));
	}

	body.lz-barra-cta .lz-cookies {
		bottom: calc(70px + env(safe-area-inset-bottom, 0px));
	}

	.lz-cookies__caja {
		flex-direction: column;
		align-items: stretch;
		gap: var(--lz-space-4);
	}

	.lz-cookies__acciones .lz-btn {
		flex: 1 1 0;
		min-width: 0;
	}

	.lz-edad__caja {
		padding: var(--lz-space-6) var(--lz-space-5);
	}

	.lz-edad__title { font-size: var(--lz-text-lg); }
}

/* ============================================================
   Tabla de cookies de la política
   ============================================================ */

.lz-tabla-cookies {
	margin-block: var(--lz-space-6);
}

.lz-tabla-cookies__grupo {
	margin-bottom: var(--lz-space-7);
}

.lz-tabla-cookies__titulo {
	font-size: var(--lz-text-lg);
	margin: 0 0 var(--lz-space-2);
}

.lz-tabla-cookies__intro {
	color: var(--lz-muted);
	font-size: var(--lz-text-sm);
	margin: 0 0 var(--lz-space-4);
}

.lz-tabla-cookies table {
	width: 100%;
	max-width: 100%;
	display: block;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: var(--lz-text-sm);
}

.lz-tabla-cookies :is(th, td) {
	padding: var(--lz-space-3) var(--lz-space-4);
	text-align: start;
	border-bottom: 1px solid var(--lz-line-soft);
	min-width: 8rem;
	vertical-align: top;
}

.lz-tabla-cookies th {
	font-family: var(--lz-font-display);
	font-size: var(--lz-text-xs);
	text-transform: uppercase;
	letter-spacing: var(--lz-tracking-wide);
	color: var(--lz-muted);
	background: var(--lz-surface-sunken);
	border-bottom: 1px solid var(--lz-line);
}

.lz-tabla-cookies code {
	font-size: var(--lz-text-xs);
	padding: 2px 6px;
	background: var(--lz-surface-sunken);
	border-radius: var(--lz-radius-sm);
}

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