/**
 * Logged-out My Account: login, register, lost/reset password (Trello #2122, login redesign v3).
 * Figma: "grüum – Login page redesign (v3)". Mobile-first; one centred column, 460px max.
 * Templates: templates/woocommerce/myaccount/{form-login,form-lost-password,lost-password-confirmation,form-reset-password}.php
 */

.ga {
	--ga-orange: #E55A26;
	--ga-orange-hover: #C9481C;
	--ga-error: #C9481C;
	--ga-tint: #FDF1EC;
	--ga-text: #394044;
	--ga-muted: #6E6E6C;
	--ga-hairline: #E5E5E5;
	--ga-surface: #FAFAF9;
	--ga-ocean: #164881;
	--ga-disabled: #C9CBC9;
	--ga-white: #fff;

	box-sizing: border-box;
	width: 100%;
	max-width: 500px; /* 460px column + 20px gutters */
	margin: 0 auto;
	padding: 28px 20px 56px;
	color: var(--ga-text);
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
}

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

@media (min-width: 768px) {
	.ga {
		padding-top: 44px;
		padding-bottom: 72px;
	}
}

.ga [hidden] {
	display: none !important;
}

/* The theme sets colour and weight on `*`, so inline children would not inherit them. */
.ga span,
.ga a,
.ga em,
.ga summary {
	color: inherit;
	font-weight: inherit;
}

.ga strong {
	color: inherit;
	font-weight: 700;
}

.ga p {
	margin: 0;
	text-align: left; /* the theme centres paragraphs on mobile */
}

.ga-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.ga-icon {
	display: block;
	flex: none;
	max-width: none;
}

.ga .ga-center,
.ga .ga-foot {
	text-align: center;
}

/* ---------------------------------------------------------------- Type */

.ga .ga-title {
	margin: 0;
	text-align: left;
	padding: 0;
	color: var(--ga-text);
	font-size: 26px;
	font-weight: 700;
	line-height: 34px;
	letter-spacing: -0.26px;
	text-transform: none;
}

.ga .ga-title.ga-center {
	text-align: center;
}

.ga .ga-title:focus {
	outline: none;
}

@media (min-width: 768px) {
	.ga .ga-title {
		font-size: 30px;
		line-height: 40px;
		letter-spacing: -0.3px;
	}
}

.ga .ga-lede {
	margin-top: 8px;
	color: var(--ga-muted);
	font-size: 15px;
	line-height: 1.5;
}

.ga .ga-hint {
	color: var(--ga-muted);
	font-size: 13px;
	line-height: 1.5;
}

