/**
 * Oxin Login — the sign-in form.
 *
 * Everything is scoped under .oxl. Themes restyle through the variables:
 *   .oxl { --oxl-accent: #0D9488; --oxl-radius: 12px; }
 * Fonts are inherited from the theme.
 */

.oxl {
	--oxl-accent: #0D9488;
	--oxl-accent-hover: #0F766E;
	--oxl-accent-soft: #CCFBF1;
	--oxl-text: #1F2937;
	--oxl-muted: #6B7280;
	--oxl-placeholder: #9CA3AF;
	--oxl-border: #D1D5DB;
	--oxl-bg: #FFFFFF;
	--oxl-error: #B91C1C;
	--oxl-error-bg: #FEF2F2;
	--oxl-info-bg: #F0FDFA;
	--oxl-radius: 12px;

	box-sizing: border-box;
	/* A definite width: inside a theme's flex/grid layout a percentage alone can collapse. */
	width: 420px;
	max-width: 100%;
	margin: 0 auto;
	color: var(--oxl-text);
	font: inherit;
	line-height: 1.7;
	text-align: right;
}

.oxl *,
.oxl *::before,
.oxl *::after {
	box-sizing: inherit;
}

.oxl .oxl-card {
	background: var(--oxl-bg);
	border: 1px solid var(--oxl-border);
	border-radius: var(--oxl-radius);
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.oxl--modal .oxl-card {
	border: 0;
	box-shadow: none;
}

.oxl .oxl-step {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
}

.oxl .oxl-step[hidden] {
	display: none;
}

.oxl .oxl-title {
	margin: 0 0 2px;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.5;
	color: var(--oxl-text);
}

.oxl .oxl-lead {
	margin: 0 0 6px;
	font-size: 0.9rem;
	color: var(--oxl-muted);
}

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

.oxl .oxl-input {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	box-shadow: none;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--oxl-border);
	border-radius: calc(var(--oxl-radius) - 4px);
	background: #fff;
	color: var(--oxl-text);
	font: inherit;
	font-size: 1rem;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.oxl .oxl-input::placeholder {
	color: var(--oxl-placeholder);
	opacity: 1; /* Firefox fades placeholders on its own. */
}

.oxl .oxl-input:focus {
	outline: none;
	border-color: var(--oxl-accent);
	box-shadow: 0 0 0 3px var(--oxl-accent-soft);
}

.oxl .oxl-ltr {
	direction: ltr;
	text-align: left;
}

.oxl .oxl-code {
	font-size: 1.5rem;
	letter-spacing: 0.4em;
	text-align: center;
}

.oxl .oxl-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	cursor: pointer;
}

.oxl .oxl-check input {
	accent-color: var(--oxl-accent);
}

.oxl .oxl-button {
	display: block;
	width: 100%;
	height: auto;
	min-height: 46px;
	line-height: 1.5;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	margin-top: 4px;
	padding: 10px 16px;
	border: 0;
	border-radius: calc(var(--oxl-radius) - 4px);
	background: var(--oxl-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s;
}

.oxl .oxl-button:hover,
.oxl .oxl-button:focus,
.oxl .oxl-button:focus-visible {
	background: var(--oxl-accent-hover);
	color: #fff;
}

.oxl .oxl-button:disabled {
	opacity: 0.6;
	cursor: wait;
}

.oxl .oxl-busy .oxl-button {
	position: relative;
	color: transparent;
}

.oxl .oxl-busy .oxl-button::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 20px;
	height: 20px;
	margin: auto;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: oxl-spin 0.7s linear infinite;
}

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

.oxl .oxl-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 6px 16px;
	margin: 4px 0 0;
	font-size: 0.85rem;
}

.oxl .oxl-link {
	display: inline;
	width: auto;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	line-height: inherit;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	border-radius: 0;
	border: 0;
	background: none;
	color: var(--oxl-accent);
	font: inherit;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.oxl .oxl-link:disabled {
	color: var(--oxl-muted);
	text-decoration: none;
	cursor: default;
}

.oxl .oxl-alert {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: calc(var(--oxl-radius) - 4px);
	font-size: 0.875rem;
}

.oxl .oxl-alert--error {
	background: var(--oxl-error-bg);
	color: var(--oxl-error);
}

.oxl .oxl-alert--info {
	background: var(--oxl-info-bg);
	color: var(--oxl-accent-hover);
}

.oxl .oxl-captcha {
	min-height: 78px;
}

.oxl .oxl-captcha[hidden] {
	display: none;
}

.oxl.oxl--account {
	width: auto;
	max-width: 100%;
	margin: 0 0 24px;
}

.oxl .oxl-step--separate {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--oxl-border);
}

.oxl .oxl-badge {
	display: inline-block;
	margin-inline-start: 6px;
	padding: 1px 8px;
	border-radius: 999px;
	background: #FEF3C7;
	color: #92400E;
	font-size: 12px;
	line-height: 1.7;
	vertical-align: middle;
}

.oxl .oxl-step--notice {
	margin-bottom: 20px;
	padding: 12px 14px;
	border-radius: calc(var(--oxl-radius) - 4px);
	background: #FFFBEB;
	border: 1px solid #FDE68A;
}

.oxl .oxl-step--notice .oxl-lead {
	margin-top: 0;
}

.oxl-checkout-required {
	margin: 0 0 16px;
	text-align: center;
}

/* The /login page */

.oxl-page {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	flex: 1 1 100%;
	grid-column: 1 / -1;
	padding: 48px 16px;
}

/* The popup */

.oxl-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

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

.oxl-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
}

.oxl-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	border-radius: 12px;
	background: #fff;
}

.oxl-modal .oxl-modal__close {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	min-height: 0;
	padding: 0;
	box-shadow: none;
	color: #6B7280;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.oxl-modal .oxl-modal__close:hover {
	background: #F3F4F6;
}

html.oxl-lock,
html.oxl-lock body {
	overflow: hidden;
}

.oxl-open {
	cursor: pointer;
}

@media (max-width: 480px) {
	.oxl .oxl-card {
		padding: 18px;
	}

	.oxl-page {
		padding: 24px 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.oxl .oxl-busy .oxl-button::after {
		animation-duration: 2s;
	}
}
