/* =========================================================
   Full-page Login / Register  (WoodMart + WooCommerce)
   Uses the theme's primary colour automatically, so if you
   change the red in Theme Settings, this page follows.
   ========================================================= */

.wd-auth {
	--auth-red: var(--wd-primary-color, #e2142b);
	--auth-red-dark: color-mix(in srgb, var(--auth-red) 82%, #000);
	--auth-red-tint: color-mix(in srgb, var(--auth-red) 8%, #fff);
	--auth-ink: #1c1417;
	--auth-muted: #6f6468;
	--auth-line: #e6dfe1;

	position: fixed;      /* covers the theme header, sidebar and footer completely */
	inset: 0;
	z-index: 99999;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	background: #fff;
	color: var(--auth-ink);
	font-family: inherit;
	overflow: hidden;
}

body.admin-bar .wd-auth { top: 32px; }
@media (max-width: 782px) { body.admin-bar .wd-auth { top: 46px; } }

body.wd-auth-page { overflow: hidden; }

.wd-auth *,
.wd-auth *::before,
.wd-auth *::after { box-sizing: border-box; }

/* ---------------------------------------------------------
   LEFT: advertising panel
   --------------------------------------------------------- */
.wd-auth__promo {
	position: relative;
	background: var(--auth-red);
	color: #fff;
	overflow: hidden;
}

.wd-auth__slides,
.wd-auth__slide { position: absolute; inset: 0; }

.wd-auth__slide {
	background-color: var(--auth-red);
	background-size: cover;
	background-position: center;
	opacity: 0;
	transform: scale(1.04);
	transition: opacity .9s ease, transform 6s ease;
}

.wd-auth__slide.is-active { opacity: 1; transform: scale(1); }

/* red-tinted gradient so text stays readable on any photo */
.wd-auth__slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%),
		linear-gradient(0deg, color-mix(in srgb, var(--auth-red) 92%, #000) 0%, rgba(0,0,0,.05) 62%);
}

.wd-auth__slide-inner {
	position: absolute;
	left: clamp(28px, 5vw, 72px);
	right: clamp(28px, 5vw, 72px);
	bottom: clamp(70px, 11vh, 120px);
	max-width: 520px;
}

.wd-auth__slide-inner h2 {
	margin: 0 0 14px;
	color: #fff;
	font-size: clamp(28px, 3.2vw, 46px);
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.wd-auth__slide-inner p {
	margin: 0 0 24px;
	color: rgba(255,255,255,.92);
	font-size: clamp(15px, 1.15vw, 17px);
	line-height: 1.55;
	max-width: 44ch;
}

.wd-auth__promo-btn {
	display: inline-block;
	padding: 12px 24px;
	border: 1.5px solid #fff;
	border-radius: 6px;
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: background .2s, color .2s;
}

.wd-auth__promo-btn:hover { background: #fff; color: var(--auth-red); }

.wd-auth__dots {
	position: absolute;
	left: clamp(28px, 5vw, 72px);
	bottom: 36px;
	display: flex;
	gap: 8px;
	z-index: 2;
}

.wd-auth__dots button {
	width: 34px;
	height: 4px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: rgba(255,255,255,.4);
	cursor: pointer;
	transition: background .2s, width .2s;
}

.wd-auth__dots button.is-active { background: #fff; width: 54px; }

/* brand on top of the image */
.wd-auth__brand--on-image {
	position: absolute;
	top: 32px;
	left: clamp(28px, 5vw, 72px);
	z-index: 2;
}

.wd-auth__brand img { max-height: 44px; width: auto; display: block; }
.wd-auth__brand--on-image img { filter: brightness(0) invert(1); } /* white logo on the image */
.wd-auth-sitename { font-size: 24px; font-weight: 800; color: inherit; text-decoration: none; }
.wd-auth__brand--on-image .wd-auth-sitename { color: #fff; }

/* ---------------------------------------------------------
   RIGHT: form panel
   --------------------------------------------------------- */
.wd-auth__panel {
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow-y: auto;
	padding: 28px clamp(24px, 5vw, 72px) 20px;
	background: #fff;
}

.wd-auth__topbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
}

.wd-auth__brand--mobile { display: none; margin-right: auto; }
.wd-auth__brand--mobile .wd-auth-sitename { color: var(--auth-ink); }

.wd-auth__back {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	padding: 9px 16px;
	border: 1.5px solid var(--auth-red);
	border-radius: 6px;
	color: var(--auth-red);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background .2s, color .2s;
}

.wd-auth__back:hover { background: var(--auth-red); color: #fff; }

.wd-auth__box {
	width: 100%;
	max-width: 440px;
	margin: auto;      /* vertically centres the form */
	padding: 32px 0;
}

/* tabs */
.wd-auth__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 4px;
	margin-bottom: 32px;
	border-radius: 10px;
	background: var(--auth-red-tint);
}

.wd-auth__tabs button {
	padding: 11px 12px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--auth-muted);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s, color .2s, box-shadow .2s;
}

.wd-auth__tabs button[aria-selected="true"] {
	background: #fff;
	color: var(--auth-red);
	box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* form headings */
.wd-auth__form { display: none; }
.wd-auth[data-active="login"] .wd-auth__form[data-form="login"],
.wd-auth[data-active="register"] .wd-auth__form[data-form="register"] {
	display: block;
	animation: wdAuthIn .28s ease;
}

@keyframes wdAuthIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wd-auth__form h1 {
	margin: 0 0 8px;
	font-size: clamp(28px, 2.6vw, 36px);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--auth-ink);
}

.wd-auth__sub { margin: 0 0 28px; color: var(--auth-muted); font-size: 15px; line-height: 1.5; }
.wd-auth__note { margin: 0 0 18px; color: var(--auth-muted); font-size: 14px; }

/* fields */
.wd-auth__field { margin: 0 0 18px; }

.wd-auth__field label {
	display: block;
	margin-bottom: 7px;
	font-size: 14px;
	font-weight: 600;
	color: var(--auth-ink);
}

.wd-auth .required { color: var(--auth-red); text-decoration: none; }

.wd-auth input[type="text"],
.wd-auth input[type="email"],
.wd-auth input[type="password"] {
	width: 100%;
	height: 50px;
	padding: 0 16px;
	border: 1.5px solid var(--auth-line);
	border-radius: 8px;
	background: #fff;
	color: var(--auth-ink);
	font: inherit;
	font-size: 15px;
	box-shadow: none;
	transition: border-color .2s, box-shadow .2s;
}

.wd-auth input::placeholder { color: #b3a9ad; }

.wd-auth input[type="text"]:focus,
.wd-auth input[type="email"]:focus,
.wd-auth input[type="password"]:focus {
	outline: none;
	border-color: var(--auth-red);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-red) 14%, transparent);
}

/* password eye */
.wd-auth__pw { position: relative; display: block; }
.wd-auth__pw input { padding-right: 48px; }

.wd-auth__eye {
	position: absolute;
	top: 0; right: 0;
	width: 48px; height: 50px;
	border: 0;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236f6468' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px no-repeat;
	cursor: pointer;
}

.wd-auth__eye.is-on {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23e2142b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cpath d='M1 1l22 22'/%3E%3C/svg%3E");
}

/* remember / forgot */
.wd-auth__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 4px 0 24px;
	font-size: 14px;
}

.wd-auth__check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }

.wd-auth__check input {
	width: 18px; height: 18px;
	margin: 0;
	accent-color: var(--auth-red);
}

.wd-auth__link,
.wd-auth__switch a {
	color: var(--auth-red);
	font-weight: 600;
	text-decoration: none;
}

.wd-auth__link:hover,
.wd-auth__switch a:hover { text-decoration: underline; }

/* primary button */
.wd-auth__submit {
	display: block;
	width: 100%;
	height: 52px;
	border: 0;
	border-radius: 8px;
	background: var(--auth-red);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s, transform .1s;
}

.wd-auth__submit:hover { background: var(--auth-red-dark); }
.wd-auth__submit:active { transform: translateY(1px); }

.wd-auth__submit:focus-visible,
.wd-auth__tabs button:focus-visible,
.wd-auth__back:focus-visible,
.wd-auth__link:focus-visible,
.wd-auth__switch a:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--auth-red) 40%, transparent);
	outline-offset: 2px;
}

