/* -------------------------------------------------------------------------------------------------
 * Signing in: the header's sign in dialog and the My Account login page, which share one look.
 *
 * The page is WooCommerce's form ( woocommerce/myaccount/form-login.php ), so these rules also have to
 * outweigh WooCommerce's form styles and the parent theme's inputs, hence the doubled up selectors below.
 * ------------------------------------------------------------------------------------------------- */

/* The dialog. */
.glp-login-modal {
	width: min(393px, calc(100% - 2 * var(--wp--preset--spacing--small)));
	max-width: none;
	padding: 24px;
	border: 0;
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--secondary);
}

.glp-login-modal::backdrop {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 50%, transparent);
}

/* The page: sign in and create an account side by side, one under the other on a phone. */
.woocommerce .glp-login-page {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
	gap: var(--wp--preset--spacing--large);
	max-width: 880px;
	margin: var(--wp--preset--spacing--x-large) auto;
	padding-inline: var(--wp--preset--spacing--small);
	box-sizing: border-box;
}

.woocommerce .glp-login-page--single {
	max-width: calc(393px + 2 * var(--wp--preset--spacing--small));
}

/* A failed login's notice lines up with the cards below it rather than running edge to edge. */
.woocommerce > .woocommerce-notices-wrapper:has(+ .glp-login-page) {
	max-width: 880px;
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--small);
	box-sizing: border-box;
}

.woocommerce > .woocommerce-notices-wrapper:has(+ .glp-login-page--single) {
	max-width: calc(393px + 2 * var(--wp--preset--spacing--small));
}

.woocommerce > .woocommerce-notices-wrapper:not(:empty):has(+ .glp-login-page) {
	padding-block-start: var(--wp--preset--spacing--x-large);
}

.woocommerce > .woocommerce-notices-wrapper:not(:empty) + .glp-login-page {
	margin-block-start: 0;
}

.woocommerce > .woocommerce-notices-wrapper:has(+ .glp-login-page) > * {
	border-radius: var(--wp--custom--radius--medium);
}

.woocommerce > .woocommerce-notices-wrapper:has(+ .glp-login-page) > :first-child {
	margin-block-start: 0;
}

/* WooCommerce's clearfix would take up grid cells of its own. */
.woocommerce .glp-login-page::before,
.woocommerce .glp-login-page::after {
	display: none;
}

.woocommerce .glp-login-page .glp-login-card {
	float: none;
	width: auto;
	padding: 24px;
	border: 1px solid var(--wp--custom--color--secondary--100);
	border-radius: var(--wp--custom--radius--medium);
	/* Arrived at by #register, the card sits clear of the sticky header. */
	scroll-margin-top: calc(var(--glp-band-top, 0px) + var(--glp-nav-height) + var(--wp--preset--spacing--small));
}

/* The forms. */
.glp-login,
.woocommerce form.glp-login {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--custom--color--secondary--800);
}

.glp-login p,
.woocommerce form.glp-login .form-row {
	margin: 0;
	padding: 0;
}

/* Neither WooCommerce's clearfixes nor its empty placeholders ( order attribution, a blank privacy notice )
 * should take up a gap of their own in a flex column. */
.woocommerce form.glp-login::before,
.woocommerce form.glp-login::after,
.woocommerce form.glp-login .form-row::before,
.woocommerce form.glp-login .form-row::after,
.woocommerce form.glp-login > :empty {
	display: none;
}

/* The row that holds "remember me" and the button stacks them the same distance apart as everything else. */
.woocommerce form.glp-login .form-row:has(.glp-login__submit) {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.glp-login__title,
.glp-login-card .glp-login__title {
	margin: 0 0 16px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem;
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.1;
	text-align: center;
	color: var(--wp--preset--color--primary);
}

.glp-login-modal .glp-login__title {
	margin: 0;
}

.glp-login input.glp-login__input,
.woocommerce form.glp-login .form-row .glp-login__input {
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 10px 10px 10px 12px;
	box-sizing: border-box;
	border: 1px solid var(--wp--custom--color--secondary--800);
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.5;
	color: var(--wp--preset--color--secondary);
}

.glp-login input.glp-login__input::placeholder {
	color: var(--wp--custom--color--secondary--500);
	opacity: 1;
}

.glp-login input.glp-login__input:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
}

