/* Afarin Store — OTP auth */

body.af-account-auth-page {
	background: #f8fdfe;
}

body.af-account-auth-page .site-content--account {
	padding: 12px 0 28px;
	max-width: none;
}

body.af-account-auth-page .woocommerce {
	width: 100%;
}

body.af-account-auth-page .woocommerce > .woocommerce-notices-wrapper:first-child {
	display: none;
}

body.af-account-auth-page .afac__guest-wrap {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	width: 100%;
	max-width: 520px;
	min-height: auto;
	margin-inline: auto;
	padding: clamp(12px, 3vw, 24px) 16px;
}

body.af-account-auth-page .afac-auth__notices {
	margin-bottom: 14px;
}

body.af-account-auth-page .afac-auth__notices:empty {
	display: none;
	margin: 0;
}

body.af-account-auth-page .afac-auth__notices .woocommerce-notices-wrapper {
	margin: 0;
}

body.af-account-auth-page .afac-auth__notices .woocommerce-message,
body.af-account-auth-page .afac-auth__notices .woocommerce-info,
body.af-account-auth-page .afac-auth__notices .woocommerce-error {
	margin: 0 0 10px;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1.6;
}

body.af-account-auth-page .afac-auth__notices .woocommerce-message {
	border: 1px solid rgba(46, 184, 201, 0.35);
	background: var(--af-primary-soft);
	color: var(--af-primary-dark);
}

body.af-account-auth-page .afac-auth__notices .woocommerce-error {
	border: 1px solid rgba(220, 38, 38, 0.2);
	background: rgba(254, 226, 226, 0.65);
	color: #991b1b;
}

.afac-auth--otp {
	position: relative;
	width: 100%;
	max-width: none;
	margin: 0;
}

.af-otp-auth__bg {
	position: absolute;
	inset: -24px -12px auto;
	height: 220px;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

.af-otp-auth__orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(40px);
	opacity: 0.55;
}

.af-otp-auth__orb--1 {
	inset: -20px auto auto 10%;
	width: 180px;
	height: 180px;
	background: var(--af-primary-soft);
}

.af-otp-auth__orb--2 {
	inset: 20px 8% auto auto;
	width: 120px;
	height: 120px;
	background: rgba(46, 184, 201, 0.12);
}

.af-otp-auth__card {
	position: relative;
	z-index: 1;
	padding: clamp(22px, 3.5vw, 30px);
	border-radius: 22px;
	border: 1px solid rgba(46, 184, 201, 0.12);
	background: #fff;
	box-shadow: 0 18px 48px rgba(30, 41, 59, 0.08);
}

.af-otp-auth__head.afac-auth__head {
	margin-bottom: 22px;
	padding-bottom: 16px;
}

.afac-auth__head {
	position: relative;
	text-align: center;
}

.afac-auth__head-bg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: clamp(2.4rem, 8vw, 3.4rem);
	font-weight: 900;
	letter-spacing: 0.08em;
	color: rgba(46, 184, 201, 0.08);
	pointer-events: none;
	user-select: none;
}

.afac-auth__head-content {
	position: relative;
	z-index: 1;
}

.afac-auth__head-eyebrow {
	display: inline-block;
	margin-bottom: 8px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--af-primary-soft);
	color: var(--af-primary-dark);
	font-size: 0.72rem;
	font-weight: 800;
}

.afac-auth__head-title {
	margin: 0 0 8px;
	font-size: clamp(1.2rem, 2.6vw, 1.45rem);
	font-weight: 900;
	color: var(--af-text);
}

.afac-auth__head-desc {
	margin: 0;
	color: var(--af-muted);
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.7;
}

.af-otp-auth__alert {
	margin-bottom: 14px;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1.6;
}

.af-otp-auth__alert--error {
	border: 1px solid rgba(220, 38, 38, 0.2);
	background: rgba(254, 226, 226, 0.65);
	color: #991b1b;
}

.af-otp-auth__alert--success {
	border: 1px solid rgba(22, 163, 74, 0.2);
	background: rgba(220, 252, 231, 0.75);
	color: #166534;
}

.af-otp-auth__panel {
	display: none;
}

.af-otp-auth__panel.is-active {
	display: block;
}

.af-otp-auth__label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.84rem;
	font-weight: 800;
	color: var(--af-text);
}

