/* ============================================================================
 *  auth-modal.css — Modal de acceso de la landing de aerotermia.me
 *  Cargado sólo cuando el visitante NO está logeado y se está sirviendo la
 *  landing. Se apoya en las variables de landing.css (dependencia declarada
 *  en wp_register_style) para mantener la paleta coherente con el resto
 *  de la página: --verde, --verde-claro, etc.
 *  ==========================================================================*/

/* Reset del <dialog> nativo: quitamos el borde/padding por defecto del
   user-agent y gestionamos el centrado nosotros. */
.aero-auth-modal {
	padding: 0;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	background: #fff;
	max-width: 420px;
	width: calc(100% - 32px);
	color: #1f2937;
}

.aero-auth-modal::backdrop {
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(2px);
}

/* Safari no soporta ::backdrop en polyfill — si el navegador no abre
   el dialog nativamente, el JS añade .is-open y nos apoyamos en estos
   estilos de fallback. */
.aero-auth-modal.is-open {
	display: block;
	position: fixed;
	inset: 0;
	margin: auto;
	z-index: 1000;
}

.aero-auth-inner {
	position: relative;
	padding: 32px 28px 28px;
	font-family: Inter, system-ui, sans-serif;
}

.aero-auth-close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: transparent;
	border: 0;
	font-size: 1.8rem;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
}

.aero-auth-close:hover {
	color: #111827;
	background: #f3f4f6;
}

/* Paneles (login / reset) — sólo uno visible a la vez. */
.aero-auth-panel[hidden] {
	display: none;
}

.aero-auth-panel h2 {
	margin: 0 0 8px;
	font-size: 1.35rem;
	font-weight: 700;
	color: #111827;
}

.aero-auth-lead {
	margin: 0 0 20px;
	font-size: 0.93rem;
	color: #4b5563;
	line-height: 1.45;
}

/* Formulario --------------------------------------------------------------- */
.aero-auth-form label {
	display: block;
	margin-bottom: 14px;
	font-size: 0.88rem;
	color: #374151;
	font-weight: 500;
}

.aero-auth-form label > span {
	display: block;
	margin-bottom: 6px;
}

.aero-auth-form input[type="text"],
.aero-auth-form input[type="email"],
.aero-auth-form input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 0.95rem;
	font-family: inherit;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.aero-auth-form input:focus {
	outline: none;
	border-color: var(--verde, #047857);
	box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}

/* Campo contraseña + botón ojito */
.aero-auth-password {
	position: relative;
}

.aero-auth-password input {
	padding-right: 44px;
}

.aero-auth-eye {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #6b7280;
	cursor: pointer;
	border-radius: 6px;
	font-size: 1rem;
}

.aero-auth-eye:hover {
	color: var(--verde, #047857);
	background: #f3f4f6;
}

.aero-auth-eye.is-visible {
	color: var(--verde, #047857);
}

/* Checkbox "Mantener sesión iniciada" */
.aero-auth-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	color: #4b5563;
	font-weight: 400;
	margin-bottom: 8px;
}

.aero-auth-remember input {
	width: auto;
	margin: 0;
}

/* Mensaje inline (éxito / error) */
.aero-auth-msg {
	min-height: 1.1em;
	margin: 10px 0 6px;
	font-size: 0.88rem;
	line-height: 1.4;
}

.aero-auth-msg.is-error {
	color: #b91c1c;
}

.aero-auth-msg.is-ok {
	color: #047857;
}

/* Botón submit */
.aero-auth-submit {
	width: 100%;
	padding: 11px 16px;
	background: var(--verde, #047857);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 0.98rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background-color 0.15s;
}

.aero-auth-submit:hover:not(:disabled) {
	background: var(--verde-oscuro, #065f46);
}

.aero-auth-submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* Alternativa (recuperar / volver) */
.aero-auth-alt {
	margin: 14px 0 0;
	font-size: 0.85rem;
	text-align: center;
	color: #6b7280;
}

.aero-auth-alt a {
	color: var(--verde, #047857);
	text-decoration: none;
	font-weight: 500;
}

.aero-auth-alt a:hover {
	text-decoration: underline;
}

/* Mobile ------------------------------------------------------------------- */
@media (max-width: 480px) {
	.aero-auth-inner {
		padding: 24px 20px 20px;
	}

	.aero-auth-panel h2 {
		font-size: 1.2rem;
	}
}
