/**
 * Golden Light — OTP Auth (modal style)
 */

/* Default: OTP panel — hide email shell when OTP panel exists */
.woocommerce-account:not(.logged-in):not(.gl-auth-email-active):has(.gl-auth-page:not(.gl-auth-page--email)) .gl-auth-page--email {
	display: none !important;
}

.woocommerce-account:not(.logged-in):not(.gl-auth-email-active):has(.gl-auth-page:not(.gl-auth-page--email)) .gl-auth-page:not(.gl-auth-page--email) {
	display: flex;
}

/* Email / password mode */
.woocommerce-account:not(.logged-in).gl-auth-email-active .gl-auth-page:not(.gl-auth-page--email) {
	display: none !important;
}

.woocommerce-account:not(.logged-in).gl-auth-email-active .gl-auth-page--email {
	display: flex !important;
}

.gl-auth-page--email {
	width: 100%;
	display: flex;
	justify-content: center;
	padding: 0.5rem;
}

.gl-auth-page--email #customer_login,
.gl-auth-page--email .u-columns,
.gl-auth-page--email .col2-set {
	display: block !important;
	width: 100%;
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.gl-auth-page--email .u-column1,
.gl-auth-page--email .u-column2 {
	display: block !important;
	width: 100%;
	float: none;
}

.gl-auth-page--email #customer_login.gl-auth-email-login .u-column2,
.gl-auth-page--email #customer_login.gl-auth-email-register .u-column1 {
	display: none !important;
}

.gl-auth-page--email .woocommerce h2 {
	display: none !important;
}

.gl-auth-page--email .woocommerce-form-login,
.gl-auth-page--email .woocommerce-form-register {
	display: block !important;
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.gl-auth-page--email .woocommerce-form-row {
	margin-bottom: 0.85rem;
}

.gl-auth-page--email .woocommerce-form-row label {
	display: block;
	margin-bottom: 0.35rem;
	color: #6f6b63;
	font-size: 0.78rem;
	font-weight: 600;
}

.gl-auth-page--email .woocommerce-form-row label .required {
	color: #c45c5c;
	text-decoration: none;
}

.gl-auth-page--email .woocommerce-form-row input.input-text {
	width: 100%;
	padding: 0.9rem 1rem;
	border: 1.5px solid rgba(201, 169, 98, 0.35);
	border-radius: 14px;
	background: #fff;
	font-family: var(--gl-font);
	font-size: 0.92rem;
	font-weight: 600;
	text-align: right;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gl-auth-page--email .woocommerce-form-row input.input-text:focus {
	outline: none;
	border-color: #c9a962;
	box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.14);
}

.gl-auth-page--email .woocommerce-form-login .button,
.gl-auth-page--email .woocommerce-form-register .button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	margin-top: 0.35rem;
	padding: 0.75rem 1rem !important;
	border: 0 !important;
	border-radius: 14px !important;
	background: linear-gradient(135deg, #2a2620, #1a1814) !important;
	color: #fff !important;
	font-family: var(--gl-font);
	font-size: 0.82rem !important;
	font-weight: 700 !important;
	box-shadow: 0 10px 24px rgba(26, 24, 20, 0.16);
}

.gl-auth-page--email .woocommerce-form-login .woocommerce-form__label-for-checkbox {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0.75rem 0 0.25rem;
	font-size: 0.78rem;
	color: #8b877e;
}

.gl-auth-page--email .woocommerce-form-login .woocommerce-form__label-for-checkbox input {
	accent-color: #c9a962;
}

.gl-auth-page--email .woocommerce-LostPassword {
	margin: 0.75rem 0 0;
	text-align: center;
}

.gl-auth-page--email .woocommerce-LostPassword a {
	color: #8a867c;
	font-size: 0.72rem;
	text-decoration: none;
}

.gl-auth-page--email .woocommerce-LostPassword a:hover {
	color: #8a6b28;
}

.gl-auth-page--email .gl-auth-back-otp {
	margin-top: 0.35rem;
}

.woocommerce-account:not(.logged-in) .woocommerce {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: clamp(420px, 62vh, 720px);
	padding: 2rem 0 3rem;
}

.woocommerce-account:not(.logged-in) .gl-page-title {
	display: none;
}

.woocommerce-account:not(.logged-in) .woocommerce-MyAccount-content:empty {
	display: none;
}

.gl-auth-page {
	width: 100%;
	display: flex;
	justify-content: center;
	padding: 0.5rem;
}

.gl-auth-modal {
	width: min(100%, 400px);
	padding: 2rem 1.75rem 1.5rem;
	background: #fff;
	border: 1px solid rgba(26, 26, 26, 0.06);
	border-radius: 24px;
	box-shadow: 0 24px 70px rgba(26, 26, 26, 0.1);
	overflow: hidden;
}

.gl-auth-modal__logo {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 1.25rem;
	padding: 0.35rem;
	background: linear-gradient(145deg, rgba(201, 169, 98, 0.14), rgba(201, 169, 98, 0.04));
	border: 1px solid rgba(201, 169, 98, 0.25);
	border-radius: 50%;
}

.gl-auth-modal__logo img {
	display: block;
	width: 34px;
	height: 34px;
	object-fit: contain;
}

.gl-auth-modal__logo-fallback {
	color: #8a6b28;
	font-size: 1.25rem;
	font-weight: 800;
}

.gl-auth-mode-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.35rem;
	margin-bottom: 1.75rem;
	padding: 0.3rem;
	background: #f5f3ee;
	border-radius: 999px;
}

