/* Account shell */
.ggn-account .woocommerce {
	display: grid;
	align-items: start;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: 240px minmax(0, 1fr);
}

.ggn-account {
	--wp--style--block-gap: var(--wp--preset--spacing--30);
	margin-block-start: 0;
}

.ggn-account.ggn-account > .wp-block-post-title {
	font-size: var(--wp--preset--font-size--h-1);
	margin-top: 0;
}

.ggn-account > .wc-block-store-notices:not(:has(.wc-block-components-notice-banner, .woocommerce-message, .woocommerce-error, .woocommerce-info)) {
	display: none;
}

.ggn-account > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.ggn-account > .wp-block-post-content > .woocommerce {
	max-width: var(--wp--style--global--wide-size) !important;
	width: 100%;
}

.ggn-account .woocommerce > .woocommerce-notices-wrapper {
	grid-column: 1 / -1;
}

.ggn-account .woocommerce > .woocommerce-MyAccount-navigation {
	float: none;
	grid-column: 1;
	width: auto;
}

.ggn-account .woocommerce > .woocommerce-MyAccount-content {
	float: none;
	grid-column: 2;
	width: auto;
}

.ggn-account .woocommerce-MyAccount-navigation ul {
	display: grid;
	gap: var(--wp--preset--spacing--10);
	list-style: none;
	margin: 0;
	padding: var(--wp--preset--spacing--10);
}

.ggn-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
}

.ggn-account .woocommerce-MyAccount-navigation {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	height: fit-content;
	overflow: hidden;
}

.ggn-account .woocommerce-MyAccount-navigation a {
	align-items: center;
	border: 0;
	border-radius: var(--wp--custom--radius--control);
	color: var(--wp--preset--color--muted);
	display: flex;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	min-height: var(--wp--custom--control--size);
	padding: 0 var(--wp--preset--spacing--card);
	text-decoration: none;
}

.ggn-account .woocommerce-MyAccount-navigation a[aria-current],
.ggn-account .woocommerce-MyAccount-navigation ul li.is-active a {
	text-decoration: none;
}

.ggn-account .woocommerce-MyAccount-navigation li:last-child {
	border-top: 1px solid var(--wp--preset--color--line);
	margin-top: var(--wp--preset--spacing--10);
	padding-top: var(--wp--preset--spacing--10);
}

.ggn-account .woocommerce-MyAccount-navigation .is-active a,
.ggn-account .woocommerce-MyAccount-navigation a:hover,
.ggn-account .woocommerce-MyAccount-navigation a:focus-visible {
	background-color: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent);
}

.ggn-account .woocommerce-MyAccount-content {
	min-width: 0;
}

.ggn-account .woocommerce:not(:has(.woocommerce-MyAccount-navigation)) {
	grid-template-columns: minmax(0, 1fr);
}

.ggn-account .woocommerce:not(:has(.woocommerce-MyAccount-navigation)) > .woocommerce-MyAccount-content {
	grid-column: 1;
}

.ggn-account:has(.ggn-account-login) .woocommerce {
	display: block;
	margin-inline: auto;
}

.ggn-account:has(.ggn-account-login) .woocommerce-notices-wrapper:not(:has(.wc-block-components-notice-banner, .woocommerce-message, .woocommerce-error, .woocommerce-info)) {
	display: none;
}

.ggn-account .woocommerce-MyAccount-content > :first-child {
	margin-top: 0;
}

/* The logged-out page has no account navigation, so keep its title and form together. */
.ggn-account:has(.ggn-account-login) {
	--wp--style--block-gap: var(--wp--preset--spacing--card-lg);
	padding-bottom: var(--wp--preset--spacing--section) !important;
	padding-top: var(--wp--preset--spacing--section) !important;
}

.ggn-account:has(.ggn-account-login) > .wp-block-post-title {
	margin-bottom: var(--wp--preset--spacing--card-lg);
	text-align: center;
}

