/* GHH — donor sign-in card (GHT_Auth) and its pop-up.
 *
 * The Shopify-style card built for DÉCAAR, in the GHH look: logo, one step at a
 * time, floating labels, 5px buttons in the GHH blue, Schibsted Grotesk.
 * Self-contained (it also appears on the checkout page, outside the toolkit's
 * widgets); every control rule is written `.ght-auth <el>.class` so theme
 * button/input resets never win. */

.ght-auth, .ght-auth-modal { --ga-ink: #0B2638; --ga-blue: #1B9DD9; --ga-blue-d: #137CB0; --ga-mute: #5B7182; --ga-line: #D3DDE3; --ga-mist: #EEF4F7; --ga-err: #b3261e; --ga-ok: #1d6b3a; --ga-r: 5px; --ga-font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; }
.ght-auth, .ght-auth *, .ght-auth *::before, .ght-auth *::after { box-sizing: border-box; }
/* a site-wide rule capitalises button words ("Forgot Password?"): sentence case here */
.ght-auth button, .ght-auth a, .ght-auth label { text-transform: none; }
.ght-auth { position: relative; width: 100%; max-width: 440px; margin: 0 auto; padding: 38px 36px 30px; border-radius: 14px; background: #fff; color: var(--ga-ink); font: 400 16px/1.5 var(--ga-font); -webkit-font-smoothing: antialiased; text-align: left; }
.ght-auth--page { box-shadow: 0 30px 60px -40px rgba(11, 38, 56, .4), 0 0 0 1px var(--ga-line); }
.ght-auth .ght-auth__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; border: 0; }

.ght-auth .ght-auth__view[hidden] { display: none; }
.ght-auth .ght-auth__view { animation: ght-auth-in .28s cubic-bezier(.16, 1, .3, 1); }
@keyframes ght-auth-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ght-auth .ght-auth__h { margin: 0 0 6px; padding: 0; font: 800 28px/1.15 var(--ga-font); letter-spacing: -.025em; color: var(--ga-ink); text-transform: none; }
.ght-auth .ght-auth__h:focus { outline: none; }
.ght-auth .ght-auth__sub, .ght-auth .ght-auth__who { margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: var(--ga-mute); overflow-wrap: anywhere; }
.ght-auth .ght-auth__sub strong, .ght-auth .ght-auth__who span { color: var(--ga-ink); font-weight: 600; }
.ght-auth .ght-auth__form { display: grid; gap: 12px; margin: 0; }

/* fields with floating labels */
.ght-auth .ght-auth__f { position: relative; margin: 0; }
.ght-auth .ght-auth__two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ght-auth input.ght-auth__in { display: block; width: 100%; height: 52px; margin: 0; padding: 15px 13px; border: 1px solid var(--ga-line); border-radius: var(--ga-r); background: #fff; color: var(--ga-ink); font: 400 16px/1.3 var(--ga-font); box-shadow: none; outline: none; transition: padding .15s, border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.ght-auth input.ght-auth__in::placeholder { color: #7d8a93; opacity: 1; }
.ght-auth input.ght-auth__in:not(:placeholder-shown) { padding: 23px 13px 7px; }
.ght-auth input.ght-auth__in:focus { border-color: var(--ga-ink); box-shadow: 0 0 0 1px var(--ga-ink); }
.ght-auth input.ght-auth__in[aria-invalid="true"] { border-color: var(--ga-err); box-shadow: 0 0 0 1px var(--ga-err); }
.ght-auth .ght-auth__f > label { position: absolute; top: 7px; left: 14px; right: 44px; margin: 0; overflow: hidden; font: 400 12px/1.3 var(--ga-font); color: var(--ga-mute); white-space: nowrap; text-overflow: ellipsis; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.ght-auth .ght-auth__f:has(input:not(:placeholder-shown)) > label { opacity: 1; transform: none; }
.ght-auth .ght-auth__f--pass input.ght-auth__in { padding-right: 50px; }
.ght-auth button.ght-auth__eye { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ga-mute); box-shadow: none; cursor: pointer; }
.ght-auth button.ght-auth__eye:hover, .ght-auth button.ght-auth__eye:focus { background: var(--ga-mist); color: var(--ga-ink); border: 0; }
.ght-auth button.ght-auth__eye[aria-pressed="true"] { color: var(--ga-ink); }
.ght-auth svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* buttons */
.ght-auth button.ght-auth__btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; min-height: 52px; margin: 4px 0 0; padding: 0 20px; border: 1px solid var(--ga-blue); border-radius: var(--ga-r); background: var(--ga-blue); color: #fff; font: 700 16px/1 var(--ga-font); letter-spacing: 0; text-transform: none; text-decoration: none; box-shadow: none; cursor: pointer; white-space: normal; transition: background-color .2s, border-color .2s, color .2s; }
.ght-auth button.ght-auth__btn:hover, .ght-auth button.ght-auth__btn:focus { border-color: var(--ga-blue-d); background: var(--ga-blue-d); color: #fff; }
.ght-auth button.ght-auth__btn:focus-visible, .ght-auth button.ght-auth__link:focus-visible, .ght-auth button.ght-auth__eye:focus-visible { outline: 2px solid var(--ga-ink); outline-offset: 2px; }
.ght-auth button.ght-auth__btn--line { border-color: var(--ga-line); background: #fff; color: var(--ga-ink); font-weight: 600; }
.ght-auth button.ght-auth__btn--line:hover, .ght-auth button.ght-auth__btn--line:focus { border-color: var(--ga-ink); background: #fff; color: var(--ga-ink); }
.ght-auth button.ght-auth__btn[disabled], .ght-auth button.ght-auth__btn.is-busy { opacity: .7; cursor: default; }
.ght-auth .ght-auth__spin { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ght-auth-spin .7s linear infinite; }
.ght-auth .is-busy .ght-auth__spin { display: inline-block; }
@keyframes ght-auth-spin { to { transform: rotate(360deg); } }

.ght-auth button.ght-auth__link { display: inline; min-height: 0; margin: 0; padding: 0; border: 0; background: none; color: var(--ga-ink); font-family: var(--ga-font); font-size: inherit; font-weight: 600; line-height: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; box-shadow: none; cursor: pointer; }
.ght-auth button.ght-auth__link:hover, .ght-auth button.ght-auth__link:focus { border: 0; background: none; color: var(--ga-blue-d); text-decoration-thickness: 2px; }
.ght-auth button.ght-auth__link[disabled] { color: var(--ga-mute); text-decoration: none; cursor: default; }
.ght-auth .ght-auth__alt { margin: 18px 0 0; font-size: 14.5px; color: var(--ga-mute); text-align: center; }
.ght-auth .ght-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14.5px; }
.ght-auth .ght-auth__check { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 14.5px; font-weight: 400; color: var(--ga-ink); cursor: pointer; }
.ght-auth .ght-auth__check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ga-ink); }
.ght-auth .ght-auth__or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: 13px; color: var(--ga-mute); }
.ght-auth .ght-auth__or::before, .ght-auth .ght-auth__or::after { content: ""; flex: 1; height: 1px; background: var(--ga-line); }
.ght-auth .ght-auth__small { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--ga-mute); }
.ght-auth .ght-auth__small a { color: var(--ga-ink); }
.ght-auth .ght-auth__err { margin: 0; padding: 10px 12px; border-radius: var(--ga-r); background: #fbeceb; color: var(--ga-err); font-size: 14px; line-height: 1.45; }
.ght-auth .ght-auth__err[hidden] { display: none; }
.ght-auth .ght-auth__ok { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--ga-r); background: var(--ga-mist); color: var(--ga-ok); font-size: 14.5px; line-height: 1.5; }
.ght-auth .ght-auth__ok[hidden] { display: none; }
/* staging only (email is blocked there): the two-step code shown in the pop-up */
.ght-auth .ght-auth__stg { margin: 0 0 14px; padding: 10px 14px; border: 1px dashed #C9C9C9; border-radius: var(--ga-r); font-size: 14px; line-height: 1.5; color: var(--ga-ink); }
.ght-auth .ght-auth__stg strong { font-size: 17px; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.ght-auth .ght-auth__stg[hidden] { display: none; }
.ght-auth [data-ght-auth-form="twostep"] .ght-auth__check { margin-top: 2px; }
.ght-auth .ght-auth__ghost { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ght-auth .ght-auth__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* password strength */
.ght-auth .ght-auth__meter { display: grid; gap: 6px; margin-top: -4px; font-size: 13px; color: var(--ga-mute); }
.ght-auth .ght-auth__bar { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: var(--ga-mist); }
.ght-auth .ght-auth__bar i { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--ga-err); transition: width .25s, background-color .25s; }
.ght-auth .ght-auth__meter[data-level="1"] i { width: 25%; }
.ght-auth .ght-auth__meter[data-level="2"] i { width: 55%; background: #b7791f; }
.ght-auth .ght-auth__meter[data-level="3"] i { width: 80%; background: var(--ga-blue); }
.ght-auth .ght-auth__meter[data-level="4"] i { width: 100%; background: var(--ga-ok); }

/* 6-digit code */
.ght-auth .ght-auth__code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ght-auth input.ght-auth__digit { width: 100%; height: 56px; margin: 0; padding: 0; border: 1px solid var(--ga-line); border-radius: var(--ga-r); background: #fff; color: var(--ga-ink); font: 700 22px/1 var(--ga-font); text-align: center; box-shadow: none; outline: none; -webkit-appearance: none; appearance: none; }
.ght-auth input.ght-auth__digit:focus { border-color: var(--ga-ink); box-shadow: 0 0 0 1px var(--ga-ink); }
.ght-auth .ght-auth__code[aria-invalid="true"] input.ght-auth__digit { border-color: var(--ga-err); }

/* done */
.ght-auth .ght-auth__view--done { padding: 12px 0 6px; text-align: center; }
.ght-auth .ght-auth__tick { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%; background: var(--ga-mist); color: var(--ga-ok); }
.ght-auth .ght-auth__tick svg { width: 26px; height: 26px; stroke-width: 2; }

/* the account page when signed out: the card centred on the mist ground */
.ght-auth-page { display: flex; justify-content: center; padding: clamp(32px, 6vw, 72px) 16px; background: var(--ga-mist, #EEF4F7); }
.woocommerce:has(> .ght-auth-page) { max-width: none; }

/* ---------------------------------------------------------------- pop-up */
.ght-auth-modal { position: fixed; inset: 0; z-index: 1000002; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ght-auth-modal[hidden] { display: none; }
.ght-auth-modal__scrim { position: absolute; inset: 0; background: rgba(6, 20, 30, .55); animation: ght-auth-fade .2s ease; }
.ght-auth-modal__card { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; border-radius: 14px; background: #fff; box-shadow: 0 40px 80px -30px rgba(6, 20, 30, .6); animation: ght-auth-pop .28s cubic-bezier(.16, 1, .3, 1); }
.ght-auth-modal .ght-auth { box-shadow: none; }
.ght-auth-modal button.ght-auth-modal__x { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ga-ink); box-shadow: none; cursor: pointer; }
.ght-auth-modal button.ght-auth-modal__x:hover, .ght-auth-modal button.ght-auth-modal__x:focus { border: 0; background: var(--ga-mist); color: var(--ga-ink); }
.ght-auth-modal button.ght-auth-modal__x:focus-visible { outline: 2px solid var(--ga-ink); outline-offset: 2px; }
.ght-auth-modal svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@keyframes ght-auth-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ght-auth-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ght-auth-up { from { transform: translateY(100%); } to { transform: none; } }
html.ght-auth-lock, html.ght-auth-lock body { overflow: hidden; }
html.ght-auth-lock .sky-whatsapp-widget { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

/* phones: a bottom sheet that can grow to full height */
@media (max-width: 600px) {
	.ght-auth { padding: 32px 22px 24px; }
	.ght-auth .ght-auth__h { font-size: 25px; }
	.ght-auth .ght-auth__code { gap: 6px; }
	.ght-auth input.ght-auth__digit { height: 52px; font-size: 20px; }
	.ght-auth-modal { align-items: flex-end; padding: 0; }
	.ght-auth-modal__card { max-width: none; max-height: 94vh; max-height: 94dvh; border-radius: 16px 16px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); animation: ght-auth-up .32s cubic-bezier(.16, 1, .3, 1); }
	.ght-auth-modal__card::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: var(--ga-line); }
}
@media (max-width: 360px) {
	.ght-auth .ght-auth__two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.ght-auth .ght-auth__view, .ght-auth-modal__scrim, .ght-auth-modal__card { animation: none; }
}
