/* Estilos base, minimalistas y fáciles de sobreescribir por tema o desde Elementor. */

.asdm-login-form,
.asdm-register-form,
.asdm-profile-form {
	width: 100%;
	box-sizing: border-box;
}

/* Utilidad de accesibilidad: oculta visualmente un elemento sin
   quitarlo del árbol de accesibilidad (lectores de pantalla). Se usa
   cuando en Elementor se elige mostrar solo el placeholder (o
   ninguno) y por tanto el <label> real no debe verse en pantalla. */
.asdm-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;
}

.asdm-field { margin-bottom: 1em; }
.asdm-field label,
.asdm-field .asdm-field-label { display: block; margin-bottom: .35em; font-weight: 600; }
.asdm-field input[type="text"],
.asdm-field input[type="email"],
.asdm-field input[type="tel"],
.asdm-field input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	padding: .6em .75em;
	border: 1px solid #ccc;
	border-radius: 4px;
}
/* Cuando el campo está configurado como "solo placeholder" o
   "ninguno", el label sigue en el DOM (por accesibilidad) pero con
   .asdm-sr-only ya no reserva espacio visual: nada más que hacer aquí,
   simplemente no añadimos el margin-bottom extra en esos casos. */
.asdm-field-display-placeholder .asdm-field-label,
.asdm-field-display-none .asdm-field-label { margin-bottom: 0; }

