/* ==========================================================================
   GrowDeshi — Auth modal (phone/email OTP login gate)
   Loaded only for logged-out shoppers when the gate is on. Uses the global
   brand tokens from style.css :root.
   ========================================================================== */

.gd-auth {
	position: fixed; inset: 0; z-index: 1400;
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease;
}
.gd-auth.is-open { opacity: 1; visibility: visible; }
.gd-auth[hidden] { display: none; }

.gd-auth__backdrop {
	position: absolute; inset: 0;
	background: rgba(15, 46, 31, 0.55); backdrop-filter: blur(4px);
}

.gd-auth__panel {
	position: relative; z-index: 1; width: 100%; max-width: 420px;
	background: #fff; border-radius: 22px; padding: 28px 26px 24px;
	box-shadow: 0 24px 60px rgba(15, 46, 31, 0.28);
	transform: translateY(10px) scale(.98); transition: transform .24s cubic-bezier(.2,.8,.2,1);
	max-height: calc(100dvh - 32px); overflow-y: auto;
}
.gd-auth.is-open .gd-auth__panel { transform: none; }

.gd-auth__close {
	position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
	border: none; border-radius: 999px; background: #F6F4EF; color: #2D6A4F;
	cursor: pointer; font-size: 16px; display: inline-flex; align-items: center; justify-content: center;
	transition: background .15s;
}
.gd-auth__close:hover { background: #D8F3DC; }

.gd-auth__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.gd-auth__mark { width: 38px; height: 38px; display: inline-flex; flex-shrink: 0; }
.gd-auth__mark svg { width: 100%; height: 100%; display: block; }
.gd-auth__wordmark { font-family: var(--font-display, sans-serif); font-weight: 800; font-size: 18px; color: var(--c-ink, #1A2E24); letter-spacing: -0.3px; }

.gd-auth__title { font-family: var(--font-bengali); font-weight: 800; font-size: 20px; color: var(--c-ink, #1A2E24); margin: 0 0 6px; letter-spacing: -0.2px; }
.gd-auth__sub { font-family: var(--font-bengali); font-size: 13.5px; color: var(--c-ink-muted, #6B6960); line-height: 1.5; margin: 0 0 18px; }
.gd-auth__sub strong { color: var(--c-forest, #2D6A4F); font-weight: 700; white-space: nowrap; }

.gd-auth__field { display: block; margin-bottom: 13px; }
.gd-auth__label { display: block; font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink-muted, #6B6960); margin-bottom: 6px; }
.gd-auth__field input {
	width: 100%; height: 46px; padding: 0 14px; box-sizing: border-box;
	border: 1px solid var(--c-line, #E8E6DF); border-radius: 12px; background: #FBFAF6;
	font-family: var(--font-bengali); font-size: 15px; color: var(--c-ink, #1A2E24);
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.gd-auth__field input:focus {
	outline: none; border-color: var(--c-forest-soft, #52B788); background: #fff;
	box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.18);
}
.gd-auth__field--otp input.gd-auth__otp-input {
	text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 0.5em;
	font-family: var(--font-ui); padding-left: 0.5em;
}

.gd-auth__error { font-family: var(--font-bengali); font-size: 12.5px; color: #E63946; background: #FCEBEB; border-radius: 9px; padding: 8px 11px; margin: 0 0 12px; }
.gd-auth__error-link { color: var(--c-forest, #2D6A4F); font-weight: 700; text-decoration: underline; margin-inline-start: 4px; white-space: nowrap; }

.gd-auth__submit {
	position: relative; width: 100%; height: 48px; border: none; border-radius: 12px;
	background: var(--c-forest, #2D6A4F); color: #fff; cursor: pointer;
	font-family: var(--font-bengali); font-weight: 700; font-size: 15px;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	transition: background .16s, transform .1s;
}
.gd-auth__submit:hover { background: var(--c-forest-dark, #1F3528); }
.gd-auth__submit:active { transform: scale(.99); }
.gd-auth__submit.is-busy { color: transparent; pointer-events: none; }
.gd-auth__submit.is-busy .gd-auth__spinner {
	position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
	border: 2.5px solid rgba(255,255,255,0.5); border-top-color: #fff; border-radius: 999px;
	animation: gd-auth-spin .7s linear infinite;
}
@keyframes gd-auth-spin { to { transform: rotate(360deg); } }

.gd-auth__alt { font-family: var(--font-bengali); font-size: 13px; color: var(--c-ink-muted, #6B6960); text-align: center; margin: 16px 0 0; }
.gd-auth__alt a { color: var(--c-forest, #2D6A4F); font-weight: 700; text-decoration: none; }
.gd-auth__alt a:hover { text-decoration: underline; }
.gd-auth__legal { font-family: var(--font-bengali); font-size: 11px; color: var(--c-ink-faint, #9C9A92); text-align: center; line-height: 1.5; margin: 12px 0 0; }

.gd-auth__back {
	display: inline-flex; align-items: center; gap: 5px; border: none; background: none;
	color: var(--c-ink-muted, #6B6960); font-family: var(--font-bengali); font-size: 13px; cursor: pointer;
	padding: 0; margin: 0 0 14px;
}
.gd-auth__back:hover { color: var(--c-forest, #2D6A4F); }

.gd-auth__resend {
	width: 100%; margin-top: 12px; border: none; background: none; cursor: pointer;
	font-family: var(--font-bengali); font-size: 13px; font-weight: 600; color: var(--c-forest, #2D6A4F);
}
.gd-auth__resend:disabled { color: var(--c-ink-faint, #9C9A92); cursor: default; }
