/* ZHIYAR — My Account login/register screen redesign.
   Signature: a pair of neoclassical cabinet doors, rendered in pure CSS
   (real 3D hinge rotation, raised-panel molding, brass handles), swing open
   on load to reveal the glass login/register card sitting inside — a literal
   nod to ژیار's own product (wood cabinets/furniture). Palette is the site's
   own: emerald #1a3d2e (cabinet) opening onto cream #f5f0e6 (the glass card),
   gold #c9a054 as the one accent — same recipe as every other glass card on
   the site, not an invented one-off look. This stylesheet only ever loads on
   the logged-out My Account screen (see zhiyar_account_page_assets()). */

/* Distraction-free: no site header/footer chrome on the login gate itself —
   the logo lives inside the shell instead (see zhiyar_account_open_wrap()). */
#zhiyar-header,
.zhiyar-site-footer {
	display: none;
}

.woocommerce-account .entry-header,
.woocommerce-account .zhiyar-account-page-title {
	display: none;
}

.woocommerce-account .woocommerce {
	max-width: 1040px;
	margin: 50px auto 60px;
	padding: 0 20px;
}

.zhiyar-account-wrap {
	position: relative;
	overflow: hidden;
	border-radius: 26px;
	min-height: 600px;
	display: flex;
	align-items: center;
	justify-content: center;
	perspective: 1800px;
	background: linear-gradient(165deg, var(--ast-global-color-2, #1a3d2e) 0%, var(--ast-global-color-6, #16352a) 55%, var(--ast-global-color-8, #0d1f17) 100%);
	padding: 48px 24px;
	box-sizing: border-box;
	box-shadow: 0 24px 60px -24px rgba(13, 31, 23, 0.5);
}

/* ---------------------------------------------------------------------
 * Cabinet doors — emerald-lacquered, gold molding/hardware.
 * ------------------------------------------------------------------- */
.zhiyar-cabinet {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: flex;
	transform-style: preserve-3d;
}

.zhiyar-cabinet__door {
	position: relative;
	width: 50%;
	height: 100%;
	background: linear-gradient(160deg, var(--ast-global-color-2, #1a3d2e) 0%, var(--ast-global-color-6, #16352a) 60%, var(--ast-global-color-8, #0d1f17) 100%);
	box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
	transform-style: preserve-3d;
	backface-visibility: hidden;
}

.zhiyar-cabinet__door--left {
	transform-origin: left center;
	animation: zhiyar-door-open-left 1.8s cubic-bezier(0.22, 0.7, 0.24, 1) forwards;
}

.zhiyar-cabinet__door--right {
	transform-origin: right center;
	animation: zhiyar-door-open-right 1.8s cubic-bezier(0.22, 0.7, 0.24, 1) forwards;
}

@keyframes zhiyar-door-open-left {
	0% { transform: rotateY(0deg); }
	100% { transform: rotateY(-104deg); }
}

@keyframes zhiyar-door-open-right {
	0% { transform: rotateY(0deg); }
	100% { transform: rotateY(104deg); }
}

.zhiyar-cabinet__door-inner {
	position: absolute;
	inset: 0;
	animation: zhiyar-door-sway 5.5s ease-in-out 1.8s infinite;
}

.zhiyar-cabinet__door--left .zhiyar-cabinet__door-inner {
	transform-origin: left center;
}

.zhiyar-cabinet__door--right .zhiyar-cabinet__door-inner {
	transform-origin: right center;
}

@keyframes zhiyar-door-sway {
	0%, 100% { transform: rotateY(0deg); }
	50% { transform: rotateY(2deg); }
}

/* Raised-panel molding, neoclassical style — a frame within a frame. */
.zhiyar-cabinet__panel {
	position: absolute;
	inset: 16px;
	border-radius: 4px;
	background: linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.16));
	box-shadow:
		inset 0 0 0 2px rgba(201, 160, 84, 0.3),
		inset 0 2px 8px rgba(0, 0, 0, 0.35);
}

.zhiyar-cabinet__panel::before {
	content: "";
	position: absolute;
	inset: 24px;
	border: 1px solid rgba(201, 160, 84, 0.2);
	border-radius: 3px;
}

/* Brass handle, at the inner edge where the two doors meet. */
.zhiyar-cabinet__handle {
	position: absolute;
	top: 50%;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	transform: translateY(-50%);
	background: radial-gradient(circle at 35% 30%, #f3dfa8, var(--ast-global-color-0, #c9a054) 55%, #7a5a26 100%);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.zhiyar-cabinet__door--left .zhiyar-cabinet__handle {
	right: 20px;
}

.zhiyar-cabinet__door--right .zhiyar-cabinet__handle {
	left: 20px;
}

@media (prefers-reduced-motion: reduce) {
	.zhiyar-cabinet__door--left {
		animation: none;
		transform: rotateY(-104deg);
	}
	.zhiyar-cabinet__door--right {
		animation: none;
		transform: rotateY(104deg);
	}
	.zhiyar-cabinet__door-inner {
		animation: none;
	}
}

/* ---------------------------------------------------------------------
 * Glass shell (login/register card) — the site's standard light glass
 * card recipe (see .zhiyar-glass-card), cream-tinted, dark emerald text.
 * ------------------------------------------------------------------- */
.zhiyar-account-shell {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 820px;
	border-radius: 22px;
	padding: 34px 32px 38px;
	box-sizing: border-box;
	background: linear-gradient(160deg, rgba(245, 240, 230, 0.94) 0%, rgba(245, 240, 230, 0.86) 55%, rgba(201, 160, 84, 0.14) 100%);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	backdrop-filter: blur(20px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, 0.6);
	box-shadow: 0 18px 40px -14px rgba(13, 31, 23, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.7);
	color: var(--ast-global-color-3, #12241c);
	animation: zhiyar-shell-in 0.9s ease 0.5s both;
}

@keyframes zhiyar-shell-in {
	from { opacity: 0; transform: translateY(14px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.zhiyar-account-shell {
		animation: none;
	}
}

.zhiyar-account-shell__logo {
	display: flex;
	justify-content: center;
	margin: 0 0 18px;
}

.zhiyar-account-shell__logo img {
	height: 46px;
	width: auto;
	display: block;
}

.zhiyar-account-shell__logo span {
	font-size: 1.3em;
	font-weight: 800;
	color: var(--ast-global-color-2, #1a3d2e);
}

.zhiyar-account-shell__title {
	margin: 0 0 24px;
	font-size: 1.3em;
	text-align: center;
	color: var(--ast-global-color-2, #1a3d2e);
}

/* ---------------------------------------------------------------------
 * Quick-access (Gmail / SMS) — visually present, honestly disabled.
 * ------------------------------------------------------------------- */
.zhiyar-account-quick {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0 0 20px;
}

.zhiyar-account-quick__btn,
.zhiyar-account-quick__btn:hover,
.zhiyar-account-quick__btn:focus {
	background: rgba(255, 255, 255, 0.5) !important;
	border: 1px solid rgba(201, 160, 84, 0.35) !important;
	color: rgba(18, 36, 28, 0.55) !important;
}

.zhiyar-account-quick__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 12px;
	font-size: 0.86em;
	font-weight: 600;
	cursor: not-allowed;
}

.zhiyar-account-quick__icon {
	display: inline-flex;
	width: 18px;
	height: 18px;
}

.zhiyar-account-quick__icon svg {
	width: 100%;
	height: 100%;
}

.zhiyar-account-quick__btn[disabled] .zhiyar-account-quick__icon {
	filter: grayscale(1);
	opacity: 0.6;
}

.zhiyar-account-quick__soon {
	margin-inline-start: 2px;
	padding: 2px 8px;
	border-radius: 20px;
	background: rgba(201, 160, 84, 0.18);
	color: var(--ast-global-color-1, #a9813f);
	font-size: 0.76em;
	font-weight: 700;
}

.zhiyar-account-divider {
	position: relative;
	text-align: center;
	margin: 0 0 24px;
	color: rgba(18, 36, 28, 0.4);
	font-size: 0.82em;
}

.zhiyar-account-divider::before,
.zhiyar-account-divider::after {
	content: "";
	position: absolute;
	top: 50%;
	width: calc(50% - 90px);
	border-top: 1px solid rgba(201, 160, 84, 0.3);
}

.zhiyar-account-divider::before { right: 0; }
.zhiyar-account-divider::after { left: 0; }

/* ---------------------------------------------------------------------
 * zhiyarwelcome promo (register column)
 * ------------------------------------------------------------------- */
.zhiyar-welcome-promo {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 18px;
	padding: 13px 15px;
	border-radius: 14px;
	background: rgba(201, 160, 84, 0.14);
	border: 1px solid rgba(201, 160, 84, 0.4);
}

.zhiyar-welcome-promo__icon {
	display: inline-flex;
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
	color: var(--ast-global-color-1, #a9813f);
}

.zhiyar-welcome-promo__icon svg {
	width: 100%;
	height: 100%;
}

.zhiyar-welcome-promo__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 160px;
	font-size: 0.84em;
}

.zhiyar-welcome-promo__text strong {
	color: var(--ast-global-color-2, #1a3d2e);
	font-size: 1.05em;
}

.zhiyar-welcome-promo__text span {
	color: rgba(18, 36, 28, 0.6);
}

.zhiyar-welcome-promo__code,
.zhiyar-welcome-promo__code:hover,
.zhiyar-welcome-promo__code:focus {
	background: rgba(255, 255, 255, 0.55) !important;
	border: 1px dashed rgba(201, 160, 84, 0.7) !important;
	color: var(--ast-global-color-2, #1a3d2e) !important;
}

.zhiyar-welcome-promo__code {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 13px;
	border-radius: 10px;
	direction: ltr;
	font-weight: 700;
	letter-spacing: 0.03em;
	cursor: pointer;
}

.zhiyar-welcome-promo__copy-icon {
	display: inline-flex;
	width: 14px;
	height: 14px;
}

.zhiyar-welcome-promo__copy-icon svg {
	width: 100%;
	height: 100%;
}

.zhiyar-welcome-promo__code.is-copied .zhiyar-welcome-promo__copy-icon {
	color: #2e7d4f;
}

/* ---------------------------------------------------------------------
 * WooCommerce native login/register form — same glassy, rounded-field
 * treatment used across the rest of the site (see .zhiyar-quote-form).
 * ------------------------------------------------------------------- */
.zhiyar-account-shell #customer_login {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	margin: 0;
}

.zhiyar-account-shell .u-column1,
.zhiyar-account-shell .u-column2 {
	flex: 1 1 300px;
	min-width: 0;
}

.zhiyar-account-shell .u-column2 {
	border-inline-start: 1px solid rgba(201, 160, 84, 0.25);
	padding-inline-start: 30px;
}

@media (max-width: 599px) {
	.zhiyar-account-shell .u-column2 {
		border-inline-start: none;
		padding-inline-start: 0;
		border-top: 1px solid rgba(201, 160, 84, 0.25);
		padding-top: 22px;
	}
}

.zhiyar-account-shell h2 {
	color: var(--ast-global-color-2, #1a3d2e);
	font-size: 1.05em;
	margin: 0 0 16px;
}

.zhiyar-account-shell .woocommerce-form-row label {
	display: block;
	margin: 0 0 6px;
	font-size: 0.86em;
	color: rgba(18, 36, 28, 0.7);
}

/* Glassy, rounded fields — cream-tinted, matching the rest of the site.
   Astra injects its own inline `input[type=...]{border-radius:4px;...}`
   global field style with no !important — force every property here so
   there's no ambiguity about which one wins. */
.zhiyar-account-shell input.woocommerce-Input {
	width: 100% !important;
	box-sizing: border-box !important;
	padding: 12px 16px !important;
	border-radius: 12px !important;
	border: 1px solid rgba(201, 160, 84, 0.45) !important;
	background: rgba(245, 240, 230, 0.55) !important;
	-webkit-backdrop-filter: blur(8px) !important;
	backdrop-filter: blur(8px) !important;
	box-shadow: none !important;
	color: var(--ast-global-color-3, #12241c) !important;
	font-family: inherit !important;
}

.zhiyar-account-shell input.woocommerce-Input:focus {
	outline: none !important;
	border-color: rgba(201, 160, 84, 0.8) !important;
	box-shadow: 0 0 0 3px rgba(201, 160, 84, 0.22) !important;
}

.zhiyar-account-shell input.woocommerce-Input::placeholder {
	color: rgba(18, 36, 28, 0.35);
}

.zhiyar-account-shell .woocommerce-form-login__rememberme {
	color: rgba(18, 36, 28, 0.7);
	font-size: 0.85em;
}

.zhiyar-account-shell p.woocommerce-form-row {
	margin: 0 0 16px;
}

.zhiyar-account-shell .form-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

.zhiyar-account-shell .woocommerce-LostPassword {
	margin: 12px 0 0;
	font-size: 0.85em;
}

.zhiyar-account-shell .woocommerce-LostPassword a {
	color: var(--ast-global-color-1, #a9813f);
}

.zhiyar-account-shell button.woocommerce-button {
	border-radius: 10px !important;
	padding: 10px 24px !important;
	font-weight: 700 !important;
}

.zhiyar-account-shell p {
	color: rgba(18, 36, 28, 0.6);
	font-size: 0.86em;
}

@media (max-width: 599px) {
	.zhiyar-account-wrap {
		padding: 36px 14px;
		border-radius: 20px;
	}
	.zhiyar-account-shell {
		padding: 24px 18px 28px;
	}
}