/* Show / hide password: the dialog's own button, and the one WooCommerce's script adds to the page. */
.glp-login__password,
.woocommerce form.glp-login .password-input {
	position: relative;
	display: block;
}

.glp-login .glp-login__password input.glp-login__input,
.woocommerce form.glp-login .form-row .password-input .glp-login__input {
	padding-right: 44px;
}

.glp-login__show-password,
.woocommerce form.glp-login .password-input .show-password-input {
	position: absolute;
	top: 50%;
	right: 10px;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background-color: var(--wp--custom--color--secondary--800);
	-webkit-mask: url("../assets/icons/visibility.svg") center / 24px 24px no-repeat;
	mask: url("../assets/icons/visibility.svg") center / 24px 24px no-repeat;
	transform: translateY(-50%);
	cursor: pointer;
}

.woocommerce form.glp-login .password-input .show-password-input::after {
	content: none;
}

/* Showing the password: the eye turns green rather than changing shape. */
.glp-login__show-password.display-password,
.woocommerce form.glp-login .password-input .show-password-input.display-password {
	background-color: var(--wp--preset--color--primary);
}

/* Remember me.  The box is drawn at the size of the design's check_box icon's box, and ticked with it. */
.glp-login__remember,
.woocommerce form.glp-login .glp-login__remember {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: normal;
	color: var(--wp--custom--color--secondary--800);
	cursor: pointer;
}

.glp-login__remember input[type="checkbox"] {
	flex: none;
	width: 17px;
	height: 17px;
	margin: 3.5px;
	box-sizing: border-box;
	border: 1.5px solid var(--wp--custom--color--secondary--800);
	border-radius: 2px;
	background: var(--wp--preset--color--base);
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.glp-login__remember input[type="checkbox"]:checked {
	width: 24px;
	height: 24px;
	margin: 0;
	border: 0;
	background: var(--wp--preset--color--primary);
	-webkit-mask: url("../assets/icons/check-box.svg") center / 24px 24px no-repeat;
	mask: url("../assets/icons/check-box.svg") center / 24px 24px no-repeat;
}

.glp-login__remember input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* The button: the theme's button, full width with the arrow at the far end, grey until it can be pressed. */
.glp-login .glp-login__submit,
.woocommerce form.glp-login .form-row .glp-login__submit {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 16px 20px;
	border: 0;
	border-radius: var(--wp--custom--radius--small);
	font-size: 1.25rem;
	letter-spacing: var(--wp--custom--letter-spacing--button);
	line-height: 1.1;
	text-align: left;
}

.glp-login .glp-login__submit:disabled,
.glp-login .glp-login__submit[aria-busy="true"] {
	background: var(--wp--custom--color--secondary--400);
	color: var(--wp--custom--color--secondary--50);
	cursor: default;
	opacity: 1;
}

.glp-login__submit-icon,
.glp-login__submit-icon svg {
	display: block;
	width: 24px;
	height: 24px;
}

/* While the button is working, a spinner takes the arrow's place. */
.glp-login__submit[aria-busy="true"] .glp-login__submit-icon svg {
	display: none;
}

.glp-login__submit[aria-busy="true"] .glp-login__submit-icon::after {
	content: "";
	display: block;
	width: 20px;
	height: 20px;
	margin: 2px;
	box-sizing: border-box;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: glp-login-spin 0.8s linear infinite;
}

@keyframes glp-login-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.glp-login__submit[aria-busy="true"] .glp-login__submit-icon::after {
		animation-duration: 2s;
	}
}

.glp-login__error {
	font-size: var(--wp--preset--font-size--small);
}

.glp-login__note {
	font-size: var(--wp--preset--font-size--small);
}

.glp-login__lost-password {
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
}

