/* Páginas de acceso: login, registro y recuperar contraseña (sections/auth-open.php, auth-forms.php, auth-close.php) */

.auth {
	/* Foto del panel de marca y tinte encima. Para probar fondo rojo liso: --auth-photo: none; */
	--auth-photo: url("/img/modelo-boxers.jpg");
	--auth-tint: rgba(110, 8, 16, .78);
	--auth-brand: #c1121f;
	--auth-brand-dark: #990e17;
	--auth-ink: #1b1b1f;
	--auth-muted: #6b6b73;
	--auth-line: #dcdce0;
	--auth-bg: #f5f5f7;
	--auth-radius: var(--bs-border-radius, .375rem); /* el de los botones y campos del resto de la web */
	background: var(--auth-bg);
	color: var(--auth-ink);
	padding: 16px 12px 32px;
}
/* Tarjeta grande centrada con el panel de marca y el formulario dentro (no a pantalla completa) */
.auth-box {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	max-width: 980px;
	margin: 0 auto;
	background: #fff;
	border-radius: var(--bs-border-radius-lg, .5rem);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 40px rgba(0, 0, 0, .08);
}
@media (min-width: 768px) {
	.auth {
		padding: 48px 24px 64px;
	}
	.auth-box {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		min-height: 580px;
	}
}

/* Panel de marca */
.auth-brand {
	background: linear-gradient(var(--auth-tint), var(--auth-tint)), var(--auth-photo) center 25% / cover no-repeat, var(--auth-brand);
	color: #fff;
	padding: 20px 20px 22px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 24px;
}
.auth-brand-title {
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0;
	text-transform: uppercase;
}
.auth-brand-lead {
	margin: 6px 0 0;
	font-size: .95rem;
	opacity: .92;
}
.auth-points {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
}
.auth-points li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-top: 14px;
	font-size: .95rem;
}
.auth-points i {
	flex: 0 0 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .95rem;
}
.auth-points strong {
	display: block;
	font-weight: 700;
}
@media (min-width: 768px) {
	.auth-brand {
		padding: 48px 40px;
		justify-content: center;
	}
	.auth-brand-title {
		font-size: 2rem;
	}
	.auth-brand-lead {
		font-size: 1.05rem;
		max-width: 26em;
	}
	.auth-points {
		display: block;
		margin-top: 8px;
	}
}

/* Tarjeta */
.auth-main {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 22px 18px 24px;
}
@media (min-width: 768px) {
	.auth-main {
		align-items: center;
		padding: 40px 36px;
	}
}
.auth-card {
	width: 100%;
	max-width: 380px;
}
.auth-card h1 {
	font-size: 1.35rem;
	font-weight: 800;
	margin: 0 0 6px;
}
.auth-sub {
	color: var(--auth-muted);
	font-size: .92rem;
	margin: 0 0 18px;
}

