/**
 * Lunaria Social Login — front-end styles.
 * Colour tokens are injected as CSS variables (see LSL_Assets::inline_css).
 */

.lsl-social {
	--lsl-primary: #1e3347;
	--lsl-primary-dark: #152536;
	--lsl-accent: #c9a96e;
	--lsl-border: #e6e0d6;
	--lsl-muted: #777;
	--lsl-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-family: var(--lsl-font);
	width: 100%;
	margin: 0 0 1rem;
}

.lsl-social--below {
	margin: 1rem 0 0;
}

.lsl-social__buttons {
	display: grid;
	gap: 0.6rem;
}

/* Buttons */
.lsl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	width: 100%;
	min-height: 48px;
	padding: 0.7rem 1.1rem;
	border: 1px solid var(--lsl-border);
	border-radius: 6px;
	background: #fff;
	color: var(--lsl-primary);
	font-family: var(--lsl-font);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.05s ease;
	-webkit-appearance: none;
	appearance: none;
}

.lsl-btn:hover {
	border-color: #cfc6b6;
	box-shadow: 0 6px 18px rgba(30, 51, 71, 0.08);
}

.lsl-btn:active {
	transform: translateY(1px);
}

.lsl-btn:focus-visible {
	outline: 2px solid var(--lsl-accent);
	outline-offset: 2px;
}

.lsl-btn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.lsl-btn__label {
	white-space: nowrap;
}

.lsl-btn--google {
	color: #3c4043;
}

.lsl-btn--phone {
	color: var(--lsl-primary);
}

.lsl-btn--primary {
	background: var(--lsl-primary);
	border-color: var(--lsl-primary);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.lsl-btn--primary:hover {
	background: var(--lsl-primary-dark);
	border-color: var(--lsl-primary-dark);
	box-shadow: none;
	color: #fff;
}

.lsl-btn--block {
	width: 100%;
}

.lsl-btn[disabled],
.lsl-btn.is-loading {
	opacity: 0.65;
	pointer-events: none;
}

.lsl-btn.is-loading {
	position: relative;
	color: transparent !important;
}

.lsl-btn.is-loading::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: lsl-spin 0.7s linear infinite;
}

.lsl-btn--google.is-loading::after,
.lsl-btn--phone.is-loading::after {
	border: 2px solid rgba(30, 51, 71, 0.25);
	border-top-color: var(--lsl-primary);
}

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

/* Divider */
.lsl-social__divider {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin: 1rem 0;
	color: var(--lsl-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.lsl-social__divider::before,
.lsl-social__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--lsl-border);
}

/* Modal */
.lsl-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	font-family: var(--lsl-font, "Inter", system-ui, sans-serif);
}

.lsl-modal[hidden] {
	display: none;
}

.lsl-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(21, 37, 54, 0.55);
	backdrop-filter: blur(2px);
	animation: lsl-fade 0.2s ease;
}

.lsl-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 30px 80px rgba(21, 37, 54, 0.35);
	padding: 2rem 1.75rem 1.5rem;
	animation: lsl-pop 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
}

@keyframes lsl-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes lsl-pop {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

.lsl-modal__close {
	position: absolute;
	top: 0.6rem;
	right: 0.75rem;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	color: #9aa3ad;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.15s ease, color 0.15s ease;
}

.lsl-modal__close:hover {
	background: #f4f1ec;
	color: var(--lsl-primary, #1e3347);
}

.lsl-modal__brand {
	display: flex;
	justify-content: center;
	margin-bottom: 0.85rem;
}

.lsl-modal__brand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #f5f0e8;
	color: var(--lsl-primary, #1e3347);
}

.lsl-modal__brand-icon svg {
	width: 24px;
	height: 24px;
}

.lsl-modal__title {
	margin: 0 0 1.1rem;
	text-align: center;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.6rem;
	font-weight: 600;
	color: var(--lsl-primary, #1e3347);
}

.lsl-modal__feedback {
	margin: 0 0 1rem;
	padding: 0.7rem 0.9rem;
	border-radius: 6px;
	font-size: 0.8125rem;
	line-height: 1.5;
	border: 1px solid #e8cfc9;
	background: #faf0ee;
	color: #9a4a42;
}

.lsl-modal__feedback[hidden] {
	display: none;
}

.lsl-modal__feedback.is-success {
	border-color: #c8dccf;
	background: #edf5ef;
	color: #2f6b4a;
}

.lsl-modal__feedback.is-info {
	border-color: #d7cdb9;
	background: #f7f4ef;
	color: #6a5a3a;
}

/* Fields */
.lsl-field__label {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--lsl-primary, #1e3347);
}

.lsl-input {
	width: 100%;
	min-height: 48px;
	padding: 0.7rem 0.9rem;
	margin-bottom: 0.85rem;
	border: 1px solid var(--lsl-border, #e6e0d6);
	border-radius: 6px;
	background: #fff;
	font-family: var(--lsl-font, inherit);
	font-size: 0.95rem;
	color: #111;
	box-sizing: border-box;
}

.lsl-input:focus {
	outline: none;
	border-color: var(--lsl-primary, #1e3347);
	box-shadow: 0 0 0 2px rgba(30, 51, 71, 0.12);
}

.lsl-hint {
	margin: -0.35rem 0 1rem;
	font-size: 0.78rem;
	color: var(--lsl-muted, #777);
}

.lsl-step__lead {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	line-height: 1.55;
	color: #444;
	text-align: center;
}

.lsl-step__lead strong {
	color: var(--lsl-primary, #1e3347);
}

/* OTP boxes */
.lsl-otp {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin: 0 0 1.15rem;
}

.lsl-otp__box {
	width: 44px;
	height: 54px;
	padding: 0;
	text-align: center;
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--lsl-primary, #1e3347);
	border: 1px solid var(--lsl-border, #e6e0d6);
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lsl-otp__box:focus {
	outline: none;
	border-color: var(--lsl-primary, #1e3347);
	box-shadow: 0 0 0 2px rgba(30, 51, 71, 0.15);
}

.lsl-otp__box.is-filled {
	border-color: var(--lsl-accent, #c9a96e);
}

.lsl-step__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.9rem;
}

.lsl-link {
	border: none;
	background: none;
	padding: 0;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--lsl-primary, #1e3347);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.lsl-link:hover {
	color: var(--lsl-accent, #c9a96e);
}

.lsl-link[disabled] {
	color: #b3aca0;
	cursor: default;
	text-decoration: none;
}

.lsl-modal__legal {
	margin: 1.1rem 0 0;
	text-align: center;
	font-size: 0.72rem;
	line-height: 1.5;
	color: var(--lsl-muted, #999);
}

.lsl-shortcode-title {
	margin: 0 0 1rem;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.4rem;
	color: var(--lsl-primary, #1e3347);
}

/* Small screens */
@media (max-width: 420px) {
	.lsl-otp__box {
		width: 38px;
		height: 48px;
		font-size: 1.15rem;
	}

	.lsl-modal__dialog {
		padding: 1.75rem 1.25rem 1.25rem;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.lsl-modal__overlay,
	.lsl-modal__dialog,
	.lsl-btn.is-loading::after {
		animation: none;
	}
}