/* The dialog's lost password and register links, one at either end of a line. */
.glp-login__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	font-size: var(--wp--preset--font-size--small);
}

.glp-login__lost-password a,
.glp-login__links a {
	color: var(--wp--preset--color--primary);
}

/* -------------------------------------------------------------------------------------------------
 * The logged in account: the header across the top of every page, and the tabs under it.
 * ------------------------------------------------------------------------------------------------- */

/* The Profile form and the Billing tab's addresses: the same white cards as the login page. */
.woocommerce-account .woocommerce .woocommerce-Address,
.woocommerce-account .woocommerce .woocommerce-EditAccountForm {
	padding: 24px;
	border: 1px solid var(--wp--custom--color--secondary--100);
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--base);
}

/* An address's Add / Edit link sits under its heading at the left; WooCommerce floats it right
 * ( ".woocommerce-account .addresses .title .edit", which this outranks ). */
.woocommerce-account .woocommerce .woocommerce-Address .woocommerce-Address-title .edit {
	float: none;
	display: block;
	text-align: left;
}

/* The profile picture, at the top of the Profile form: the picture beside its buttons, ruled off from the
 * fields below. */
.woocommerce-account .woocommerce .glp-profile-picture {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 0 0 24px;
	padding: 0 0 24px;
	border: 0;
	border-bottom: 1px solid var(--wp--custom--color--secondary--100);
	font-family: var(--wp--preset--font-family--body);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
}

.woocommerce-account .woocommerce .glp-profile-picture__legend {
	float: left;
	width: 100%;
	margin: 0 0 4px;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.glp-profile-picture__image {
	display: block;
	flex: none;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: var(--wp--custom--color--secondary--50);
	object-fit: cover;
}

.glp-profile-picture__controls {
	display: flex;
	flex: 1 1 180px;
	flex-direction: column;
	gap: 8px;
}

.glp-profile-picture__buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

/* The file input is hidden behind its label, the button people see.  Not screen-reader-text: that class
 * shows itself on focus, for skip links, so choosing a file would bring the input up in the page's corner.
 * Hidden this way it still takes focus from the keyboard, and the label shows the focus instead. */
.woocommerce-account .woocommerce .glp-profile-picture__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	opacity: 0;
	white-space: nowrap;
}

/* Doubled up to outweigh WooCommerce's and the theme's form labels. */
.woocommerce-account .woocommerce .glp-profile-picture__upload {
	display: inline-block;
	width: auto;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--large);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
}

