/* Nersi Store — OTP auth */

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

body.ns-account-auth-page .ns-account__guest-wrap {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: calc(100dvh - 180px);
	max-width: 520px;
	margin-inline: auto;
	padding-block: clamp(16px, 4vw, 32px);
}

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

body.ns-account-auth-page .ns-account-auth__notices .woocommerce-message,
body.ns-account-auth-page .ns-account-auth__notices .woocommerce-info,
body.ns-account-auth-page .ns-account-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.ns-account-auth-page .ns-account-auth__notices .woocommerce-message {
	border: 1px solid rgba(245, 184, 0, 0.35);
	background: rgba(245, 184, 0, 0.1);
	color: var(--ns-brand-deep);
}

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

.ns-account-auth--otp {
	position: relative;
	max-width: 480px;
	margin: 0 auto;
}

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

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

.ns-otp-auth__orb--1 {
	inset: -20px auto auto 10%;
	width: 180px;
	height: 180px;
	background: var(--ns-brand-glow);
}

.ns-otp-auth__orb--2 {
	inset: 20px 8% auto auto;
	width: 120px;
	height: 120px;
	background: rgba(26, 26, 26, 0.08);
}

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

.ns-otp-auth__head.ns-account-auth__head {
	margin-bottom: 22px;
	padding-bottom: 16px;
}

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

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

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

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

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

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

.ns-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: 0.95rem;
	font-weight: 700;
	color: var(--af-text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

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

.ns-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(--ns-brand-bright), var(--ns-brand-dark));
	color: var(--ns-black);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 900;
	cursor: pointer;
	box-shadow: 0 10px 24px var(--ns-brand-glow);
	transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ns-otp-auth__submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px var(--ns-brand-glow);
}

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

.ns-otp-auth__sent {
	margin: 0 0 16px;
	color: var(--af-muted);
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.7;
	text-align: center;
}

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

.ns-otp-auth__edit-phone {
	margin-inline-start: 6px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ns-brand-deep);
	font: inherit;
	font-size: 0.84rem;
	font-weight: 800;
	cursor: pointer;
	text-decoration: underline;
}

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

.ns-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: 1.35rem;
	font-weight: 900;
	text-align: center;
	color: var(--af-text);
}

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

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

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

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

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

.ns-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;
}

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

.ns-otp-auth__spinner {
	width: 34px;
	height: 34px;
	border: 3px solid rgba(245, 184, 0, 0.25);
	border-top-color: var(--ns-brand-deep);
	border-radius: 50%;
	animation: ns-otp-spin 0.8s linear infinite;
}

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

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

@media (max-width: 600px) {
	body.ns-account-auth-page .ns-account__guest-wrap {
		width: 92%;
		max-width: none;
		min-height: calc(100dvh - 140px);
	}

	.ns-otp-auth__card {
		padding: 20px 16px;
	}
}