.wd-auth__switch {
	margin: 26px 0 0;
	text-align: center;
	color: var(--auth-muted);
	font-size: 14px;
}

.wd-auth__legal {
	margin: 0;
	text-align: center;
	color: #a79da1;
	font-size: 12px;
}

/* ---------------------------------------------------------
   Social login (WoodMart / Nextend / other plugins render here)
   Adds an "or" divider automatically.
   --------------------------------------------------------- */
.wd-auth .wd-social-login,
.wd-auth .nsl-container,
.wd-auth .social-login,
.wd-auth .xoo-sl-container {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 30px 0 0;
	padding-top: 30px;
	border-top: 1px solid var(--auth-line);
}

.wd-auth .wd-social-login::before,
.wd-auth .nsl-container::before {
	content: "or continue with";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 0 12px;
	background: #fff;
	color: var(--auth-muted);
	font-size: 13px;
}

.wd-auth .wd-social-login a,
.wd-auth .wd-social-login .btn,
.wd-auth .nsl-container a {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 48px;
	margin: 0 !important;
	border-radius: 8px !important;
	font-weight: 600;
}

.wd-auth .woocommerce-privacy-policy-text { margin-bottom: 18px; color: var(--auth-muted); font-size: 13px; line-height: 1.5; }
.wd-auth .woocommerce-privacy-policy-text a { color: var(--auth-red); }