.woocommerce-account .woocommerce .glp-profile-picture__upload:hover,
.woocommerce-account .woocommerce .glp-profile-picture__input:focus-visible + .glp-profile-picture__upload {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.glp-profile-picture__input:focus-visible + .glp-profile-picture__upload {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* "Upload a photo" until there is one, then "Change photo" and Remove beside it. */
.glp-profile-picture__upload-change,
.glp-profile-picture.has-picture .glp-profile-picture__upload-new {
	display: none;
}

.glp-profile-picture.has-picture .glp-profile-picture__upload-change {
	display: inline;
}

.woocommerce-account .woocommerce .glp-profile-picture__remove {
	display: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.1;
	text-decoration: underline;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
}

.woocommerce-account .woocommerce .glp-profile-picture.has-picture .glp-profile-picture__remove {
	display: inline-block;
}

.woocommerce-account .woocommerce .glp-profile-picture__remove:hover,
.woocommerce-account .woocommerce .glp-profile-picture__remove:focus-visible {
	background: none;
	color: var(--wp--preset--color--primary);
}

.glp-profile-picture[aria-busy] .glp-profile-picture__image,
.glp-profile-picture[aria-busy] .glp-profile-picture__buttons {
	opacity: 0.5;
	pointer-events: none;
}

.woocommerce-account .woocommerce .glp-profile-picture p {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.4;
	color: var(--wp--custom--color--secondary--600);
}

.woocommerce-account .woocommerce .glp-profile-picture .glp-profile-picture__message.is-success {
	color: var(--wp--preset--color--primary);
}

.woocommerce-account .woocommerce .glp-profile-picture .glp-profile-picture__message.is-error {
	color: var(--wp--custom--color--error--800);
}

/* The note that the photo is from Gravatar: only while there is no upload of their own. */
.glp-profile-picture.has-picture .glp-profile-picture__gravatar {
	display: none;
}

/* After an upload the new photo says it all; the message stays for screen readers ( profile-picture.js ). */
.woocommerce-account .woocommerce .glp-profile-picture .glp-profile-picture__message.is-quiet {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* The account runs the full width of the page - its header and tabs are bands across it - rather than the
 * content width the page's layout would hold it to. */
.woocommerce-account main .woocommerce {
	max-width: 100%;
}

/* WooCommerce puts the navigation beside the content; here it is a row of tabs above. */
.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
	float: none;
	width: auto;
}

.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
	max-width: 880px;
	margin-inline: auto;
	padding: var(--wp--preset--spacing--large) var(--wp--preset--spacing--small);
	box-sizing: border-box;
}

.glp-account-header {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 32px 20px 24px;
	background:
		linear-gradient(color-mix(in srgb, var(--wp--preset--color--tertiary) 20%, transparent), color-mix(in srgb, var(--wp--preset--color--tertiary) 20%, transparent)),
		linear-gradient(180deg, var(--wp--preset--color--primary) 0%, var(--wp--custom--color--primary--600) 50%, var(--wp--custom--color--primary--700) 100%);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: normal;
	text-align: center;
	color: var(--wp--preset--color--base);
}

.glp-account-header p {
	margin: 0;
}

.glp-account-header__avatar {
	display: block;
	width: 72px;
	height: 72px;
	box-sizing: border-box;
	border: 2px solid var(--wp--preset--color--base);
	border-radius: 50%;
	background: var(--wp--custom--color--secondary--50);
	object-fit: cover;
}

.glp-account-header__greeting {
	font-weight: 600;
}

.glp-account-header__status {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--wp--preset--color--accent);
}

.glp-account-header__since {
	font-weight: 500;
	text-transform: uppercase;
}

/* Log out isn't one of the design's tabs, so it sits quietly in the header's corner. */
.glp-account-header__logout {
	position: absolute;
	top: 16px;
	right: var(--wp--preset--spacing--small);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: var(--wp--custom--letter-spacing--wider);
	text-transform: uppercase;
	color: var(--wp--preset--color--base);
	opacity: 0.8;
}

.glp-account-header__logout:hover,
.glp-account-header__logout:focus-visible {
	opacity: 1;
}

/* The tabs sit on a darker band, the chosen one white like the page below it. */
.woocommerce-account .woocommerce .glp-account-tabs {
	display: flex;
	justify-content: center;
	padding: 16px var(--wp--preset--spacing--small) 0;
	background: var(--wp--custom--color--primary--700);
}

.woocommerce-account .woocommerce .glp-account-tabs__list {
	display: flex;
	align-items: flex-end;
	gap: 1px;
	max-width: 100%;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	filter: drop-shadow(0 0 8px color-mix(in srgb, var(--wp--preset--color--contrast) 15%, transparent));
	scrollbar-width: none;
}

.woocommerce-account .woocommerce .glp-account-tabs__tab {
	flex: none;
	margin: 0;
	padding: 0;
}

.woocommerce-account .woocommerce .glp-account-tabs__tab a {
	display: block;
	padding: 10px 16px;
	border-radius: var(--wp--custom--radius--medium) var(--wp--custom--radius--medium) 0 0;
	background: linear-gradient(180deg, var(--wp--custom--color--secondary--50) 80.288%, var(--wp--custom--color--secondary--100));
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.1;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--wp--preset--color--contrast);
}

.woocommerce-account .woocommerce .glp-account-tabs__tab a:hover {
	background: var(--wp--custom--color--secondary--50);
}

.woocommerce-account .woocommerce .glp-account-tabs__tab.is-active a {
	padding-top: 14px;
	background: var(--wp--preset--color--base);
}