/* Pestañas Entrar / Crear cuenta */
.auth-tabs {
	display: flex;
	background: #ececf0;
	border-radius: var(--auth-radius);
	padding: 4px;
	margin-bottom: 18px;
}
.auth-tab {
	flex: 1;
	border: 0;
	background: transparent;
	border-radius: calc(var(--auth-radius) - 2px);
	padding: 8px 0;
	font-weight: 600;
	font-size: .92rem;
	color: var(--auth-muted);
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: background .15s, color .15s;
}
.auth-tab.active {
	background: #fff;
	color: var(--auth-ink);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

/* Mensajes */
.auth-msg {
	border-radius: var(--auth-radius);
	padding: 10px 12px;
	font-size: .9rem;
	margin-bottom: 14px;
}
.auth-msg a {
	color: inherit;
	font-weight: 600;
}
.auth-msg-danger  { background: #fdecee; color: #8f0d17; }
.auth-msg-warning { background: #fff4dc; color: #7a4d00; }
.auth-msg-success { background: #e7f6ec; color: #145c2c; }
.auth-msg-info    { background: #e9f1fc; color: #12457f; }

/* Consentimiento (registro) */
.auth-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: .85rem;
	color: var(--auth-muted);
	margin-bottom: 16px;
	line-height: 1.4;
}
.auth-consent input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	accent-color: var(--auth-brand);
}
.auth-consent.attention {
	color: #8f0d17;
	animation: auth-shake .3s;
}
/* En rojo, los enlaces se distinguen del texto: subrayados y en negrita */
.auth-consent.attention a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 2px;
}
@keyframes auth-shake {
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

/* Google y separador */
.auth-google-wrap {
	position: relative;
}
.auth-google {
	min-height: 44px;
	display: flex;
	justify-content: center;
}
.auth-google-block {
	position: absolute;
	inset: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.auth-google-block[hidden] {
	display: none;
}
.auth-or {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--auth-muted);
	font-size: .82rem;
	margin: 18px 0;
}
.auth-or::before,
.auth-or::after {
	content: "";
	flex: 1;
	border-top: 1px solid var(--auth-line);
}

/* Campos */
.auth-field {
	margin-bottom: 14px;
}
.auth-label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: .85rem;
	font-weight: 600;
	margin-bottom: 5px;
}
.auth-label a {
	font-weight: 500;
	text-decoration: none;
}
.auth-input-wrap {
	position: relative;
}
.auth-input {
	width: 100%;
	height: 46px;
	border: 1px solid var(--auth-line);
	border-radius: var(--auth-radius);
	padding: 0 14px;
	font-size: 1rem; /* 16px: iOS no hace zoom al enfocar */
	color: var(--auth-ink);
	background: #fff;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.auth-input-wrap .auth-input {
	padding-right: 46px;
}
.auth-input:focus {
	border-color: var(--auth-brand);
	box-shadow: 0 0 0 .25rem rgba(193, 18, 31, .2); /* como el foco de Bootstrap */
}
.auth-eye {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	color: var(--auth-muted);
	border-radius: var(--auth-radius);
	cursor: pointer;
}
.auth-eye:hover {
	color: var(--auth-ink);
}

/* Contraseña nueva (sections/password-fields.php): requisitos y si coinciden, en tiempo real */
.auth-rules {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	font-size: .8rem;
	color: var(--auth-muted);
}
.auth-rules li,
.auth-match {
	display: flex;
	align-items: center;
	gap: 6px;
	transition: color .15s;
}
.auth-rules li + li {
	margin-top: 2px;
}
.auth-match {
	font-size: .8rem;
	margin-top: 6px;
	min-height: 1.2em; /* que no salte la página al aparecer */
}
.auth-rules .ok,
.auth-match.ok {
	color: #145c2c;
}
.auth-rules .bad,
.auth-match.bad {
	color: #8f0d17;
}
.auth-input.is-bad {
	border-color: #8f0d17;
}

/* Botón principal */
.auth-submit {
	width: 100%;
	height: 46px;
	border: 0;
	border-radius: var(--auth-radius);
	background: var(--auth-brand);
	color: #fff;
	font-weight: 700;
	font-size: .95rem;
	text-transform: uppercase; /* como los botones de la web (btn text-uppercase fw-bold) */
	cursor: pointer;
	transition: background .15s;
	margin-top: 4px;
}
.auth-submit:hover {
	background: var(--auth-brand-dark);
}
.auth-captcha {
	display: flex;
	justify-content: center;
	margin-bottom: 14px;
}

.auth-foot {
	text-align: center;
	font-size: .88rem;
	color: var(--auth-muted);
	margin: 18px 0 0;
}
.auth-foot a {
	font-weight: 600;
	text-decoration: none;
}
.auth-legal {
	text-align: center;
	font-size: .75rem;
	color: var(--auth-muted);
	margin: 14px 0 0;
}
.auth-legal a {
	color: inherit;
}

/* Confirmar +18 y condiciones al crear la cuenta (#auth-confirm): hoja desde abajo en el móvil, centrada en escritorio */
.auth-confirm {
	border: 0;
	padding: 22px 20px calc(18px + env(safe-area-inset-bottom));
	width: 100%;
	max-width: 100%;
	margin: auto 0 0;
	border-radius: var(--bs-border-radius-lg, .5rem) var(--bs-border-radius-lg, .5rem) 0 0;
	color: #1b1b1f;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, .15);
}
.auth-confirm[open] {
	animation: auth-sheet-up .2s ease-out;
}
.auth-confirm::backdrop {
	background: rgba(0, 0, 0, .45);
}
@keyframes auth-sheet-up {
	from { transform: translateY(100%); }
}
@media (min-width: 768px) {
	.auth-confirm {
		max-width: 420px;
		margin: auto;
		padding: 26px 26px 20px;
		border-radius: var(--bs-border-radius-lg, .5rem);
	}
	.auth-confirm[open] {
		animation: none;
	}
}
.auth-confirm-title {
	font-weight: 800;
	font-size: 1.1rem;
	margin: 0 0 8px;
}
.auth-confirm-text {
	font-size: .92rem;
	color: #6b6b73;
	line-height: 1.45;
	margin: 0 0 18px;
}
.auth-confirm-text a {
	font-weight: 600;
	text-decoration: underline;
}
.auth-confirm-cancel {
	display: block;
	width: 100%;
	border: 0;
	background: transparent;
	color: #6b6b73;
	font-weight: 600;
	font-size: .9rem;
	padding: 12px 0 0;
	cursor: pointer;
}

.auth-panel[hidden] {
	display: none;
}
