/**
 * WC Popup Auth — overlay y modal.
 * Variables personalizables desde Ajustes → Apariencia:
 *   --wcpa-accent, --wcpa-radius
 */
:root {
	--wcpa-accent: #ff6b35;
	--wcpa-radius: 14px;
	--wcpa-text: #1a1a1a;
	--wcpa-muted: #6b7280;
	--wcpa-border: #e8e8e8;
	--wcpa-bg-input: #f5f5f5;
}

body.wcpa-locked {
	overflow: hidden;
}

/* ── Reset defensivo ───────────────────────────────────────────────────────────
   Astra, GeneratePress, Kadence y Elementor inyectan estilos agresivos en
   botones, inputs y encabezados (fuentes propias, MAYÚSCULAS, letter-spacing,
   sombras…). Neutralizamos la herencia dentro del popup para que se vea igual
   en cualquier tema, sin usar !important salvo donde el tema lo fuerza. */
.wcpa-overlay,
.wcpa-overlay *,
.wcpa-overlay *::before,
.wcpa-overlay *::after {
	box-sizing: border-box;
}

.wcpa-overlay {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.5;
	letter-spacing: normal;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.wcpa-overlay button,
.wcpa-overlay input,
.wcpa-overlay select,
.wcpa-overlay textarea {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	margin: 0;
}

.wcpa-overlay h1,
.wcpa-overlay h2,
.wcpa-overlay h3 {
	font-family: inherit;
	letter-spacing: -0.01em;
	text-transform: none;
	margin: 0;
}

.wcpa-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999; /* por encima de headers sticky de Astra/GP/Kadence/Elementor */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 10, 10, 0.55);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.wcpa-overlay.is-open {
	opacity: 1;
}

.wcpa-modal {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #ffffff;
	border-radius: var(--wcpa-radius);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
	padding: 32px 32px 26px;
	transform: translateY(14px) scale(0.98);
	transition: transform 0.25s ease;
}

.wcpa-overlay.is-open .wcpa-modal {
	transform: translateY(0) scale(1);
}

.wcpa-close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--wcpa-muted);
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.wcpa-close:hover {
	background: var(--wcpa-bg-input);
	color: var(--wcpa-text);
}

.wcpa-logo {
	text-align: center;
	margin-bottom: 18px;
}

.wcpa-logo img {
	max-height: 34px;
	width: auto;
}

/* ── Pestañas Login / Registro ──────────────────────────────────────────────── */
.wcpa-tabs {
	display: flex;
	gap: 4px;
	background: var(--wcpa-bg-input);
	border-radius: 12px;
	padding: 4px;
	margin-bottom: 22px;
}

.wcpa-tab {
	flex: 1;
	border: none;
	background: transparent;
	padding: 9px 12px;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--wcpa-muted);
	border-radius: 9px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.wcpa-tab:hover {
	color: var(--wcpa-text);
}

.wcpa-tab.is-active {
	background: #ffffff;
	color: var(--wcpa-text);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wcpa-view {
	display: none;
}

.wcpa-view.is-active {
	display: block;
}

.wcpa-title {
	margin: 0 0 6px;
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--wcpa-text);
	letter-spacing: -0.02em;
}

.wcpa-subtitle {
	margin: 0 0 18px;
	font-size: 0.9rem;
	color: var(--wcpa-muted);
}

.wcpa-alt {
	margin: 18px 0 0;
	font-size: 0.875rem;
	color: var(--wcpa-muted);
	text-align: center;
}

.wcpa-msg {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 0.85rem;
	line-height: 1.45;
}

.wcpa-msg--info {
	background: #eef4ff;
	color: #1d4ed8;
}

.wcpa-msg--success {
	background: #ecfdf3;
	color: #027a48;
}

.wcpa-msg--error {
	background: #fef2f2;
	color: #b42318;
}

.wcpa-msg--warning {
	background: #fffaeb;
	color: #b54708;
}

.wcpa-countdown {
	margin: 0 0 12px;
	font-size: 0.8rem;
	color: var(--wcpa-muted);
}

.wcpa-countdown.is-expired {
	color: #b42318;
	font-weight: 600;
}