/* ---------------------------------------------------------
   WooCommerce notices inside the panel
   --------------------------------------------------------- */
.wd-auth .woocommerce-notices-wrapper,
.wd-auth .woocommerce-error,
.wd-auth .woocommerce-message { margin: 0 0 20px; }

.wd-auth .woocommerce-error,
.wd-auth .woocommerce-message,
.wd-auth .woocommerce-info {
	padding: 14px 16px;
	list-style: none;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
}

.wd-auth .woocommerce-error {
	background: #fdecee;
	color: #9b0f1f;
	border: 1px solid #f5c2c8;
}

.wd-auth .woocommerce-message,
.wd-auth .woocommerce-info { background: #eef7f0; color: #1d5b2c; border: 1px solid #c6e3cd; }

.wd-auth .woocommerce-error::before,
.wd-auth .woocommerce-message::before,
.wd-auth .woocommerce-info::before { display: none; }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 991px) {
	.wd-auth { grid-template-columns: 1fr; }
	.wd-auth__promo { display: none; }
	.wd-auth__brand--mobile { display: block; }
	.wd-auth__panel { padding: 20px 20px 16px; }
	.wd-auth__box { padding: 24px 0; }
}

@media (prefers-reduced-motion: reduce) {
	.wd-auth__slide,
	.wd-auth__form { transition: none !important; animation: none !important; }
}

/* =========================================================
   Extra pages: forgot password / check email
   ========================================================= */
.wd-auth__form--static { display: block; animation: wdAuthIn .28s ease; }

.wd-auth__icon {
	display: grid;
	place-items: center;
	width: 64px; height: 64px;
	margin-bottom: 22px;
	border-radius: 16px;
	background: var(--auth-red-tint);
	color: var(--auth-red);
}

.wd-auth__submit--link {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-decoration: none;
}
.wd-auth__submit--link:hover { color: #fff; }

/* =========================================================
   EMAIL VERIFICATION (OTP) - shown as a step in the right half
   Restyles the "Customer Email Verification for WooCommerce"
   popup. The plugin still controls show/hide, sending and
   checking the code; we only change how it looks.
   ========================================================= */
body.wd-auth-page #otp-popup {
	position: fixed !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 50% !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff !important;
	z-index: 100000 !important;
	overflow-y: auto;
	/* no "display" here: the plugin toggles it itself */
}

