:root {
	--sol-primary: #6366f1;
	--sol-button: #6366f1;
	--sol-text: #1f2937;
	--sol-bg: #f8fafc;
	--sol-card: #ffffff;
	--sol-radius: 20px;
	--sol-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body.sol-auth-body,
.sol-auth-body {
	margin: 0;
	min-height: 100vh;
	font-family: Vazirmatn, Tahoma, sans-serif;
	background: var(--sol-bg);
	color: var(--sol-text);
	direction: rtl;
}

.sol-auth-body--fullscreen {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background:
		radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 40%),
		var(--sol-bg);
}

.sol-auth-body--embedded {
	min-height: auto;
	padding: 16px 0;
}

.sol-auth-app {
	width: 100%;
	max-width: 440px;
	position: relative;
}

.sol-auth-card {
	background: var(--sol-card);
	border-radius: var(--sol-radius);
	box-shadow: var(--sol-shadow);
	padding: 32px 28px;
	border: 1px solid rgba(148, 163, 184, 0.2);
}

.sol-auth-logo {
	text-align: center;
	margin-bottom: 20px;
}

.sol-auth-logo img {
	max-height: 56px;
	width: auto;
}

.sol-auth-header {
	text-align: center;
	margin-bottom: 24px;
}

.sol-auth-title {
	margin: 0 0 8px;
	font-size: 1.5rem;
	font-weight: 700;
}

.sol-auth-subtitle {
	margin: 0;
	color: #64748b;
	font-size: 0.95rem;
	line-height: 1.7;
}

/* Step visibility: default every step to hidden and only reveal the one
   step JS marks active. We do NOT rely solely on the native `hidden`
   attribute here — on some themes a generic content-area CSS reset (e.g.
   `.entry-content section, .elementor-widget-container * { display: block }`)
   loads with the same or higher specificity and, because it comes after the
   browser's built-in `[hidden]` rule in source order, wins and forces every
   step to render at once. Explicit `!important` rules below make step
   switching immune to that. */
.sol-auth-step {
	display: none !important;
}

.sol-auth-step.is-active {
	display: block !important;
}

.sol-auth-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sol-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sol-field label {
	font-size: 0.875rem;
	font-weight: 600;
}

.sol-field input,
.sol-field select {
	width: 100%;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px 14px;
	font: inherit;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.sol-field input:focus,
.sol-field select:focus {
	outline: none;
	border-color: var(--sol-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.sol-btn {
	border: 0;
	border-radius: 12px;
	padding: 12px 16px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s, opacity 0.15s;
}

.sol-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.sol-btn-primary {
	background: var(--sol-button);
	color: #fff;
}

.sol-btn-primary:not(:disabled):hover {
	transform: translateY(-1px);
}

.sol-btn-link {
	background: transparent;
	color: var(--sol-primary);
	padding: 8px 0;
}

.sol-auth-actions {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.sol-auth-alert {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 16px;
	font-size: 0.9rem;
}

.sol-auth-alert.is-success {
	background: #ecfdf5;
	color: #047857;
	border-color: #a7f3d0;
}

.sol-auth-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: blur(2px);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: var(--sol-radius);
	z-index: 10;
	/* Default to hidden. Some themes ship generic CSS resets (e.g. forcing
	   `display: block/flex` on content-area children) that can outrank the
	   browser's native `[hidden]` rule once our stylesheet loads after the
	   theme's. Setting `display: none` explicitly here — instead of relying
	   only on the native `[hidden]` behavior — and only switching to visible
	   through the `.is-active` class below (with `!important`) guarantees the
	   overlay can never get stuck on screen regardless of theme CSS. */
	display: none;
}

.sol-auth-overlay.is-active {
	display: flex !important;
}

/* Belt-and-braces: if for any reason the `.is-active` class toggle above is
   bypassed, still honor the native hidden attribute explicitly. */
.sol-auth-overlay[hidden] {
	display: none !important;
}

.sol-auth-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(99, 102, 241, 0.2);
	border-top-color: var(--sol-primary);
	border-radius: 50%;
	animation: sol-spin 0.8s linear infinite;
}

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

.sol-resend-timer {
	text-align: center;
	color: #64748b;
	font-size: 0.875rem;
	margin: 0;
}

.sol-auth-step--success {
	text-align: center;
	padding: 12px 0;
}

.sol-success-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: rgba(16, 185, 129, 0.12);
	color: #059669;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	font-weight: 700;
}

@media (max-width: 480px) {
	.sol-auth-card {
		padding: 24px 18px;
		border-radius: 16px;
	}
}
