/* Self-contained styles for login/signup/forgot/logout. Linked from the page fragments
   themselves because tenant sites (custom header) do not load page.css. Everything is
   scoped under .shopleaf-auth so it cannot leak into tenant styling. */

.shopleaf-auth {
	--shopleaf-auth-surface: rgba(11, 17, 12, 0.92);
	--shopleaf-auth-text: #ffffff;
	--shopleaf-auth-muted: rgba(255, 255, 255, 0.72);
	--shopleaf-auth-accent: var(--primary, #1b810d);
	position: relative;
	clear: both;
	box-sizing: border-box;
	width: 100%;
	min-height: calc(100vh - 60px);
	margin: 0;
	padding: 80px 24px;
	display: grid !important;
	place-items: center;
	background-color: #1a1f1b;
	background-size: cover;
	background-position: center;
	isolation: isolate;
	visibility: visible !important;
	opacity: 1 !important;
}

.shopleaf-auth *,
.shopleaf-auth *::before,
.shopleaf-auth *::after {
	box-sizing: border-box;
}

.shopleaf-auth .shopleaf-auth-overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(0, 0, 0, 0.56);
}

.shopleaf-auth .shopleaf-auth-card {
	display: block !important;
	width: min(600px, 100%);
	margin: 0;
	padding: 36px;
	position: relative;
	z-index: 10;
	color: var(--shopleaf-auth-text);
	background: var(--shopleaf-auth-surface);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.46);
	backdrop-filter: blur(14px);
	text-align: left;
	visibility: visible !important;
	opacity: 1 !important;
	transform: none !important;
}

.shopleaf-auth .shopleaf-auth-card h1 {
	display: block !important;
	margin: 0 0 26px;
	padding: 0;
	color: var(--shopleaf-auth-text);
	font-size: 2rem;
	line-height: 1.1;
	text-align: center;
	text-transform: none;
	visibility: visible !important;
	opacity: 1 !important;
	transform: none !important;
}

.shopleaf-auth .shopleaf-auth-card label {
	display: block !important;
	margin: 16px 0 6px;
	padding: 0;
	color: var(--shopleaf-auth-muted);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	visibility: visible !important;
	opacity: 1 !important;
}

.shopleaf-auth .shopleaf-auth-card input {
	display: block !important;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 13px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 6px;
	outline: 0;
	color: var(--shopleaf-auth-text);
	background: rgba(0, 0, 0, 0.22);
	font: inherit;
	font-size: 1rem;
	visibility: visible !important;
	opacity: 1 !important;
	-webkit-appearance: none;
	appearance: none;
}

.shopleaf-auth .shopleaf-auth-card input::placeholder {
	color: rgba(255, 255, 255, 0.45);
}

.shopleaf-auth .shopleaf-auth-card input:focus {
	border-color: var(--shopleaf-auth-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--shopleaf-auth-accent) 28%, transparent);
}

.shopleaf-auth .shopleaf-auth-card input.error {
	border-color: #e5484d;
}

.shopleaf-auth .shopleaf-auth-toggle-row {
	display: flex !important;
	align-items: center;
	gap: 14px;
	margin: 18px 0;
}

.shopleaf-auth .shopleaf-auth-toggle-row label {
	display: inline-block !important;
	width: auto;
	margin: 0;
	text-transform: none;
	letter-spacing: 0;
	font-size: 0.85rem;
}

.shopleaf-auth .shopleaf-auth-toggle-row .toggle {
	flex: 0 0 auto;
	width: 80px;
	height: 40px;
	margin: 0;
	position: relative;
	display: inline-block !important;
	border-radius: 100px;
	background-color: #050505;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.shopleaf-auth .shopleaf-auth-toggle-row .toggle.on {
	background-color: var(--shopleaf-auth-accent);
}

.shopleaf-auth .shopleaf-auth-toggle-row .toggle .sl-toggle-switch {
	position: absolute;
	top: 5px;
	left: 5px;
	z-index: 10;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: #fff;
	transition: left 150ms ease;
}

.shopleaf-auth .shopleaf-auth-toggle-row .toggle.on .sl-toggle-switch {
	left: 46px;
}

.shopleaf-auth .shopleaf-auth-toggle-row .toggle .sl-toggle-label {
	position: absolute;
	right: 10px;
	z-index: 8;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 40px;
	text-transform: uppercase;
}

.shopleaf-auth .shopleaf-auth-toggle-row .toggle.on .sl-toggle-label {
	left: 10px;
	right: auto;
}

.shopleaf-auth .shopleaf-auth-toggle-row .toggle .sl-toggle-label::before {
	content: "NO";
}

.shopleaf-auth .shopleaf-auth-toggle-row .toggle.on .sl-toggle-label::before {
	content: "YES";
}

.shopleaf-auth .shopleaf-auth-card .shopleaf-auth-button {
	display: block !important;
	width: 100%;
	min-height: 48px;
	margin: 18px 0 0;
	padding: 0 16px;
	border: 0;
	border-radius: 6px;
	color: #fff;
	background: var(--shopleaf-auth-accent);
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	line-height: 48px;
	cursor: pointer;
	visibility: visible !important;
	opacity: 1 !important;
}

.shopleaf-auth .shopleaf-auth-card .shopleaf-auth-button:hover {
	filter: brightness(1.1);
}

.shopleaf-auth .shopleaf-auth-note {
	display: block !important;
	margin-top: 18px;
	color: var(--shopleaf-auth-muted);
	font-size: 0.85rem;
	line-height: 1.55;
	text-align: center;
	visibility: visible !important;
	opacity: 1 !important;
}

.shopleaf-auth .shopleaf-auth-note a {
	color: var(--shopleaf-auth-text);
	text-decoration: underline;
}

@media (max-width: 600px) {
	.shopleaf-auth {
		padding: 48px 16px;
	}

	.shopleaf-auth .shopleaf-auth-card {
		padding: 28px 24px;
	}
}