.ggn-account:has(.ggn-account-login) > .wp-block-post-content {
	margin-block-start: 0;
}

/* Forms and authentication tabs */
.ggn-account .ggn-account-login {
	margin: 0 auto;
	max-width: 440px;
	width: 100%;
}

.ggn-account .ggn-account-login__tabs:has(.ggn-account-login__tab:only-child) {
	display: none;
}

/* Keep WooCommerce authentication forms inside the single account card. */
.ggn-account .ggn-account-login__panel > .woocommerce-form-login,
.ggn-account .ggn-account-login__panel > .woocommerce-form-register {
	background: transparent;
	border: 0;
	box-shadow: none;
	margin: 0;
	padding: 0;
}

.ggn-account .woocommerce-ResetPassword {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	box-shadow: none;
	margin: 0 auto;
	max-width: calc(var(--wp--style--global--wide-size) / 2);
	padding: var(--wp--preset--spacing--card-lg);
}

.ggn-account .ggn-account-login__tabs {
	border-bottom: 1px solid var(--wp--preset--color--line);
	display: flex;
	gap: var(--wp--preset--spacing--card);
	margin-bottom: var(--wp--preset--spacing--card-lg);
}

.ggn-account .ggn-account-login__tab {
	background-color: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	min-height: var(--wp--custom--control--size);
	padding: 0 var(--wp--preset--spacing--card);
}

.ggn-account .ggn-account-login__tab[aria-selected="true"] {
	border-bottom-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--text);
}

.ggn-account .ggn-account-login label,
.ggn-account .woocommerce-form label,
.ggn-account .woocommerce-EditAccountForm label {
	color: var(--wp--preset--color--text);
	display: block;
	font-weight: 600;
	margin-bottom: var(--wp--preset--spacing--card);
}

.ggn-account .woocommerce form .form-row {
	margin-bottom: var(--wp--preset--spacing--card-lg);
}

.ggn-account .woocommerce-EditAccountForm input.input-text,
.ggn-account .woocommerce-ResetPassword input.input-text {
	width: 100%;
}

.ggn-account .woocommerce form .button,
.ggn-account .ggn-account-orders__action .button {
	background-color: var(--wp--preset--color--accent);
	border: 0;
	border-radius: var(--wp--custom--radius--control);
	color: var(--wp--preset--color--on-accent);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	min-height: var(--wp--custom--button--height);
	padding: 0 var(--wp--preset--spacing--card-lg);
}

.ggn-account .woocommerce-form .woocommerce-form-login__rememberme {
	align-items: center;
	display: inline-flex;
	gap: var(--wp--preset--spacing--card);
	line-height: 1.2;
	margin-bottom: 0;
}

.ggn-account .woocommerce-form-login__rememberme input {
	accent-color: var(--wp--preset--color--accent);
	height: calc(var(--wp--preset--spacing--card) * 2);
	min-height: auto;
	width: calc(var(--wp--preset--spacing--card) * 2);
	flex: 0 0 calc(var(--wp--preset--spacing--card) * 2);
	margin: 0;
}

.ggn-account .ggn-account-login__help,
.ggn-account .woocommerce-LostPassword {
	color: var(--wp--preset--color--muted);
}

.ggn-account .woocommerce-LostPassword a,
.ggn-account .woocommerce-pagination a {
	align-items: center;
	display: inline-flex;
	min-height: var(--wp--custom--control--size);
}

.ggn-account .woocommerce-password-strength {
	border-radius: var(--wp--custom--radius--control);
	margin-top: var(--wp--preset--spacing--card);
	padding: var(--wp--preset--spacing--card);
}

.ggn-account .woocommerce-password-strength.good,
.ggn-account .woocommerce-password-strength.strong {
	background-color: var(--wp--preset--color--good-soft);
	color: var(--wp--preset--color--good);
}

.ggn-account .woocommerce-password-strength.short,
.ggn-account .woocommerce-password-strength.bad {
	background-color: var(--wp--preset--color--bad-soft);
	color: var(--wp--preset--color--bad);
}