.asdm-field-row { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; }
.asdm-remember { font-weight: 400; display: flex; gap: .4em; align-items: center; margin: 0; }
.asdm-forgot-link { font-size: .9em; }
.asdm-form-heading { margin: 0 0 1em; }
.asdm-form-message { min-height: 1.2em; font-size: .9em; }
.asdm-form-message.asdm-error { color: #c0392b; }
.asdm-form-message.asdm-success { color: #27ae60; }
.asdm-form-footer { font-size: .9em; }

.asdm-btn {
	display: inline-block;
	padding: .7em 1.5em;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	font-weight: 600;
}
.asdm-btn-submit,
.asdm-btn-primary { background: #1a1a1a; color: #fff; }
.asdm-btn-outline { background: transparent; border: 1px solid #1a1a1a; color: #1a1a1a; }
.asdm-btn-current { background: #eee; color: #666; padding: .7em 1.5em; border-radius: 4px; display: inline-block; }
/* Enlaces con aspecto de botón: que el color de enlaces del tema no los pise. */
a.asdm-btn.asdm-btn-primary, a.asdm-btn.asdm-btn-primary:hover, a.asdm-btn.asdm-btn-primary:focus { color: #fff; text-decoration: none; }
a.asdm-btn.asdm-btn-outline, a.asdm-btn.asdm-btn-outline:hover, a.asdm-btn.asdm-btn-outline:focus { color: #1a1a1a; text-decoration: none; }

/* Mensaje "ya has iniciado sesión" / "ya tienes una cuenta" */
.asdm-logged-in-notice {
	display: block;
}
.asdm-logged-in-logout { text-decoration: underline; }

/* Selector de plan (registro) — reutiliza .asdm-plan-card de la tabla de planes */
.asdm-plan-choice-heading,
.asdm-billing-choice-heading { display: block; font-weight: 600; margin-bottom: .75em; }
.asdm-plans-table-selectable .asdm-plan-card {
	position: relative;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.asdm-plans-table-selectable .asdm-plan-card:hover { border-color: #b5b5b5; }
.asdm-plan-selected-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #1a1a1a;
	color: #fff;
	font-size: 13px;
	line-height: 22px;
	opacity: 0;
	transform: scale(.6);
	transition: opacity .15s ease, transform .15s ease;
}
.asdm-plan-card.asdm-plan-selected { border-color: #1a1a1a; }
.asdm-plan-card.asdm-plan-selected .asdm-plan-selected-badge { opacity: 1; transform: scale(1); }

/* Selector de pago único / recurrente (registro) */
.asdm-billing-choice { display: block; }
.asdm-billing-choice.asdm-billing-choice-hidden { display: none; }
.asdm-billing-option {
	display: flex;
	align-items: flex-start;
	gap: .5em;
	font-weight: 400;
	margin-bottom: .6em;
	cursor: pointer;
}
.asdm-billing-option input[type="radio"] { margin-top: .25em; flex-shrink: 0; }
.asdm-billing-option:last-child { margin-bottom: 0; }

/* Tabla de planes */
.asdm-plans-table {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5em;
}
.asdm-plan-card {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 1.75em 1.5em;
	text-align: center;
	box-sizing: border-box;
}
.asdm-plan-current { border-color: #1a1a1a; }
/* Plan destacado (casilla "Destacar" en Membresías → Planes). */
.asdm-plan-card.asdm-plan-highlight { position: relative; border-color: #1a1a1a; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.asdm-plan-name { margin: 0 0 .4em; }
.asdm-plan-price { font-size: 1.4em; font-weight: 700; margin-bottom: 1em; }
.asdm-plan-features { list-style: none; padding: 0; margin: 0 0 1.5em; text-align: left; }
.asdm-plan-features li { padding: .35em 0; border-top: 1px solid #f0f0f0; }
.asdm-plan-features li:first-child { border-top: none; }

/*
 * Seguridad para móvil: las columnas del selector de planes y de la
 * tabla de planes se controlan desde Elementor (control "Columnas",
 * responsive). Si en un breakpoint concreto no se ha definido un
 * valor específico, Elementor sigue aplicando el valor de escritorio
 * (p. ej. 3 columnas), lo que hace que las tarjetas se salgan de la
 * pantalla en móvil. Esta regla actúa como red de seguridad: por
 * debajo de 767px siempre se apila 1 columna por fila salvo que el
 * ancho de columna elegido en Elementor ya quepa de sobra.
 */
@media (max-width: 767px) {
	.asdm-plans-table,
	.asdm-plans-table-selectable {
		grid-template-columns: 1fr !important;
	}
}

/* Bloque oculto para posts restringidos (artículo completo, sin vista previa parcial) */
.asdm-blur-wrapper { position: relative; margin-top: 1em; }
.asdm-blur-content {
	filter: blur(6px);
	user-select: none;
	pointer-events: none;
	max-height: 480px;
	overflow: hidden;
}
.asdm-blur-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	background: linear-gradient(to bottom, rgba(255,255,255,.55) 0%, rgba(255,255,255,.92) 40%);
	padding: 1.5em;
}
.asdm-blur-message { font-weight: 700; font-size: 1.1em; margin: 0 0 .75em; }
.asdm-blur-cta {
	display: inline-block;
	padding: .7em 1.6em;
	background: #1a1a1a;
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
}

/* Página de cuenta */
.asdm-account-current {
	margin-bottom: 2em;
	padding: 1.5em;
	background: #f8f8f8;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
}
.asdm-account-greeting { font-size: 1.2em; font-weight: 700; margin: 0 0 .3em; }
.asdm-account-plan { margin: 0 0 .2em; }
.asdm-account-expiry { margin: 0; opacity: .75; font-size: .9em; }
.asdm-account-upgrade-heading { margin: 0 0 1em; }
.asdm-account-upgrade-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5em;
}
.asdm-account-upgrade .asdm-plan-card { text-align: left; }
.asdm-account-logout { margin-top: 2em; font-size: .9em; }
.asdm-account-guest { text-align: center; }
.asdm-account-cancel-notice { margin-top: .3em; }

/* Botón "Cancelar suscripción" junto a "Cerrar sesión" */
.asdm-account-logout-has-cancel {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1em;
}
.asdm-cancel-sub-btn {
	background: transparent;
	border: 1px solid #1a1a1a;
	color: #1a1a1a;
	border-radius: 4px;
	padding: .4em 1em;
	font-size: inherit;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
}

@media (max-width: 767px) {
	.asdm-account-upgrade-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Selector de pasarela (pop-up) para botones sueltos "Suscribirme" /
   "Mejorar" (tabla de planes, página de cuenta), fuera del formulario
   de registro. Solo aparece si hay más de una pasarela activa. */
.asdm-gwpicker-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 1em;
}
.asdm-gwpicker-box {
	background: #fff;
	border-radius: 8px;
	padding: 1.75em 1.5em;
	max-width: 320px;
	width: 100%;
	text-align: center;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.asdm-gwpicker-title {
	margin: 0 0 1.1em;
	font-weight: 600;
	font-size: 1.05em;
}
.asdm-gwpicker-option {
	display: block;
	width: 100%;
	margin-bottom: .6em;
	border: none;
	cursor: pointer;
}
.asdm-gwpicker-cancel {
	display: block;
	width: 100%;
	margin-top: .4em;
	background: none;
	border: none;
	color: #666;
	text-decoration: underline;
	cursor: pointer;
	font-size: .9em;
}

/* Ventana con los botones oficiales de PayPal (checkout recurrente
   sin redirección de página completa — ver asdm-paypal-checkout.js) */
.asdm-paypal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 1em;
}
.asdm-paypal-box {
	background: #fff;
	border-radius: 8px;
	padding: 1.75em 1.5em;
	max-width: 360px;
	width: 100%;
	text-align: center;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.asdm-paypal-msg {
	margin: 0 0 1.1em;
	font-weight: 600;
	font-size: 1.0em;
}
.asdm-paypal-close {
	display: block;
	width: 100%;
	margin-top: .9em;
	background: none;
	border: none;
	color: #666;
	text-decoration: underline;
	cursor: pointer;
	font-size: .9em;
}

/* Panel "Mi perfil" (editar nombre/teléfono/email/contraseña) */
.asdm-profile-guest { text-align: center; }
.asdm-profile-fields-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 1.5em;
}
.asdm-profile-fields-grid .asdm-field { margin-bottom: 1em; }
.asdm-profile-password-section {
	margin-top: 1.5em;
	padding-top: 1.5em;
	border-top: 1px solid #e2e2e2;
}
.asdm-profile-password-heading {
	display: block;
	font-weight: 600;
	margin-bottom: .3em;
}
.asdm-profile-password-note {
	display: block;
	font-size: .85em;
	opacity: .7;
	margin-bottom: 1em;
}

@media (max-width: 767px) {
	.asdm-profile-fields-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Modal de confirmación de "Cancelar suscripción" (widget Mi cuenta) */
.asdm-cancelsub-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 1em;
}
.asdm-cancelsub-box {
	background: #fff;
	border-radius: 8px;
	padding: 1.75em 1.5em;
	max-width: 380px;
	width: 100%;
	text-align: center;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.asdm-cancelsub-title {
	margin: 0 0 .7em;
	font-weight: 700;
	font-size: 1.1em;
}
.asdm-cancelsub-text {
	margin: 0 0 1.3em;
	font-size: .95em;
	line-height: 1.45;
}
.asdm-cancelsub-text.asdm-cancelsub-error { color: #c0392b; }
.asdm-cancelsub-confirm,
.asdm-cancelsub-close {
	display: block;
	width: 100%;
	border: none;
	cursor: pointer;
}
.asdm-cancelsub-confirm:disabled,
.asdm-cancelsub-keep:disabled { opacity: .6; cursor: default; }
.asdm-cancelsub-keep {
	display: block;
	width: 100%;
	margin-top: .6em;
	background: none;
	border: none;
	color: #666;
	text-decoration: underline;
	cursor: pointer;
	font-size: .9em;
}