/* -------------------------------------------------------------------------------------------------
 * The Status tab ( the Account Status template part ): a section per topic, heading and intro above.
 * ------------------------------------------------------------------------------------------------- */

/* On this tab the sections set their own widths, so the content area gives up its own. */
.woocommerce-account .woocommerce .woocommerce-MyAccount-content:has(> .glp-account-status) {
	max-width: none;
	padding: 0;
}

.glp-account-status > .glp-account-section {
	margin-block: 0;
}

.glp-account-section {
	gap: 24px;
}

.glp-account-section--intro,
.glp-account-section--progress {
	max-width: calc(420px + 2 * 24px);
	margin-inline: auto;
	padding-inline: 24px;
	box-sizing: border-box;
}

.glp-account-section--intro {
	gap: 10px;
	padding-top: 32px;
}

.glp-account-section--progress {
	padding-block: 24px 40px;
}

.glp-account-section .glp-account-section__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.1;
	color: var(--wp--preset--color--contrast);
}

.glp-account-section .glp-account-section__text {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9375rem;
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: normal;
	color: var(--wp--preset--color--secondary);
}

/* The membership progress card. */
.glp-membership-progress {
	gap: 24px;
	padding: 40px 24px 24px;
	border-radius: 22px;
	background: var(--wp--preset--color--base);
	box-shadow: 0 2px 10px color-mix(in srgb, var(--wp--preset--color--contrast) 25%, transparent);
	font-family: var(--wp--preset--font-family--body);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	text-align: center;
}

.glp-membership-progress p {
	margin: 0;
}

.glp-membership-progress__number {
	font-size: 3rem;
	font-weight: 700;
	line-height: normal;
	color: var(--wp--preset--color--contrast);
}

.glp-membership-progress__label {
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.3;
	color: var(--wp--custom--color--contrast--700);
}

.glp-membership-progress__status {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-block: 16px;
	border-block: 1px solid var(--wp--custom--color--secondary--100);
}

.glp-membership-progress__title {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--wp--preset--color--secondary);
}

.glp-membership-progress__title a {
	color: inherit;
	text-decoration: none;
}

.glp-membership-progress__title a:hover,
.glp-membership-progress__title a:focus-visible {
	text-decoration: underline;
}

.glp-membership-progress__body {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.4;
	color: var(--wp--custom--color--contrast--700);
}

.glp-membership-progress__body strong,
.glp-membership-progress__body .woocommerce-Price-amount {
	font-weight: 700;
}

.glp-membership-progress__activity {
	padding: 10px 16px;
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--custom--color--secondary--50);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.4;
	text-align: left;
	text-decoration: none;
	text-transform: uppercase;
	color: var(--wp--preset--color--secondary);
}

.glp-membership-progress__activity:hover,
.glp-membership-progress__activity:focus-visible {
	background: var(--wp--custom--color--secondary--100);
}

.glp-membership-progress__activity-icon {
	color: var(--wp--custom--color--secondary--800);
}

/* -------------------------------------------------------------------------------------------------
 * Points and rewards: a dark band with the balance, and a card for each reward.  The competitions follow
 * on a light band.
 * ------------------------------------------------------------------------------------------------- */

.glp-account-section--rewards,
.glp-account-section--competitions {
	gap: 40px;
	padding: 40px 20px 48px;
	background: var(--wp--preset--color--secondary);
}

/* The competitions leave the dark band for a light one, which Play with friends carries on under them. */
.glp-account-section--competitions {
	background: var(--wp--custom--color--secondary--100);
}

.glp-account-section--competitions:has(+ .glp-account-section--referral) {
	padding-bottom: 0;
}

/* A footnote under a section's content: the odds' asterisk, on the competitions. */
.glp-account-section .glp-account-section__note {
	margin: 8px 0 0;
	padding-inline: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.3;
	color: var(--wp--preset--color--contrast);
}

/* While the carousel has arrows, the footnote sits beside them rather than under them: centred on their
 * 3rem row, and stopping short of the two of them on the right - a margin, not padding, so its box does
 * not lie over the arrows and take their taps.  Without arrows it stays just under the cards. */