.ggn-account .woocommerce-password-strength.weak {
	background-color: var(--wp--preset--color--warn-soft);
	color: var(--wp--preset--color--warn);
}

.ggn-account .wc-password-strength-meter .good,
.ggn-account .wc-password-strength-meter .strong {
	background-color: var(--wp--preset--color--good-soft);
	color: var(--wp--preset--color--good);
}

.ggn-account .wc-password-strength-meter .warn,
.ggn-account .wc-password-strength-meter .weak {
	background-color: var(--wp--preset--color--warn-soft);
	color: var(--wp--preset--color--warn);
}

.ggn-account .wc-password-strength-meter .bad,
.ggn-account .wc-password-strength-meter .short {
	background-color: var(--wp--preset--color--bad-soft);
	color: var(--wp--preset--color--bad);
}

.ggn-account .ggn-account__whatsapp span {
	background-color: var(--wp--preset--color--surface-2);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--control);
	display: block;
	min-height: var(--wp--custom--control--size);
	padding: 0 var(--wp--preset--spacing--card);
	line-height: var(--wp--custom--control--size);
}

/* Orders */
.ggn-account .ggn-account-orders {
	display: grid;
	gap: var(--wp--preset--spacing--card);
}

.ggn-account .ggn-account-orders__order {
	display: grid;
	gap: var(--wp--preset--spacing--card);
	padding: var(--wp--preset--spacing--card);
}

.ggn-account .ggn-account-orders__row {
	align-items: center;
	display: flex;
	justify-content: space-between;
	min-width: 0;
}

.ggn-account .ggn-account-orders__row p {
	margin: 0;
}

.ggn-account .ggn-account-orders__row--meta {
	justify-content: flex-start;
	gap: var(--wp--preset--spacing--card);
}

.ggn-account .ggn-account-orders__row--meta + .ggn-account-orders__row {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: var(--wp--preset--spacing--card);
}

.ggn-account .ggn-account-orders__number a {
	align-items: center;
	color: var(--wp--preset--color--text);
	display: inline-flex;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	min-height: var(--wp--custom--control--size);
	text-decoration: none;
}

.ggn-account .ggn-account-orders__row > .ggn-pill {
	align-items: center;
	display: inline-flex;
	flex: 0 0 auto;
	justify-content: center;
	line-height: 1.2;
}

.ggn-account .ggn-account-orders__date,
.ggn-account .ggn-account-orders__items {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--meta);
}

.ggn-account .ggn-account-orders__total {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	white-space: nowrap;
}

.ggn-account .ggn-account-orders__action .button {
	background-color: transparent;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--control);
	box-sizing: border-box;
	color: var(--wp--preset--color--text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--wp--custom--control--size);
	padding: 0 var(--wp--preset--spacing--card-lg);
	text-decoration: none;
}

/* Order journey */
.ggn-account .ggn-account-timeline {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	margin-bottom: var(--wp--preset--spacing--card-lg);
	padding: var(--wp--preset--spacing--card-lg);
}

.ggn-account .ggn-account-timeline ol {
	align-items: start;
	display: grid;
	gap: 0;
	grid-template-columns: repeat(3, minmax(0, 1fr) minmax(8px, .5fr)) minmax(0, 1fr);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ggn-account .ggn-account-timeline li {
	border: 0;
	color: var(--wp--preset--color--muted);
	min-width: 0;
}

.ggn-account .ggn-account-timeline .ggn-order-progress__step {
	align-content: start;
	align-items: center;
	display: grid;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	gap: var(--wp--preset--spacing--10);
	justify-items: center;
	text-align: center;
}

.ggn-account .ggn-account-timeline .ggn-order-progress__marker {
	align-items: center;
	background-color: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--pill);
	display: inline-flex;
	height: var(--wp--preset--spacing--30);
	justify-content: center;
	width: var(--wp--preset--spacing--30);
}

