/**
 * NexaShop Smart Authentication Stylesheet
 * Matches exact UI/UX from media_1790234698116.png:
 * - Rounded card with top-left rounded-square close button
 * - Phone input with Iran Flag + +98 white pill on the LEFT and phone field on the RIGHT
 * - Crimson (#c53d43) full-width submit button "ادامه «"
 * - Opposite side-by-side links under password field: "فراموشی رمز عبور" & "ورود با کد یکبار مصرف"
 * - Fullscreen standalone headerless/footerless mode for My Account login page
 */

:root {
	--nexashop-auth-primary: #c53d43;
	--nexashop-auth-primary-hover: #b03238;
	--nexashop-auth-radius: 28px;
	--nexashop-auth-card-bg: #ffffff;
	--nexashop-auth-border: #e2e8f0;
}

/* ==========================================================================
   Full-Screen Headerless / Footerless Canvas Mode (when selected in Theme Options)
   ========================================================================== */
body.nexashop-fullscreen-auth-canvas header,
body.nexashop-fullscreen-auth-canvas footer,
body.nexashop-fullscreen-auth-canvas .site-header,
body.nexashop-fullscreen-auth-canvas .site-footer,
body.nexashop-fullscreen-auth-canvas .elementor-location-header,
body.nexashop-fullscreen-auth-canvas .elementor-location-footer,
body.nexashop-fullscreen-auth-canvas .nexashop-top-notif-bar,
body.nexashop-fullscreen-auth-canvas .woocommerce-breadcrumb,
body.nexashop-fullscreen-auth-canvas .entry-header {
	display: none !important;
}

body.nexashop-fullscreen-auth-canvas,
body.nexashop-fullscreen-auth-canvas .site-main,
body.nexashop-fullscreen-auth-canvas .entry-content,
body.nexashop-fullscreen-auth-canvas .woocommerce {
	margin: 0 !important;
	padding: 0 !important;
	max-width: 100% !important;
	width: 100% !important;
	background: #f1f5f9 !important;
}

body.nexashop-fullscreen-auth-canvas .nexashop-auth-page-wrap {
	min-height: 100vh;
}

/* ==========================================================================
   Full Page Auth Container (for form-login.php & [nexashop_auth])
   ========================================================================== */
.nexashop-auth-page-wrap {
	min-height: 82vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 36px 16px;
	background-color: #f4f6f9;
	direction: rtl;
	text-align: right;
	box-sizing: border-box;
}

.nexashop-auth-card-box {
	width: 100%;
	max-width: 440px;
	background: var(--nexashop-auth-card-bg);
	border-radius: var(--nexashop-auth-radius);
	padding: 34px 32px 30px 32px;
	box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
	box-sizing: border-box;
	position: relative;
	direction: rtl;
	text-align: right;
	transition: all 0.3s ease;
}

@media (max-width: 480px) {
	.nexashop-auth-card-box {
		padding: 26px 20px 24px 20px;
		border-radius: 22px;
	}
}

/* Top-Left Rounded Square Close / Back Button (Matches media_1790234698116.png) */
.nexashop-auth-close-sq {
	position: absolute;
	top: 24px;
	left: 24px;
	width: 42px;
	height: 42px;
	background: #f3f4f6 !important;
	border: none !important;
	border-radius: 12px !important;
	color: #1e293b !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-shadow: none !important;
	padding: 0 !important;
	transition: background-color 0.2s ease, transform 0.2s ease;
	z-index: 10;
}

.nexashop-auth-close-sq:hover {
	background: #e5e7eb !important;
	color: #0f172a !important;
	transform: scale(1.04);
}

/* Headers */
.nexashop-auth-title-row {
	margin-bottom: 24px;
	padding-left: 52px;
}

.nexashop-auth-main-title {
	font-size: 20px;
	font-weight: 900;
	color: #1a2352;
	margin: 0 0 10px 0;
	line-height: 1.4;
}

.nexashop-auth-subtitle {
	font-size: 13.5px;
	font-weight: 600;
	color: #475569;
	margin: 0;
	line-height: 1.65;
}