.ga .ga-link,
.ga .ga-hint-link {
	display: inline;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	color: var(--ga-text);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 16px;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.ga .ga-hint-link {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
}

.ga .ga-link:hover,
.ga .ga-hint-link:hover {
	color: var(--ga-orange);
}

.ga a:focus-visible,
.ga button:focus-visible,
.ga summary:focus-visible {
	outline: 2px solid var(--ga-orange);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------------------------------------------------------------- Layout */

.ga form.ga-form {
	margin: 30px 0 0;
	padding: 0;
	border: 0;
}

.ga-view--login > .ga-notice + .ga-title,
.ga-view--login > .ga-notice + .ga-sr-only + .ga-banner {
	margin-top: 30px;
}

.ga-view > .ga-banner:first-child + .ga-form,
.ga-view > .ga-sr-only:first-child + .ga-banner + .ga-form,
.ga-view > .ga-notice + .ga-sr-only + .ga-banner + .ga-form {
	margin-top: 26px;
}

/* Spacing is set per component so hidden inputs and plugin hook output add no gaps. */
.ga .ga-form > .ga-field + .ga-field,
.ga .ga-form > .ga-button,
.ga .ga-form > .ga-hint {
	margin-top: 24px;
}

.ga-hairline {
	display: block;
	height: 1px;
	margin: 34px 0 26px;
	border: 0;
	background: var(--ga-hairline);
	opacity: 1;
}

.ga-hairline--tight {
	margin: 20px 0 14px;
}

.ga-hairline--tight + .ga-disclosure + .ga-hairline {
	margin-top: 34px;
}

.ga-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 5px;
	color: var(--ga-muted);
	font-size: 14px;
	line-height: 20px;
	text-align: center;
}

.ga-foot .ga-link {
	line-height: 20px;
}

/* ---------------------------------------------------------------- Fields */

.ga-field {
	position: relative;
	margin: 0;
}

.ga-field__box {
	position: relative;
}

.ga .ga-field__input {
	display: block;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 14px 15px;
	border: 1px solid var(--ga-hairline);
	border-radius: 4px;
	background: var(--ga-white);
	box-shadow: none;
	color: var(--ga-text);
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming on focus */
	line-height: 24px;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s ease;
}

.ga-field.has-trailing .ga-field__input {
	padding-right: 50px;
}

.ga-field.has-trailing .ga-field__input[type="password"],
.ga-field.has-trailing .ga-field__input[data-revealed] {
	padding-right: 64px;
}

.ga .ga-field__input::placeholder {
	color: var(--ga-muted);
	opacity: 1;
}

.ga .ga-field__input:hover {
	border-color: #CFCFCF;
}

.ga .ga-field__input:focus,
.ga .ga-field__input:focus-visible {
	border-color: var(--ga-orange);
	outline: none !important; /* replaces the theme's global :focus-visible ring on fields */
	box-shadow: 0 0 0 3px var(--ga-tint) !important;
}

.ga .ga-field.has-error .ga-field__input {
	border-color: var(--ga-orange);
}

.ga .ga-field.has-error .ga-field__input:focus,
.ga .ga-field.has-error .ga-field__input:focus-visible {
	border-color: var(--ga-orange);
	box-shadow: 0 0 0 3px var(--ga-tint) !important;
}

/* Lets the script notice browser autofill of the collapsed password field. */
@keyframes gaAutofill {
	from { opacity: 1; }
	to { opacity: 1; }
}

.ga .ga-field__input:-webkit-autofill {
	animation: gaAutofill 0.01s;
}

/* Notched label: sits on the top border on a white chip. */
.ga .ga-field .ga-field__label {
	position: absolute;
	top: -7px;
	left: 11px;
	margin: 0;
	padding: 0 5px;
	background: var(--ga-white);
	color: var(--ga-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 13px;
	pointer-events: none;
	display: block;
}

.ga-field__icon {
	position: absolute;
	top: 50%;
	right: 15px;
	width: 19px;
	height: 19px;
	transform: translateY(-50%);
	pointer-events: none;
}

.ga .ga-field__toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	min-width: 44px;
	height: 44px;
	margin: 0;
	padding: 0 10px;
	border: 0;
	background: none;
	color: var(--ga-muted);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: underline;
	text-underline-offset: 2px;
	transform: translateY(-50%);
	cursor: pointer;
}

.ga .ga-field__toggle:hover {
	color: var(--ga-text);
}

.ga .ga-field__error {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 8px;
	color: var(--ga-error);
	font-size: 13px;
	line-height: 1.5;
}

.ga .ga-field__error .ga-icon {
	margin-top: 2px;
}

.ga .ga-field__error a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
}

/* Inside the drawer the field sits on white like the design. */
.ga-drawer .ga-field__error {
	background: transparent;
}

/* ---------------------------------------------------------------- Buttons */

.ga .ga-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 20px;
	/* A 1.5px outline drawn as an inset shadow: Chrome rounds 1.5px borders down to 1px. */
	border: 0;
	border-radius: 5px;
	box-shadow: inset 0 0 0 1.5px var(--ga-orange);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ga .ga-button--primary {
	background: var(--ga-orange);
	color: var(--ga-white);
}

.ga .ga-button--primary:hover,
.ga .ga-button--primary:focus-visible {
	box-shadow: inset 0 0 0 1.5px var(--ga-orange-hover);
	background: var(--ga-orange-hover);
	color: var(--ga-white);
}

.ga .ga-button--secondary {
	background: var(--ga-white);
	color: var(--ga-orange);
}

