/* ==========================================================================
   Premium Auth & Leads — Frontend Styles
   All colors/spacing driven by --pal-* CSS variables set from Admin > Design
   so nothing here needs editing to reskin the plugin.
   ========================================================================== */

.pal-auth-wrap,
.pal-popup-overlay,
.pal-popup-overlay * {
	box-sizing: border-box;
}

/* -----------------------------------------------------------------------
   Hard reset so the host theme's/WooCommerce's global button & input
   styles (borders, pill radius, focus outlines, box-shadows) can never
   bleed into the plugin's own buttons/inputs. Everything below this is
   redrawn intentionally from scratch.
   ----------------------------------------------------------------------- */
.pal-auth-wrap button,
.pal-auth-wrap input,
.pal-popup-overlay button,
.pal-popup-overlay input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	margin: 0;
	line-height: normal;
	box-shadow: none;
	text-shadow: none;
	text-transform: none;
	letter-spacing: normal;
}

.pal-auth-wrap button:focus,
.pal-auth-wrap input:focus,
.pal-popup-overlay button:focus,
.pal-popup-overlay input:focus {
	outline: none;
}

/* -----------------------------------------------------------------------
   Login / Register card
   ----------------------------------------------------------------------- */
.pal-auth-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
	font-family: var(--pal-font, inherit);
}