.glp-account-section__group:has(.glp-competition-context__nav:not([hidden])) > .glp-account-section__note {
	margin-top: calc(-8px - 1.5rem - 0.5lh);
	margin-inline-end: calc(2 * 3rem + var(--wp--preset--spacing--x-small) + 16px);
}

.glp-account-section--competitions .glp-competition-context__arrow {
	color: var(--wp--preset--color--secondary);
}

.glp-account-section--competitions .glp-competition-context__arrow:hover:not(:disabled),
.glp-account-section--competitions .glp-competition-context__arrow:focus-visible {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
}

/* Doubled up to outweigh the flex layout's own reset of its children's margins. */
.glp-account-status .glp-account-section--competitions > *,
.glp-account-status .glp-account-section--rewards > * {
	width: 100%;
	max-width: 840px;
	margin-inline: auto;
}

.glp-account-section__group {
	gap: 8px;
}

.glp-account-section .glp-account-section__label {
	margin: 0;
	padding-inline: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--custom--color--accent--100);
}

.glp-account-section--competitions .glp-account-section__label {
	color: var(--wp--preset--color--secondary);
}

/* The balance. */
.glp-current-points {
	box-sizing: border-box;
	padding: 16px 20px 16px 14px;
	border: 1px solid var(--wp--custom--color--primary--600);
	border-radius: 22px;
	background: var(--wp--preset--color--primary);
	box-shadow: 0 2px 8px color-mix(in srgb, var(--wp--preset--color--contrast) 50%, transparent);
	font-family: var(--wp--preset--font-family--body);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.4;
	color: var(--wp--custom--color--accent--600);
}

.glp-current-points:hover,
.glp-current-points:focus-visible {
	background: var(--wp--custom--color--primary--600);
}

.glp-current-points__points {
	font-size: 1.4375rem;
	font-weight: 700;
	text-shadow: 0 1px 1px color-mix(in srgb, var(--wp--preset--color--contrast) 25%, transparent);
}

.glp-current-points__value {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	text-transform: uppercase;
	color: var(--wp--custom--color--accent--200);
}

/* A card for each reward: cream once it has paid out, dark and dimmed until then. */
.glp-reward-cards__list {
	scrollbar-color: var(--wp--custom--color--secondary--700) transparent;
}

.glp-reward-cards__nav button {
	width: 40px;
	height: 40px;
	border: 1px solid var(--wp--custom--color--accent--200);
	border-radius: 50%;
	background: transparent;
	color: var(--wp--custom--color--accent--200);
}

.glp-reward-cards__nav button:hover:not(:disabled),
.glp-reward-cards__nav button:focus-visible {
	background: var(--wp--custom--color--accent--200);
	color: var(--wp--preset--color--secondary);
}

.glp-reward-cards__nav button:disabled {
	opacity: 0.3;
}

.glp-reward-cards__card {
	padding: 24px 12px;
	border: 1px solid;
	border-radius: 16px;
	box-shadow: 0 1px 8px color-mix(in srgb, var(--wp--preset--color--contrast) 25%, transparent);
	font-family: var(--wp--preset--font-family--body);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.4;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.glp-reward-cards__card:hover,
.glp-reward-cards__card:focus-visible {
	transform: translateY(-2px);
}

.glp-reward-cards__card:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.glp-reward-cards__card--earned {
	border-color: var(--wp--custom--color--accent--50);
	background: var(--wp--custom--color--accent--100);
	color: var(--wp--preset--color--primary);
}

.glp-reward-cards__card--locked {
	border-color: var(--wp--custom--color--secondary--700);
	background: var(--wp--custom--color--secondary--900);
	color: var(--wp--custom--color--accent--300);
	opacity: 0.6;
}

.glp-reward-cards__card--locked:hover,
.glp-reward-cards__card--locked:focus-visible {
	opacity: 0.85;
}

.glp-reward-cards__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--contrast);
}

.glp-reward-cards__card--locked .glp-reward-cards__title {
	color: var(--wp--custom--color--accent--200);
}