.ga .ga-button--secondary:hover,
.ga .ga-button--secondary:focus-visible {
	box-shadow: inset 0 0 0 1.5px var(--ga-orange-hover);
	background: var(--ga-tint);
	color: var(--ga-orange-hover);
}

.ga .ga-button[disabled],
.ga .ga-button[aria-disabled="true"] {
	cursor: default;
}

.ga .ga-button--primary[disabled] {
	opacity: 0.75;
}

/* "Send it again in 0:42" */
.ga .ga-button.is-cooling,
.ga .ga-button.is-cooling:hover {
	box-shadow: inset 0 0 0 1.5px var(--ga-disabled);
	background: var(--ga-white);
	color: var(--ga-muted);
}

.ga-resend__clock {
	display: none;
}

.ga-button.is-cooling .ga-resend__clock {
	display: block;
}

/* ---------------------------------------------------------------- Password route (option B) */

.ga .ga-form > .ga-route,
.ga .ga-form > .ga-route-link,
.ga .ga-form > .ga-drawer-close {
	margin-top: 22px;
}

.ga .ga-form > .ga-route-link {
	margin-top: 18px;
}

.ga .ga-form > .ga-drawer-close {
	margin-top: 18px;
}

.ga-route {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ga .ga-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 16px;
	color: var(--ga-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 16px;
	letter-spacing: 0.78px;
	text-transform: uppercase;
}

.ga-divider::before,
.ga-divider::after {
	content: "";
	flex: 1 0 0;
	height: 1px;
	background: var(--ga-hairline);
}

/* ---------------------------------------------------------------- Drawer */

/* Collapsed, the drawer stays rendered (not display:none) so password managers fill it. */
.ga .ga-form > .ga-drawer {
	margin-top: 0;
	height: 0;
	overflow: hidden;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ga .ga-form > .ga-drawer.is-open {
	height: auto;
	margin-top: 18px;
	overflow: visible;
	opacity: 1;
}

.ga-drawer__inner {
	position: relative;
	padding: 22px 20px;
	border: 1px solid var(--ga-hairline);
	border-radius: 4px;
	background: var(--ga-surface);
}

.ga-drawer__inner::before {
	content: "";
	position: absolute;
	top: -1px;
	bottom: -1px;
	left: -1px;
	width: 3px;
	border-radius: 4px 0 0 4px;
	background: var(--ga-orange);
}

.ga .ga-drawer__title {
	margin: 0;
	padding: 0;
	text-align: left;
	color: var(--ga-text);
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	letter-spacing: 0;
	text-transform: none;
}

.ga .ga-drawer__lede {
	color: var(--ga-muted);
	font-size: 14px;
	line-height: 1.5;
}

.ga-drawer__inner > .ga-field {
	margin-top: 16px;
}

.ga-drawer__inner > .ga-button {
	margin-top: 22px;
}

.ga-drawer__inner > .ga-drawer__actions {
	margin-top: 0;
}

/* Tap area of about 44px for the text links in the drawer (16px line + 2 × 14px padding).
   The padding replaces the 12px gaps above the links, so they sit roughly where they did. */
.ga .ga-drawer__inner .ga-drawer__actions .ga-link,
.ga .ga-drawer__inner .ga-drawer__alt .ga-link {
	display: inline-block;
	min-height: 44px;
	padding: 14px 8px;
	box-sizing: border-box;
}

.ga-drawer__inner .ga-field__error {
	padding: 0;
}

/* Plugin output inside the drawer (e.g. Turnstile in invisible mode) keeps its own spacing. */
.ga-drawer__inner > .cf-turnstile,
.ga-drawer__inner > .cf-turnstile-woo-login {
	margin-top: 16px;
}

.ga-drawer__inner > .cf-turnstile:empty,
.ga .ga-form > .magic-login-captcha-wrapper:empty {
	display: none;
}

/* ---------------------------------------------------------------- Banners */

/* Info notice (redirect only): surface, ocean rule. */
.ga-notice {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 13px 15px;
	border: 1px solid var(--ga-hairline);
	border-radius: 4px;
	background: var(--ga-surface);
	overflow: hidden;
}

.ga-notice::before {
	content: "";
	position: absolute;
	top: -1px;
	bottom: -1px;
	left: -1px;
	width: 3px;
	background: var(--ga-ocean);
}

.ga-notice .ga-icon {
	margin-top: 1px;
}

.ga .ga-notice p {
	color: var(--ga-text);
	font-size: 14px;
	line-height: 1.5;
}

/* Error banner: tint, orange rule. */
.ga-banner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	border-radius: 4px;
	background: var(--ga-tint);
	overflow: hidden;
}

.ga-banner::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 3px;
	background: var(--ga-error);
}