.ggn-account .ggn-account-timeline .ggn-order-progress__marker svg {
	height: var(--wp--preset--font-size--small);
	width: var(--wp--preset--font-size--small);
}

.ggn-account .ggn-account-timeline .ggn-order-progress__marker path {
	fill: none;
	stroke: var(--wp--preset--color--surface);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.ggn-account .ggn-account-timeline .ggn-order-progress__step.is-done {
	color: var(--wp--preset--color--good);
}

.ggn-account .ggn-account-timeline .ggn-order-progress__step.is-done .ggn-order-progress__marker {
	background-color: var(--wp--preset--color--good);
	border-color: var(--wp--preset--color--good);
	color: var(--wp--preset--color--good);
}

.ggn-account .ggn-account-timeline .ggn-order-progress__step.is-current {
	color: var(--wp--preset--color--accent);
}

.ggn-account .ggn-account-timeline .ggn-order-progress__step.is-current .ggn-order-progress__marker {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.ggn-account .ggn-account-timeline .ggn-order-progress__connector {
	align-self: start;
	border-top: 2px solid var(--wp--preset--color--line);
	margin-top: calc(var(--wp--preset--spacing--30) / 2);
}

.ggn-account .ggn-account-timeline .ggn-order-progress__connector.is-solid,
.ggn-account .ggn-account-timeline .ggn-order-progress__connector.is-dotted {
	border-color: var(--wp--preset--color--good);
}

.ggn-account .ggn-account-timeline .ggn-order-progress__connector.is-dotted {
	border-top-style: dotted;
}

.ggn-account .ggn-account-timeline li > span:not(.ggn-order-progress__marker):not(.screen-reader-text) {
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 400;
	font-family: var(--wp--preset--font-family--body);
}

.ggn-account .ggn-account-timeline .ggn-order-progress__step.is-done strong {
	color: var(--wp--preset--color--good);
}

.ggn-account .ggn-account-timeline--cancelled ol {
	display: block;
}

.ggn-account .ggn-account-timeline--cancelled li {
	border-left: 2px solid var(--wp--preset--color--bad);
	color: var(--wp--preset--color--bad);
	padding-left: var(--wp--preset--spacing--card-lg);
}

.ggn-account .ggn-account__endpoint-back {
	display: none;
}

@media (max-width: 781px) {
	/* The mobile header bar already shows the page name; keep the h1 for screen readers only. */
	.ggn-account:not(:has(.ggn-account-login)) > .wp-block-post-title {
		clip-path: inset(50%);
		height: 1px;
		overflow: hidden;
		position: absolute;
		white-space: nowrap;
		width: 1px;
	}

	.ggn-account .woocommerce {
		display: block;
	}

	.ggn-account .woocommerce > .woocommerce-MyAccount-navigation,
	.ggn-account .woocommerce > .woocommerce-MyAccount-content {
		float: none;
		width: auto;
	}

	.ggn-account .woocommerce-MyAccount-navigation {
		margin-bottom: var(--wp--preset--spacing--30);
	}

	.ggn-account .woocommerce-MyAccount-navigation ul {
		display: flex;
		gap: var(--wp--preset--spacing--10);
		overflow-x: auto;
	}

	.ggn-account .woocommerce-MyAccount-navigation li:last-child {
		border-top: 0;
		margin-top: 0;
		padding-top: 0;
	}

	.ggn-account .woocommerce-MyAccount-navigation li {
		flex: 0 0 auto;
	}

	.ggn-account .woocommerce-MyAccount-navigation a {
		min-height: var(--wp--custom--control--size);
		white-space: nowrap;
	}

	.ggn-account .woocommerce-MyAccount-navigation a::after {
		display: none;
	}

	.ggn-account .woocommerce-form-login__submit {
		width: 100%;
	}

	.ggn-account .ggn-account-orders__action .button {
		min-height: 44px;
	}
}
