/**
 * AJAX auth block styles.
 *
 * @package wd-drilldown-menu
 */

.wd-lr-wrap {
	width: 100%;
}

.wd-lr-block {
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
}

/* ── State-driven panel visibility ────────────────────────────────────
 * Panels are hidden by default. Only the panel matching the active
 * state on the block container is shown. This avoids relying on the
 * HTML hidden attribute which Woodmart/WooCommerce CSS overrides.
 * ──────────────────────────────────────────────────────────────────── */
.wd-lr-block .wd-lr-section {
	display: none;
}

.wd-lr-block[data-active-state="login"] .wd-lr-section--login,
.wd-lr-block[data-active-state="register"] .wd-lr-section--register,
.wd-lr-block[data-active-state="forgot-password"] .wd-lr-section--forgot-password,
.wd-lr-block[data-active-state="reset-password"] .wd-lr-section--reset-password {
	display: block;
}

/* Notices and field errors: class-based toggle instead of hidden attr */
.wd-lr-block .wd-lr-notices.wd-lr-hidden,
.wd-lr-block .wd-lr-field-error.wd-lr-hidden {
	display: none;
}

.wd-lr-notices {
	margin-bottom: 18px;
}

.wd-lr-notice {
	padding: 12px 14px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	border: 1px solid transparent;
}

.wd-lr-notice--success {
	background: rgba(126, 185, 52, 0.12);
	border-color: rgba(126, 185, 52, 0.35);
	color: var(--wd-success-color, #2d6a1f);
}

.wd-lr-notice--error {
	background: rgba(209, 67, 67, 0.1);
	border-color: rgba(209, 67, 67, 0.3);
	color: var(--wd-warning-color, #9c2323);
}

.wd-lr-notice--info {
	background: rgba(33, 150, 243, 0.08);
	border-color: rgba(33, 150, 243, 0.22);
	color: var(--wd-primary-color, #1b5e9a);
}

.wd-lr-field {
	margin-bottom: 14px;
}

.wd-lr-field:last-child {
	margin-bottom: 0;
}

.wd-lr-field-error {
	margin: -4px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--wd-warning-color, #9c2323);
}

.wd-lr-field.has-error input[type="email"],
.wd-lr-field.has-error input[type="password"],
.wd-lr-field.has-error input[type="text"] {
	border-color: rgba(209, 67, 67, 0.5);
}

.wd-lr-login-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 6px;
}

.wd-lr-login-actions .button,
.wd-lr-section .button,
.wd-lr-section .woocommerce-button,
.wd-lr-section .woocommerce-Button {
	min-width: 160px;
}

.wd-lr-inline-links {
	margin-top: 12px;
}

.wd-lr-social-auth {
	margin-top: 22px;
}

.wd-lr-social-auth .wd-login-divider {
	margin: 0 0 15px;
}

.wd-lr-social-auth .wd-social-login .btn {
	min-width: 0;
	text-align: center;
}

.wd-lr-toggle {
	text-align: center;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--wd-line-color, #e9ecef);
	font-size: 14px;
	color: var(--wd-text-color, #6c757d);
	line-height: 1.5;
}

.wd-lr-toggle-link {
	color: var(--wd-link-color, #333);
	font-weight: 600;
	text-decoration: none;
	margin-left: 4px;
	transition: color 0.2s ease, text-decoration 0.2s ease;
}

.wd-lr-toggle-link:hover,
.wd-lr-toggle-link:focus {
	color: var(--wd-link-color-hover, #7eb934);
	text-decoration: underline;
}

.wd-age-declaration-row .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.55em;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.45;
}

.wd-age-declaration-row .woocommerce-form__input-checkbox {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	cursor: pointer;
	accent-color: var(--wd-btn-background-1, #333);
}

.wd-lr-form.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.wd-lr-form.is-loading button {
	cursor: wait;
}

.wd-lr-no-js {
	margin-top: 16px;
	font-size: 13px;
	color: var(--wd-warning-color, #9c2323);
}

@media (max-width: 480px) {
	.wd-lr-block {
		max-width: 100%;
	}

	.wd-lr-login-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.wd-lr-login-actions .button,
	.wd-lr-section .button,
	.wd-lr-section .woocommerce-button,
	.wd-lr-section .woocommerce-Button {
		width: 100%;
	}

	.wd-lr-social-auth .wd-social-login .btn {
		flex-basis: 100%;
	}
}