.ga .ga-banner__title {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ga-error);
	font-size: 14px;
	font-weight: 700;
	line-height: 18px;
}

.ga .ga-banner__message {
	color: var(--ga-text);
	font-size: 14px;
	line-height: 1.5;
}

.ga .ga-banner__message:empty {
	display: none;
}

.ga .ga-banner a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
}

.ga .ga-form > .ga-banner {
	margin-top: 16px;
}

.ga-view > .ga-banner + .ga-benefits,
.ga-view > .ga-lede + .ga-banner {
	margin-top: 30px;
}

/* ---------------------------------------------------------------- Confirmation (check your inbox) */

.ga-confirm {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 8px;
}

.ga-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 30px;
	background: var(--ga-tint);
}

.ga-confirm > .ga-title {
	margin-top: 22px;
}

.ga-confirm > .ga-lede {
	width: 100%;
}

.ga-confirm > .ga-resend,
.ga-confirm > .ga-button {
	width: 100%;
	margin-top: 30px;
}

.ga-confirm > .ga-hint {
	margin-top: 22px;
}

.ga-resend {
	margin: 0;
}

[data-ga-sent-email] {
	overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- Register */

.ga-benefits {
	margin: 30px 0 0;
	padding: 0;
	list-style: none;
}

.ga .ga-benefits li {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin: 0;
	padding: 7px 0;
	color: var(--ga-text);
	font-size: 15px;
	line-height: 1.5;
}

.ga-benefits li::before {
	display: none;
}

.ga-benefits .ga-icon {
	margin-top: 2px;
}

.ga-disclosure > summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--ga-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 16px;
	list-style: none;
	cursor: pointer;
}

.ga-disclosure > summary::-webkit-details-marker {
	display: none;
}

.ga-disclosure__chevron {
	transition: transform 0.15s ease;
}

.ga-disclosure[open] .ga-disclosure__chevron {
	transform: rotate(180deg);
}

.ga-disclosure__body {
	margin-top: 10px;
	color: var(--ga-muted);
	font-size: 13px;
	line-height: 1.5;
}

.ga .ga-disclosure__body p {
	margin: 0;
	color: var(--ga-muted);
	font-size: 13px;
	line-height: 1.5;
	text-align: left;
}

.ga-disclosure__body a,
.ga-disclosure__body .text-orange {
	color: var(--ga-text) !important;
	text-decoration: underline;
}

/* Third-party fields hooked into the register form (e.g. marketing opt-ins). */
.ga-form .woocommerce-form-row,
.ga-form .form-row {
	margin: 0;
	padding: 0;
}

/* ---------------------------------------------------------------- Old account page chrome */

/* The old templates' boxes and WooCommerce's own notice list are not used here. */
.account-logged-out .woocommerce-notices-wrapper:empty {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.ga *,
	.ga *::before,
	.ga *::after {
		transition: none !important;
	}
}

/* ---------------------------------------------------------------- Turnstile (interaction-only) */

/* The widget has no height until Cloudflare asks for a click; the script adds .is-visible then. */
.ga .cf-turnstile.is-visible {
	margin-top: 16px;
}

.ga .cf-turnstile-br,
.ga .cfturnstile-widget-spacer-interaction {
	display: none !important;
}

/* ---------------------------------------------------------------- Password in the field (autofill) */

/* "Log in" is the solid button; the login link becomes "Or email me a login link instead". */
.ga-drawer__inner > .ga-drawer__alt {
	margin-top: 0;
}