.gl-auth-mode-tab {
	border: 0;
	background: transparent;
	padding: 0.65rem 0.5rem;
	border-radius: 999px;
	font-family: var(--gl-font);
	font-size: 0.82rem;
	font-weight: 650;
	color: #8a867c;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.gl-auth-mode-tab.is-active {
	color: #fff;
	background: linear-gradient(135deg, #2a2620, #1a1814);
	box-shadow: 0 6px 18px rgba(26, 24, 20, 0.18);
}

.gl-auth-modal__title {
	margin: 0 0 0.55rem;
	text-align: center;
	color: #1f1e1b;
	font-size: 1.05rem;
	font-weight: 750;
	line-height: 1.6;
}

.gl-auth-modal__subtitle {
	margin: 0 0 1.35rem;
	text-align: center;
	color: #8b877e;
	font-size: 0.78rem;
	line-height: 1.85;
}

.gl-auth-step--phone > .gl-auth-modal__subtitle {
	margin-top: 0.15rem;
}

.gl-auth-modal__subtitle--phone strong {
	color: #3a3832;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.gl-auth-name-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
	margin-bottom: 0.75rem;
}

.gl-auth-name-fields[hidden] {
	display: none !important;
}

.gl-auth-phone-field {
	margin-bottom: 1rem;
}

.gl-auth-phone-field input,
.gl-auth-name-fields input {
	width: 100%;
	padding: 0.9rem 1rem;
	border: 1.5px solid rgba(201, 169, 98, 0.35);
	border-radius: 14px;
	background: #fff;
	font-family: var(--gl-font);
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
	letter-spacing: 0.04em;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gl-auth-name-fields input {
	text-align: right;
	font-weight: 600;
	letter-spacing: 0;
}

.gl-auth-phone-field input::placeholder,
.gl-auth-name-fields input::placeholder {
	color: #c4c0b6;
	font-weight: 500;
}

.gl-auth-phone-field input:focus,
.gl-auth-name-fields input:focus {
	outline: none;
	border-color: #c9a962;
	box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.14);
}

.gl-auth-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	margin-bottom: 0.75rem;
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(135deg, #2a2620, #1a1814);
	color: #fff;
	font-family: var(--gl-font);
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(26, 24, 20, 0.16);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.gl-auth-submit:hover:not(:disabled) {
	transform: translateY(-1px);
}

.gl-auth-submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

.gl-auth-submit--soft {
	background: rgba(201, 169, 98, 0.14);
	color: #8a6b28;
	box-shadow: none;
}

.gl-auth-submit--soft:not(.gl-btn--disabled):not(:disabled) {
	background: linear-gradient(135deg, #2a2620, #1a1814);
	color: #fff;
	box-shadow: 0 10px 24px rgba(26, 24, 20, 0.16);
}

.gl-btn--disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none !important;
}

.gl-auth-alt-link {
	display: block;
	width: 100%;
	margin: 0.35rem 0 1rem;
	padding: 0;
	border: 0;
	background: none;
	color: #8a867c;
	font-family: var(--gl-font);
	font-size: 0.72rem;
	cursor: pointer;
	text-align: center;
}

.gl-auth-alt-link:hover {
	color: #8a6b28;
}

.gl-auth-secure-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	margin: 0.5rem 0 0;
	color: #9b978f;
	font-size: 0.68rem;
}

.gl-auth-secure-note svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: #34a875;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

.gl-otp-inputs {
	display: flex;
	justify-content: center;
	gap: 0.55rem;
	margin-bottom: 1rem;
	direction: ltr;
}

.gl-otp-digit {
	width: 46px;
	height: 50px;
	padding: 0;
	border: 1.5px solid rgba(201, 169, 98, 0.28);
	border-radius: 12px;
	background: #fff;
	font-family: var(--gl-font);
	font-size: 1.2rem;
	font-weight: 700;
	text-align: center;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gl-otp-digit:focus {
	outline: none;
	border-color: #c9a962;
	box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.14);
}

.gl-auth-resend-line {
	margin: 0 0 1rem;
	text-align: center;
	color: #9b978f;
	font-size: 0.72rem;
}

.gl-auth-resend-line strong {
	color: #6f6b63;
	font-weight: 700;
}

.gl-auth-resend {
	border: 0;
	background: none;
	padding: 0;
	color: #8a6b28;
	font-family: var(--gl-font);
	font-size: 0.72rem;
	font-weight: 700;
	cursor: pointer;
}

.gl-auth-edit-phone {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
	padding: 0;
	border: 0;
	background: none;
	color: #8a6b28;
	font-family: var(--gl-font);
	font-size: 0.74rem;
	font-weight: 650;
	cursor: pointer;
	text-align: center;
}

.gl-auth-edit-phone:hover {
	color: #6f5420;
}

.gl-auth-step[hidden] {
	display: none !important;
}

@media (max-width: 480px) {
	.gl-auth-modal {
		padding: 1.5rem 1.25rem 1.25rem;
		border-radius: 20px;
	}

	.gl-auth-name-fields {
		grid-template-columns: 1fr;
	}

	.gl-otp-digit {
		width: 40px;
		height: 46px;
		font-size: 1.05rem;
	}

	.gl-otp-inputs {
		gap: 0.4rem;
	}
}