.af-otp-auth__input {
	width: 100%;
	min-height: 50px;
	margin-bottom: 12px;
	padding: 12px 14px;
	border: 1.5px solid var(--af-border);
	border-radius: 12px;
	background: #fafaf9;
	font: inherit;
	font-size: max(16px, 0.95rem);
	font-weight: 700;
	color: var(--af-text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.af-otp-auth__input:focus {
	outline: none;
	border-color: rgba(46, 184, 201, 0.55);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(46, 184, 201, 0.12);
}

.af-otp-auth__hint {
	margin: 0 0 18px;
	color: var(--af-muted);
	font-size: 0.84rem;
	font-weight: 600;
	line-height: 1.7;
}

.af-otp-auth__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	margin-top: 6px;
	padding: 12px 18px;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--af-primary), var(--af-primary-dark));
	color: #fff;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 900;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(46, 184, 201, 0.28);
	transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.af-otp-auth__submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px rgba(46, 184, 201, 0.34);
}

.af-otp-auth__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

.af-otp-auth__sent {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 6px;
	margin: 0 0 16px;
	color: var(--af-muted);
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.7;
	text-align: center;
}

.af-otp-auth__sent strong {
	color: var(--af-text);
	font-weight: 900;
}

.af-otp-auth__edit-phone {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--af-primary-dark);
	font: inherit;
	font-size: 0.84rem;
	font-weight: 800;
	cursor: pointer;
	text-decoration: underline;
}

.af-otp-auth__otp {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 18px;
	direction: ltr;
}

.af-otp-auth__otp-digit {
	width: 100%;
	min-height: 54px;
	padding: 0;
	border: 1.5px solid var(--af-border);
	border-radius: 12px;
	background: #fafaf9;
	font: inherit;
	font-size: max(18px, 1.35rem);
	font-weight: 900;
	text-align: center;
	color: var(--af-text);
}

.af-otp-auth__otp-digit:focus {
	outline: none;
	border-color: rgba(46, 184, 201, 0.55);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(46, 184, 201, 0.12);
}

.af-otp-auth__resend {
	margin: 14px 0 0;
	text-align: center;
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--af-muted);
}

.af-otp-auth__resend-btn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--af-primary-dark);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.af-otp-auth__resend-btn:disabled {
	color: var(--af-muted);
	cursor: not-allowed;
}

.af-otp-auth__timer {
	margin-inline-start: 4px;
}

.af-otp-auth__loading {
	position: absolute;
	inset: 0;
	align-items: center;
	justify-content: center;
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(2px);
	z-index: 5;
}

.af-otp-auth__loading:not([hidden]) {
	display: flex;
}

.af-otp-auth__spinner {
	width: 34px;
	height: 34px;
	border: 3px solid rgba(46, 184, 201, 0.25);
	border-top-color: var(--af-primary-dark);
	border-radius: 50%;
	animation: af-otp-spin 0.8s linear infinite;
}

.af-otp-auth.is-loading .af-otp-auth__submit {
	pointer-events: none;
	opacity: 0.7;
}

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

@media (max-width: 768px) {
	body.af-account-auth-page .site-content--account {
		padding: 8px 0 24px;
	}

	body.af-account-auth-page .afac__guest-wrap {
		padding-inline: 12px;
	}

	.af-otp-auth__bg {
		inset: -10px -6px auto;
		height: 150px;
	}

	.af-otp-auth__orb--1 {
		width: 130px;
		height: 130px;
	}

	.af-otp-auth__orb--2 {
		width: 90px;
		height: 90px;
	}

	.af-otp-auth__card {
		padding: 18px 14px;
		border-radius: 18px;
	}

	.af-otp-auth__head.afac-auth__head {
		margin-bottom: 18px;
		padding-bottom: 12px;
	}

	.afac-auth__head-bg {
		font-size: 2rem;
	}

	.afac-auth__head-title {
		font-size: 1.15rem;
	}

	.afac-auth__head-desc,
	.af-otp-auth__hint,
	.af-otp-auth__sent {
		font-size: 0.82rem;
	}

	.af-otp-auth__sent {
		flex-direction: column;
		gap: 6px;
	}

	.af-otp-auth__otp {
		gap: 8px;
	}

	.af-otp-auth__otp-digit {
		min-height: 50px;
		border-radius: 10px;
	}

	.af-otp-auth__submit {
		min-height: 48px;
		font-size: 0.88rem;
	}
}

@media (max-width: 380px) {
	body.af-account-auth-page .afac__guest-wrap {
		padding-inline: 10px;
	}

	.af-otp-auth__card {
		padding: 16px 12px;
	}

	.af-otp-auth__otp {
		gap: 6px;
	}

	.af-otp-auth__otp-digit {
		min-height: 46px;
		font-size: 1.15rem;
	}
}