body.admin-bar.wd-auth-page #otp-popup { top: 32px !important; }

body.wd-auth-page #otp-popup .otp_popup_inn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: 32px clamp(24px, 5vw, 72px);
	background: transparent !important;
	position: static !important;
	transform: none !important;
	box-shadow: none !important;
	width: 100% !important;
	max-width: none !important;
}

body.wd-auth-page #otp-popup .otp_content,
body.wd-auth-page #otp-popup .cev-authorization-grid__holder,
body.wd-auth-page #otp-popup .cev-authorization-grid__inner,
body.wd-auth-page #otp-popup .cev-authorization {
	position: static !important;
	transform: none !important;
	width: 100% !important;
	max-width: 440px !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	text-align: left !important;
}

body.wd-auth-page #otp-popup .cev-authorization__holder { text-align: left; padding: 0; }

/* back arrow becomes a "Back" link */
body.wd-auth-page #otp-popup .back_btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 28px !important;
	color: var(--wd-primary-color, #e2142b);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	position: static !important;
}
body.wd-auth-page #otp-popup .back_btn svg { width: 14px !important; height: 14px !important; fill: currentColor !important; }
body.wd-auth-page #otp-popup .back_btn::after { content: "Back"; }

body.wd-auth-page #otp-popup .popup_image {
	display: grid;
	place-items: center;
	width: 72px !important;
	height: 72px;
	margin: 0 0 22px !important;
	border-radius: 18px;
	background: color-mix(in srgb, var(--wd-primary-color, #e2142b) 8%, #fff);
}
body.wd-auth-page #otp-popup .popup_image img { width: 38px !important; height: auto; }

body.wd-auth-page #otp-popup .cev-authorization__heading { display: block; margin: 0 0 26px; text-align: left; }

body.wd-auth-page #otp-popup .cev-authorization__title {
	display: block;
	margin: 0 0 8px;
	font-size: clamp(26px, 2.4vw, 34px) !important;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #1c1417;
}

body.wd-auth-page #otp-popup .cev-authorization__description {
	display: block;
	color: #6f6468;
	font-size: 15px;
	line-height: 1.55;
}

body.wd-auth-page #otp-popup .otp-container {
	display: flex;
	gap: 12px;
	justify-content: flex-start;
	margin: 0 0 8px;
}

body.wd-auth-page #otp-popup .otp-input {
	width: 64px !important;
	height: 68px !important;
	padding: 0 !important;
	text-align: center;
	font-size: 26px;
	font-weight: 700;
	color: #1c1417;
	background: #fff;
	border: 1.5px solid #e6dfe1 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	transition: border-color .2s, box-shadow .2s;
}

body.wd-auth-page #otp-popup .otp-input:focus {
	outline: none;
	border-color: var(--wd-primary-color, #e2142b) !important;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--wd-primary-color, #e2142b) 14%, transparent) !important;
}

body.wd-auth-page #otp-popup .error_mesg { margin-top: 10px; color: #9b0f1f; font-size: 14px; }
body.wd-auth-page #otp-popup .resend_sucsess { margin: 10px 0 0; font-size: 14px; }

body.wd-auth-page #otp-popup #verify-otp-button {
	width: 100%;
	height: 52px;
	margin-top: 18px;
	border: 0;
	border-radius: 8px;
	background: var(--wd-primary-color, #e2142b);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

body.wd-auth-page #otp-popup .cev-authorization__footer {
	margin-top: 26px;
	padding: 0 !important;
	background: transparent !important;
	text-align: left !important;
	color: #6f6468;
	font-size: 14px;
}

body.wd-auth-page #otp-popup .cev-link-try-again {
	color: var(--wd-primary-color, #e2142b) !important;
	font-weight: 600;
	text-decoration: none;
}
body.wd-auth-page #otp-popup .cev-link-try-again:hover { text-decoration: underline; }

@media (max-width: 991px) {
	body.wd-auth-page #otp-popup { left: 0 !important; }
	body.wd-auth-page #otp-popup .otp-input { width: 56px !important; height: 60px !important; }
}