.glp-reward-cards__earned {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
}

.glp-reward-cards__points {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
}

.glp-reward-cards__text {
	font-size: 0.8125rem;
	color: var(--wp--custom--color--secondary--800);
}

.glp-reward-cards__card--locked .glp-reward-cards__text {
	color: var(--wp--custom--color--accent--200);
}

.glp-reward-cards__badges {
	margin-top: 8px;
	padding: 5px 8px;
	border-radius: 6px;
	background: var(--wp--custom--color--accent--200);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-transform: uppercase;
	color: var(--wp--custom--color--primary--700);
}

/* The reward's full card, in a dialog. */
.glp-reward-cards__dialog {
	padding: 40px 24px 24px;
	border: 0;
	border-radius: 22px;
	background: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	color: var(--wp--custom--color--secondary--800);
}

.glp-reward-cards__dialog::backdrop {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
}

/* While a reward is open, scrolling stays in it: the page behind is held still, and reaching the end of the
 * reward's own content does not carry on into the page. */
html:has(.glp-reward-cards__dialog[open]) {
	overflow: hidden;
}

.glp-reward-cards__dialog {
	overscroll-behavior: contain;
}

.glp-reward-cards__close {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--wp--custom--color--secondary--800);
}

.glp-reward-cards__dialog .reward-card {
	text-align: center;
}

.glp-reward-cards__dialog .reward-card h2 {
	margin: 0 0 12px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--wp--preset--color--contrast);
}

.glp-reward-cards__dialog .reward-description {
	font-size: 0.9375rem;
	line-height: 1.5;
}

.glp-reward-cards__dialog .earned-points-value {
	color: var(--wp--preset--color--primary);
}

.glp-reward-cards__dialog .reward-badges {
	margin-top: 16px;
}

.glp-reward-cards__dialog .badge-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 8px;
}

.glp-reward-cards__dialog .milestone-progress-container {
	margin-top: 24px;
}

.glp-reward-cards__dialog .milestone-progress-fill,
.glp-reward-cards__dialog .milestone-notch-reached {
	background-color: var(--wp--preset--color--primary);
}

/* -------------------------------------------------------------------------------------------------
 * Play with friends: the referral programme, and the form that emails or copies the customer's link.
 * ------------------------------------------------------------------------------------------------- */

.glp-account-section--referral {
	padding: 32px 20px 40px;
	background: var(--wp--custom--color--secondary--100);
}

/* Doubled up to outweigh the flex layout's own reset of its children's margins. */
.glp-account-status .glp-account-section--referral > * {
	width: 100%;
	max-width: 840px;
	margin-inline: auto;
}

.glp-referral {
	gap: 16px;
	padding-top: 24px;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 50%, transparent);
}

.glp-referral > * {
	max-width: 560px;
}

.glp-account-section--referral .glp-account-section__title {
	font-size: 1.5rem;
	font-weight: 500;
	line-height: normal;
}

.glp-account-section--referral .glp-account-section__text {
	line-height: 1.5;
	color: var(--wp--preset--color--contrast);
}

.glp-referral-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
}

/* Doubled up to outweigh the parent theme's inputs. */
.glp-referral-form input.glp-referral-form__email {
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	box-sizing: border-box;
	border: 1px solid var(--wp--custom--color--contrast--600);
	border-radius: 6px;
	background: var(--wp--preset--color--base);
	box-shadow: none;
	font-family: inherit;
	font-size: 0.9375rem;
	letter-spacing: inherit;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast);
}

.glp-referral-form input.glp-referral-form__email::placeholder {
	color: var(--wp--preset--color--contrast);
	opacity: 0.5;
}

.glp-referral-form input.glp-referral-form__email:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
}

.glp-referral-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.glp-referral-form .glp-referral-form__send,
.glp-referral-form .glp-referral-form__copy {
	margin: 0;
	padding: 12px 16px;
	border: 0;
	border-radius: var(--wp--custom--radius--large);
	font-family: inherit;
	font-size: 1rem;
	letter-spacing: inherit;
	line-height: 1.1;
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
}