/* Step 1 Phone Input Box with Left White Iran Flag Pill (Matches media_1790234698116.png) */
.nexashop-auth-phone-box {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: space-between;
	background-color: #f3f4f6;
	border: 1.5px solid transparent;
	border-radius: 14px;
	height: 54px;
	padding: 6px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.nexashop-auth-phone-box:focus-within {
	background-color: #ffffff;
	border-color: var(--nexashop-auth-primary, #c53d43);
	box-shadow: 0 0 0 3.5px rgba(197, 61, 67, 0.12);
}

.nexashop-auth-iran-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	background-color: #ffffff;
	border-radius: 10px;
	height: 40px;
	padding: 0 12px;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
	font-size: 13.5px;
	font-weight: 800;
	color: #1e293b;
	user-select: none;
	flex-shrink: 0;
}

.nexashop-auth-iran-pill .iran-flag-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.nexashop-auth-phone-field {
	flex: 1;
	height: 100%;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	padding: 0 14px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	text-align: right;
	font-family: inherit;
}

.nexashop-auth-phone-field::placeholder {
	color: #94a3b8;
	font-weight: 600;
	text-align: right;
}

/* Form Groups & General Inputs */
.nexashop-auth-form-group {
	margin-bottom: 18px;
}

.nexashop-auth-label {
	display: block;
	font-size: 13px;
	font-weight: 800;
	color: #1e293b;
	margin-bottom: 8px;
}

.nexashop-auth-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.nexashop-auth-input {
	width: 100%;
	height: 50px;
	padding: 0 16px;
	border: 1.5px solid #e2e8f0;
	border-radius: 14px;
	font-size: 14.5px;
	font-weight: 700;
	background: #f8fafc;
	color: #0f172a;
	box-sizing: border-box;
	transition: all 0.2s ease;
	font-family: inherit;
	direction: rtl;
	text-align: right;
}

.nexashop-auth-input::placeholder {
	color: #94a3b8;
	font-weight: 600;
	direction: rtl;
	text-align: right;
}

.nexashop-auth-input:focus {
	outline: none;
	background: #ffffff;
	border-color: var(--nexashop-auth-primary, #c53d43);
	box-shadow: 0 0 0 3.5px rgba(197, 61, 67, 0.12);
}

.nexashop-auth-password-input {
	padding-left: 48px !important;
	padding-right: 16px !important;
	direction: rtl !important;
	text-align: right !important;
}

.nexashop-auth-password-input::placeholder {
	direction: rtl !important;
	text-align: right !important;
	color: #94a3b8 !important;
	font-weight: 600 !important;
}

.nexashop-auth-password-toggle {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	background: transparent !important;
	border: none !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	color: #94a3b8 !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	transition: color 0.2s ease, background-color 0.2s ease;
	z-index: 2;
}

.nexashop-auth-password-toggle:hover {
	color: #0f172a !important;
	background-color: #f1f5f9 !important;
}

.nexashop-auth-password-toggle.is-visible {
	color: var(--nexashop-auth-primary, #c53d43) !important;
}

/* Primary Crimson Action Button ("ادامه «") */
.nexashop-auth-btn-submit,
button.nexashop-auth-btn-submit {
	width: 100%;
	height: 52px;
	padding: 0 20px !important;
	background: var(--nexashop-auth-primary, #c53d43) !important;
	background-color: var(--nexashop-auth-primary, #c53d43) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 14px !important;
	font-size: 16px !important;
	font-weight: 800 !important;
	cursor: pointer;
	transition: all 0.25s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 8px 20px rgba(197, 61, 67, 0.24) !important;
	margin-top: 6px;
}

.nexashop-auth-btn-submit:hover {
	filter: brightness(0.93);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(197, 61, 67, 0.32) !important;
}

.nexashop-auth-btn-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

/* Side-by-Side Opposite Links Below Password Input */
.nexashop-auth-row-links {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 12px 2px 4px 2px;
	font-size: 13px;
}

.nexashop-auth-action-link {
	color: #3b82f6;
	text-decoration: none;
	font-weight: 800;
	transition: color 0.2s ease;
	cursor: pointer;
}

.nexashop-auth-action-link.btn-forgot-password {
	color: #64748b;
}

.nexashop-auth-action-link:hover {
	color: var(--nexashop-auth-primary, #c53d43);
}

/* Switch & Back Links */
.nexashop-auth-switch-link {
	text-align: center;
	margin-top: 16px;
	font-size: 13px;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.nexashop-auth-switch-link a {
	color: #475569;
	text-decoration: none;
	font-weight: 700;
	transition: color 0.2s ease;
}

.nexashop-auth-switch-link a:hover {
	color: var(--nexashop-auth-primary, #c53d43);
}

.nexashop-auth-switch-link .sep-dot {
	color: #cbd5e1;
}

/* Terms & Legal Footer (Matches media_1790234698116.png) */
.nexashop-auth-terms-footer {
	text-align: center;
	margin-top: 20px;
	font-size: 12.5px;
	font-weight: 600;
	color: #334155;
	line-height: 1.85;
}

.nexashop-auth-terms-footer p {
	margin: 0;
}

.nexashop-auth-terms-footer a {
	color: #3b82f6;
	text-decoration: none;
	font-weight: 800;
}

.nexashop-auth-terms-footer a:hover {
	text-decoration: underline;
}

/* Alert Notification Box */
.nexashop-auth-alert {
	padding: 10px 14px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 14px;
	display: none;
	line-height: 1.6;
	animation: nexashopFadeIn 0.2s ease;
}

.nexashop-auth-alert.error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #dc2626;
	display: block;
}

.nexashop-auth-alert.success {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #059669;
	display: block;
}

/* Modern 5-Digit OTP Boxes */
.nexashop-auth-otp-wrapper {
	margin-top: 4px;
	margin-bottom: 8px;
	width: 100%;
}

.nexashop-otp-boxes {
	display: flex;
	gap: 10px;
	justify-content: center;
	direction: ltr;
}

.nexashop-otp-boxes .otp-box-digit {
	width: 54px;
	height: 56px;
	border: 1.8px solid #e2e8f0;
	border-radius: 14px;
	background: #f8fafc;
	font-size: 22px;
	font-weight: 900;
	text-align: center;
	color: #0f172a;
	outline: none;
	transition: all 0.2s ease;
	box-sizing: border-box;
	font-family: inherit;
}

.nexashop-otp-boxes .otp-box-digit:focus {
	border-color: var(--nexashop-auth-primary, #c53d43);
	background: #ffffff;
	box-shadow: 0 0 0 3.5px rgba(197, 61, 67, 0.14);
	transform: scale(1.03);
}

.nexashop-otp-boxes .otp-box-digit.is-filled {
	border-color: #cbd5e1;
	background: #ffffff;
}

@media (max-width: 440px) {
	.nexashop-otp-boxes {
		gap: 6px;
	}
	.nexashop-otp-boxes .otp-box-digit {
		width: 44px;
		height: 52px;
		font-size: 20px;
		border-radius: 12px;
	}
}

/* OTP Code 5-digit Input */
.nexashop-auth-otp-input {
	letter-spacing: 10px;
	text-align: center;
	font-size: 21px !important;
	font-weight: 900 !important;
	direction: ltr;
}

.nexashop-auth-timer-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12.5px;
	font-weight: 700;
	color: #64748b;
	margin: 10px 2px 0 2px;
}

.nexashop-auth-countdown {
	font-weight: 800;
	color: #1a2352;
	font-family: monospace;
	font-size: 13.5px;
}

.nexashop-auth-resend-btn {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: #3b82f6 !important;
	font-weight: 800 !important;
	cursor: pointer;
	font-size: 12.5px !important;
	display: none;
	padding: 0 !important;
}

.nexashop-auth-resend-btn:hover {
	text-decoration: underline;
}

/* Modal Popup Backdrop */
.nexashop-auth-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.62);
	backdrop-filter: blur(5px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	animation: nexashopFadeIn 0.25s ease-out;
}

.nexashop-auth-modal-content {
	position: relative;
	width: 100%;
	max-width: 440px;
	background: transparent;
	border-radius: var(--nexashop-auth-radius);
	direction: rtl;
	text-align: right;
	font-family: inherit;
	animation: nexashopSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nexashopFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes nexashopSlideUp {
	from { opacity: 0; transform: translateY(18px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