.pal-auth-card {
	width: 100%;
	max-width: 420px;
	background: var(--pal-bg, #fff);
	border-radius: var(--pal-border-radius, 12px);
	box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.06);
	padding: 32px;
	color: var(--pal-text, #0f172a);
}

.pal-tabs {
	position: relative;
	display: flex;
	background: #f1f5f9;
	border-radius: calc(var(--pal-border-radius, 12px) - 4px);
	padding: 4px;
	margin-bottom: 24px;
}

.pal-tab {
	flex: 1;
	position: relative;
	z-index: 2;
	background: transparent;
	border: 0;
	padding: 10px 12px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	color: #64748b;
	transition: color .2s ease;
	border-radius: inherit;
}

.pal-tab.is-active {
	color: var(--pal-primary, #2563eb);
}

.pal-tab-indicator {
	position: absolute;
	top: 4px;
	left: 4px;
	width: calc(50% - 4px);
	height: calc(100% - 8px);
	background: #fff;
	border-radius: calc(var(--pal-border-radius, 12px) - 6px);
	box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
	transition: transform .25s ease;
	z-index: 1;
}

.pal-tab-indicator[data-active="register"] {
	transform: translateX(100%);
}

.pal-form-title {
	margin: 0 0 20px;
	font-size: 20px;
	font-weight: 700;
}

.pal-form {
	display: none;
	flex-direction: column;
	gap: 16px;
}

.pal-form.is-active {
	display: flex;
}

.pal-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	position: relative;
}

.pal-label {
	font-size: 13px;
	font-weight: 600;
	color: #475569;
}

.pal-field input[type="text"],
.pal-field input[type="email"],
.pal-field input[type="password"] {
	padding: 12px 14px !important;
	border: 1.5px solid #e2e8f0 !important;
	border-radius: calc(var(--pal-border-radius, 12px) - 6px) !important;
	font-size: 14px;
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
	width: 100%;
	background: #fff !important;
	color: var(--pal-text, #0f172a) !important;
}

.pal-field input:focus {
	border-color: var(--pal-primary, #2563eb) !important;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
}

.pal-field-password .pal-toggle-pass {
	position: absolute;
	right: 12px;
	top: 34px;
	background: none;
	border: none;
	cursor: pointer;
	opacity: .6;
	font-size: 14px;
}

.pal-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #64748b;
}

.pal-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 20px !important;
	border-radius: calc(var(--pal-border-radius, 12px) - 4px) !important;
	font-weight: 700;
	font-size: 14px;
	border: none !important;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
	width: 100%;
}

.pal-btn-primary {
	background: var(--pal-primary, #2563eb) !important;
	color: #fff !important;
	box-shadow: 0 6px 18px rgba(37, 99, 235, .28) !important;
}

.pal-btn-primary:hover {
	background: var(--pal-primary-dark, #1d4ed8) !important;
	transform: translateY(-1px);
}

.pal-btn-primary:disabled {
	opacity: .7;
	cursor: not-allowed;
	transform: none;
}

.pal-btn-outline {
	background: transparent !important;
	border: 1.5px solid #e2e8f0 !important;
	color: var(--pal-text, #0f172a) !important;
}

.pal-btn-outline:hover {
	border-color: var(--pal-primary, #2563eb) !important;
	color: var(--pal-primary, #2563eb) !important;
}

.pal-auth-message {
	margin-bottom: 16px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
}

.pal-auth-message.is-error {
	background: #fef2f2;
	color: #b91c1c;
}

.pal-auth-message.is-success {
	background: #f0fdf4;
	color: #15803d;
}

.pal-logged-in {
	text-align: center;
}

.pal-logged-in-text {
	margin-bottom: 18px;
	font-size: 14px;
}

/* Spinner shown inside buttons while an AJAX request runs */
.pal-btn.is-loading .pal-btn-text {
	visibility: hidden;
	position: relative;
}

.pal-btn.is-loading {
	position: relative;
	color: transparent;
}

.pal-btn.is-loading::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	top: 50%;
	left: 50%;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(255, 255, 255, .5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: pal-spin .6s linear infinite;
}

@keyframes pal-spin {
	to { transform: rotate(360deg); }
}

/* -----------------------------------------------------------------------
   Popup / Lead magnet
   ----------------------------------------------------------------------- */
.pal-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
	font-family: var(--pal-font, inherit);
}

.pal-popup-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.pal-popup-card {
	width: 100%;
	max-width: 400px;
	background: var(--pal-bg, #fff) !important;
	border: none !important;
	border-radius: var(--pal-border-radius, 18px) !important;
	overflow: hidden;
	position: relative;
	transform: translateY(16px) scale(.98);
	transition: transform .3s cubic-bezier(.16, 1, .3, 1);
	box-shadow: 0 24px 70px rgba(0, 0, 0, .35), 0 4px 16px rgba(0, 0, 0, .15) !important;
}

.pal-popup-overlay.is-visible .pal-popup-card {
	transform: translateY(0) scale(1);
}

.pal-popup-close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, .28) !important;
	border: none !important;
	border-radius: 50% !important;
	color: #fff !important;
	width: 30px;
	height: 30px;
	min-width: 30px;
	padding: 0 !important;
	font-size: 16px;
	font-weight: 400;
	cursor: pointer;
	z-index: 3;
	transition: background .18s ease, transform .18s ease;
}

.pal-popup-close:hover {
	background: rgba(15, 23, 42, .5) !important;
	transform: scale(1.06);
}

.pal-popup-close:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, .5) !important;
}

.pal-popup-top {
	background: linear-gradient(135deg, var(--pal-primary, #2563eb), var(--pal-primary-dark, #1d4ed8) 55%, #0f172a);
	padding: 32px 28px 22px;
	text-align: center;
	position: relative;
}

.pal-popup-logo {
	max-height: 44px;
	max-width: 140px;
	margin: 0 auto 16px;
	display: block;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.pal-popup-logo-fallback {
	color: #fff;
	font-weight: 800;
	font-size: 19px;
	letter-spacing: .3px;
	margin-bottom: 14px;
}

.pal-popup-topbar-text {
	color: rgba(255, 255, 255, .88);
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: .2px;
	margin: 0;
}

.pal-popup-body {
	padding: 30px 30px 26px;
	text-align: center;
}

.pal-popup-title {
	font-size: 23px;
	font-weight: 800;
	letter-spacing: -.3px;
	margin: 0 0 10px;
	color: var(--pal-text, #0f172a);
	line-height: 1.25;
}

.pal-popup-subtitle {
	font-size: 14px;
	color: #64748b;
	margin: 0 0 22px;
	line-height: 1.55;
}

.pal-popup-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pal-popup-input {
	padding: 13px 16px !important;
	border: 1.5px solid #dde3ec !important;
	border-radius: calc(var(--pal-border-radius, 12px) - 4px) !important;
	background: #f8fafc !important;
	color: var(--pal-text, #0f172a) !important;
	font-size: 14px;
	width: 100%;
	transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.pal-popup-input::placeholder {
	color: #94a3b8;
}

.pal-popup-input:focus {
	border-color: var(--pal-primary, #2563eb) !important;
	background: #fff !important;
	box-shadow: 0 0 0 3.5px rgba(37, 99, 235, .14) !important;
}

.pal-popup-btn {
	margin-top: 2px;
}

.pal-popup-disclaimer {
	margin: 18px 0 0;
	font-size: 11.5px;
	color: #94a3b8;
	line-height: 1.6;
}

.pal-popup-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #15803d;
	border-radius: calc(var(--pal-border-radius, 12px) - 4px);
	padding: 16px;
	font-size: 14px;
	font-weight: 600;
}

.pal-popup-success strong {
	display: inline-block;
	margin-left: 4px;
	letter-spacing: .6px;
	background: rgba(21, 128, 61, .1);
	padding: 2px 8px;
	border-radius: 5px;
}

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