.glp-referral-form .glp-referral-form__send {
	background: var(--wp--preset--color--primary);
	font-weight: 700;
	color: var(--wp--preset--color--base);
}

.glp-referral-form .glp-referral-form__send:hover,
.glp-referral-form .glp-referral-form__send:focus-visible {
	background: var(--wp--custom--color--primary--700);
	color: var(--wp--preset--color--base);
}

.glp-referral-form .glp-referral-form__send:disabled {
	opacity: 0.6;
	cursor: progress;
}

.glp-referral-form .glp-referral-form__copy {
	background: transparent;
	font-weight: 500;
	text-decoration: underline;
	text-underline-position: from-font;
	color: var(--wp--preset--color--contrast);
}

.glp-referral-form .glp-referral-form__copy:hover,
.glp-referral-form .glp-referral-form__copy:focus-visible {
	background: transparent;
	color: var(--wp--preset--color--primary);
}

.glp-referral-form .glp-referral-form__send:focus-visible,
.glp-referral-form .glp-referral-form__copy:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* What happened when the link was sent or copied. */
.glp-referral-form .glp-referral-form__message {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: var(--wp--preset--color--contrast);
}

.glp-referral-form .glp-referral-form__message.is-success {
	color: var(--wp--preset--color--primary);
}

.glp-referral-form .glp-referral-form__message.is-error {
	color: var(--wp--custom--color--error--800);
}

/* An account notice with a link on - Browse products under "No order has been made yet.", Resend under the
 * temporary password one.  WooCommerce floats the link right, before or after the sentence; here it is a
 * small button under the sentence, at the left. */
.woocommerce-account .wc-block-components-notice-banner > .wc-block-components-notice-banner__content:has(> .wc-forward) {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--x-small);
}

/* Outranks WooCommerce's own ".wc-block-components-notice-banner > ... .wc-forward", which pushes it in and
 * makes it a bare link - its background, colour and padding with !important, so only !important beats them. */
.woocommerce-account .wc-block-components-notice-banner > .wc-block-components-notice-banner__content > .wc-forward {
	order: 1;
	float: none;
	margin: 0;
	padding: 0.5rem 1rem !important;
	border: 0;
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--base) !important;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: var(--wp--custom--letter-spacing--button);
	line-height: 1.1;
	text-decoration: none;
	text-transform: uppercase;
	opacity: 1;
}

/* Profile, for a customer on a temporary password: a link to set theirs in place of the password boxes, which
 * ask for a current password they never saw ( Account::render_set_password_link() ). */
.woocommerce-EditAccountForm:has(.glp-set-password) fieldset:has(#password_current) {
	display: none;
}

.glp-set-password {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--x-small);
	margin-block: var(--wp--preset--spacing--small);
}

.glp-set-password__link {
	padding: 0.5rem 1rem;
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: var(--wp--custom--letter-spacing--button);
	line-height: 1.1;
	text-decoration: none;
	text-transform: uppercase;
}

.glp-set-password__link:hover,
.glp-set-password__link:focus-visible {
	color: var(--wp--preset--color--base);
	opacity: 0.9;
}

/* Profile: no note under Display name.  WooCommerce prints it in its template with no hook to drop it. */
#account_display_name_description {
	display: none;
}

/* ---- Order buttons: View, Pay, Cancel, Order again.  Side by side, on the orders list and on an order's own page, rather
 * than WooCommerce's full width stack ( woocommerce-blocktheme.css ).  Their size is every WooCommerce button's ( common.css ). */
.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
	white-space: nowrap;
}

.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions a.button,
.woocommerce-account .woocommerce-order-details a.order-actions-button,
.woocommerce-account .woocommerce-order-details .order-again a.button {
	display: inline-flex;
	align-items: center;
	margin: 0 8px 0 0;
}

.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions a.button:last-child,
.woocommerce-account .woocommerce-order-details a.order-actions-button:last-child {
	margin-right: 0;
}
