/* fsd-base */
/**
 * Base styles: typography, links, buttons, forms.
 *
 * Use only the FSD design variables here (var(--fsd-...)), never fixed
 * colours, fonts or sizes, so Appearance > FSD Design controls everything.
 * Area-specific styles (header, footer, product, archive) get their own files.
 */

/* Typography ------------------------------------------------------------ */

body {
	font-family: var(--fsd-font-body);
	font-size: var(--fsd-text-base);
	font-weight: var(--fsd-body-weight);
	line-height: var(--fsd-body-line-height);
	color: var(--fsd-color-text);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--fsd-font-heading);
	font-weight: var(--fsd-heading-weight);
	line-height: var(--fsd-heading-line-height);
	letter-spacing: var(--fsd-heading-letter-spacing);
	text-transform: var(--fsd-heading-transform);
	color: var(--fsd-color-heading);
}

h1 { font-size: var(--fsd-h1-size); }
h2 { font-size: var(--fsd-h2-size); }
h3 { font-size: var(--fsd-h3-size); }
h4 { font-size: var(--fsd-h4-size); }
h5 { font-size: var(--fsd-h5-size); }
h6 { font-size: var(--fsd-h6-size); }

a {
	color: var(--fsd-link);
}

a:hover,
a:focus {
	color: var(--fsd-link-hover);
}

:focus-visible {
	outline: 2px solid var(--fsd-color-primary);
	outline-offset: 2px;
}

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

.fsd-btn,
button,
html input[type="button"],
input[type="reset"],
input[type="submit"],
a.button,
a.wp-block-button__link:not(.has-background),
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--fsd-space-2);
	padding: var(--fsd-btn-padding);
	border: 0;
	border-radius: var(--fsd-btn-radius);
	background-color: var(--fsd-btn-bg);
	color: var(--fsd-btn-text);
	font-family: var(--fsd-font-accent);
	font-size: var(--fsd-text-base);
	font-weight: var(--fsd-btn-weight);
	line-height: 1.2;
	text-transform: var(--fsd-btn-transform);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fsd-btn:hover,
.fsd-btn:focus,
button:hover,
button:focus,
html input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
a.button:hover,
a.button:focus,
a.wp-block-button__link:not(.has-background):hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background-color: var(--fsd-btn-hover-bg);
	color: var(--fsd-btn-hover-text);
}

/* Secondary (outline) button. */
.fsd-btn--outline {
	background-color: transparent;
	color: var(--fsd-btn-bg);
	box-shadow: inset 0 0 0 2px currentColor;
}

/* Forms ----------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
	font-family: var(--fsd-font-body);
	font-size: var(--fsd-text-base);
	color: var(--fsd-color-text);
	border: 1px solid var(--fsd-input-border);
	border-radius: var(--fsd-input-radius);
}

/* Shop basics ------------------------------------------------------------ */

/* WooCommerce's own colours (its purple buttons and olive prices) are
   CSS variables: point them at the site's tokens so they never show. */
html:root {
	--wc-primary: var(--fsd-btn-bg);
	--wc-primary-text: var(--fsd-btn-text);
	--woocommerce: var(--fsd-btn-bg);
	--wc-highlight: var(--fsd-price);
	--wc-highlight-text: var(--fsd-color-white);
}

/* WooCommerce "alt" buttons (add to bag, checkout) use the site buttons,
   and a disabled button does not change on hover. */
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background-color: var(--fsd-btn-bg);
	color: var(--fsd-btn-text);
}

.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background-color: var(--fsd-btn-hover-bg);
	color: var(--fsd-btn-hover-text);
}

.woocommerce #respond input#submit.alt.disabled,
.woocommerce #respond input#submit.alt.disabled:hover,
.woocommerce #respond input#submit.alt:disabled,
.woocommerce #respond input#submit.alt:disabled:hover,
.woocommerce a.button.alt.disabled,
.woocommerce a.button.alt.disabled:hover,
.woocommerce button.button.alt.disabled,
.woocommerce button.button.alt.disabled:hover,
.woocommerce button.button.alt:disabled,
.woocommerce button.button.alt:disabled:hover,
.woocommerce button.button.alt:disabled[disabled],
.woocommerce button.button.alt:disabled[disabled]:hover,
.woocommerce input.button.alt.disabled,
.woocommerce input.button.alt.disabled:hover,
.woocommerce input.button.alt:disabled,
.woocommerce input.button.alt:disabled:hover {
	background-color: var(--fsd-btn-bg);
	color: var(--fsd-btn-text);
}

.woocommerce .price,
.woocommerce-Price-amount {
	color: var(--fsd-price);
}

.woocommerce .price ins,
.woocommerce .price ins .woocommerce-Price-amount {
	color: var(--fsd-price-sale);
	font-weight: 700;
	text-decoration: none;
}

.woocommerce span.onsale {
	background-color: var(--fsd-badge-bg);
	color: var(--fsd-badge-text);
}

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

.fsd-container {
	width: 100%;
	max-width: var(--fsd-container);
	margin-inline: auto;
	padding-inline: var(--fsd-gutter);
}

.fsd-screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Sign-in / register pages: the title sits at the same height as the other
   page titles (Design > Page titles and boxes). */
body.fsd-auth-page .site-content {
	padding-top: 0;
}

body.fsd-auth-page .site-main > article,
body.fsd-auth-page .site-main > article > .inside-article {
	margin-top: 0;
	padding-top: 0;
}

body.fsd-auth-page .mawc.mawc-auth {
	padding-top: var(--fsd-page-title-space-top);
}

body.fsd-auth-page .mawc-auth .mawc-auth__title {
	margin-bottom: var(--fsd-page-title-space-bottom);
}

@media (max-width: 767px) {
	body.fsd-auth-page .mawc.mawc-auth {
		padding-top: var(--fsd-page-title-space-top-mobile);
	}
}

/* "Join waiting list" label on product cards (FSD Site Functions #3440).
   Moved from the Customizer's Additional CSS in Stage 8. */
.loop-image-wrap {
	position: relative;
	margin-bottom: 1em;
}

.loop-image-wrap img {
	display: block;
	margin-bottom: 0 !important;
}

.waitlist-badge {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 4px 10px;
	background-color: var(--fsd-color-text);
	color: var(--fsd-color-white);
	font-size: var(--fsd-text-2xs);
	line-height: 1.4;
}

/* Show a block only on desktop/tablet or only on phones (Advanced >
   Additional CSS class in the editor). */
@media (max-width: 767px) {
	.fsd-desktop-only {
		display: none !important;
	}
}

@media (min-width: 768px) {
	.fsd-mobile-only {
		display: none !important;
	}
}

/* Pre-orders: estimated dispatch message under an item (bag, side cart). */
.fsd-po-line {
	display: block;
	margin-top: 2px;
	font-size: var(--fsd-product-preorder-size);
	font-weight: 400;
	line-height: 1.4;
}

/* CheckoutWC's side cart uses its own copy of Inter ("InterVariable", another
   55 KB download on every page). Point it at the theme's body font instead. */
html:root {
	--cfw-inter-font-family: var(--fsd-font-body);
}

/* Customer Account forms (sign-in, register, account pages): fields use the
   body text size, like the order tracking form. iPhones zoom the page in on any
   field smaller than 16px, so keep Design > Body text at 16px or more. */
body .mawc.mawc .mawc-input,
body .mawc.mawc input.input-text,
body .mawc.mawc select,
body .mawc.mawc textarea {
	font-size: var(--fsd-text-base);
}

/* fsd-modal */
/**
 * Theme popups: side panels (stock alerts, size guide) and boxes (wishlist).
 * Sizes and shade: FSD Theme > Design > Product page > Popups.
 */

html.fsd-modal-open {
	overflow: hidden;
}

.fsd-modal[hidden] {
	display: none;
}

.fsd-modal {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: flex;
}

.fsd-modal__overlay {
	position: absolute;
	inset: 0;
	background: var(--fsd-modal-overlay);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.fsd-modal.is-open .fsd-modal__overlay {
	opacity: var(--fsd-modal-overlay-opacity);
}

.fsd-modal__panel {
	position: relative;
	box-sizing: border-box;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--fsd-color-white);
	color: var(--fsd-color-text);
	font-family: var(--fsd-font-body);
	outline: 0;
}

body .fsd-modal button.fsd-modal__close {
	position: absolute;
	z-index: 2;
	top: 20px;
	right: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 4px;
	border: 0;
	background: transparent;
	color: var(--fsd-color-sale);
	cursor: pointer;
}

body .fsd-modal button.fsd-modal__close:hover,
body .fsd-modal button.fsd-modal__close:focus-visible {
	background: transparent;
	color: var(--fsd-color-text);
}

.fsd-modal__close svg {
	width: 22px;
	height: 22px;
}

body .fsd-modal h2.fsd-modal__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	padding-right: 40px;
	color: var(--fsd-color-text);
	font-family: var(--fsd-font-body);
	font-size: var(--fsd-modal-title-size);
	font-weight: var(--fsd-modal-title-weight);
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
}

/* Side panels slide in from the right, full height. */

.fsd-modal--drawer {
	justify-content: flex-end;
}

.fsd-modal--drawer .fsd-modal__panel {
	width: var(--fsd-modal-drawer-width);
	max-width: 100%;
	height: 100%;
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

.fsd-modal--size-guide .fsd-modal__panel {
	width: var(--fsd-modal-guide-width);
}

.fsd-modal--drawer.is-open .fsd-modal__panel {
	transform: none;
}

.fsd-modal--drawer .fsd-modal__content {
	padding: 30px 40px 40px;
}

body .fsd-modal--drawer button.fsd-modal__close {
	top: 26px;
	right: 26px;
}

.fsd-modal--notify .fsd-modal__content {
	padding: 80px;
}

@media (max-width: 767px) {
	.fsd-modal--drawer .fsd-modal__content {
		padding: 30px 20px;
	}
}

/* Boxes: centred. */

.fsd-modal--box {
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.fsd-modal--box .fsd-modal__panel {
	width: 750px;
	max-width: 100%;
	max-height: 100%;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.fsd-modal--box.is-open .fsd-modal__panel {
	opacity: 1;
	transform: none;
}

.fsd-modal--box .fsd-modal__content {
	padding: 40px;
}

/* Phones (and tablets for stock alerts): the side panels become sheets that
   slide up from the bottom, as the Elementor mobile popups did. */
@media (max-width: 1024px) {
	.fsd-modal--notify {
		align-items: flex-end;
		justify-content: stretch;
	}

	.fsd-modal--notify .fsd-modal__panel {
		width: 100%;
		height: 60vh;
		max-height: 100%;
		border-radius: 20px 20px 0 0;
		transform: translateY(100%);
	}

	.fsd-modal--notify .fsd-modal__content {
		padding: 30px;
	}

	.fsd-modal--notify .fsd-notify__image img {
		width: 25%;
		min-width: 80px;
	}

	.fsd-modal--notify .fsd-notify__image {
		margin-bottom: 10px;
	}
}

@media (max-width: 768px) {
	.fsd-modal--size-guide {
		align-items: flex-end;
		justify-content: stretch;
	}

	.fsd-modal--size-guide .fsd-modal__panel {
		width: 100%;
		height: 70vh;
		max-height: 100%;
		border-radius: 20px 20px 0 0;
		transform: translateY(100%);
	}

	.fsd-modal--size-guide .fsd-modal__content {
		padding: 30px 20px;
	}

	body .fsd-modal--size-guide h2.fsd-modal__title {
		font-size: var(--fsd-modal-guide-title-size-mobile);
	}
}

@media (max-width: 1024px) {
	body .fsd-modal--notify button.fsd-modal__close {
		top: 26px;
		right: 20px;
	}
}

@media (max-width: 768px) {
	body .fsd-modal--size-guide button.fsd-modal__close {
		top: 26px;
		right: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fsd-modal__overlay,
	.fsd-modal__panel {
		transition: none;
	}
}

/* Stock alerts */

.fsd-notify__image {
	margin: 0 0 20px;
	text-align: center;
}

.fsd-notify__image img {
	display: inline-block;
	width: 196px;
	max-width: 100%;
	height: auto;
}

.fsd-notify__name {
	margin: 0 0 15px;
	font-size: var(--fsd-modal-text-size);
	line-height: 1.5;
}

#glove-bis-variant {
	display: block;
}

.fsd-notify__text {
	margin: 0 0 15px;
	font-size: var(--fsd-modal-note-size);
	line-height: 1.5;
}

/* Size guide */

.fsd-size-guide {
	font-size: var(--fsd-modal-text-size);
	line-height: 1.5;
}

body .fsd-modal--size-guide h2.fsd-modal__title {
	margin: 0;
	font-family: var(--fsd-font-heading);
	font-size: var(--fsd-modal-guide-title-size);
	font-weight: var(--fsd-modal-guide-title-weight);
}

/* Short red line under the title. */
.fsd-size-guide__rule {
	display: block;
	width: 10%;
	margin: 15px 0;
	border-top: 2px solid var(--fsd-color-primary);
}

.fsd-size-guide > * + * {
	margin-top: 20px;
}

.fsd-size-guide table {
	width: 100%;
}

.fsd-size-guide img {
	max-width: 100%;
	height: auto;
}

/* Size Guide posts (Size Guides in the dashboard): diagram, table, text. */
.fsd-size-guide__guide {
	color: var(--fsd-color-text);
	font-family: var(--fsd-font-body);
}

.fsd-size-guide__guide > * {
	margin: 0 0 20px;
}

.fsd-size-guide__guide p {
	margin: 0 0 1.5em;
}

.fsd-size-guide__guide > :last-child,
.fsd-size-guide__guide p:last-child {
	margin-bottom: 0;
}

.fsd-size-guide__guide .wp-block-image,
.fsd-size-guide__guide .wp-block-image figure {
	margin: 0;
	text-align: center;
}

/* The picture above the table (e.g. shorts diagram): 40% wide, centred. */
.fsd-size-guide__guide .fsd-size-guide__diagram img {
	width: 40%;
}

/* Wishlist: title, wide image, text, two buttons side by side. */

.fsd-modal--wishlist .fsd-modal__content {
	padding: 0 0 20px;
	text-align: center;
}

body .fsd-modal--wishlist h2.fsd-modal__title {
	justify-content: center;
	min-height: 30px;
	margin: 0;
	padding: 10px 40px;
	font-weight: 500;
}

body .fsd-modal--wishlist button.fsd-modal__close {
	top: 9px;
	right: 9px;
}

.fsd-wishlist__img {
	display: block;
	width: 100%;
	height: 200px;
	margin: 0;
	object-fit: cover;
}

.fsd-wishlist__img--mobile {
	display: none !important;
}

.fsd-wishlist__text {
	margin: 20px 10px;
	font-size: var(--fsd-modal-text-size);
	line-height: 1.5;
}

.fsd-wishlist__buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	padding: 0 10px;
}

body .fsd-modal a.fsd-wishlist__btn {
	box-sizing: border-box;
	display: block;
	width: 195px;
	max-width: 100%;
	padding: 16px 26px;
	border: 1px solid var(--fsd-color-black);
	border-radius: 0;
	font-family: var(--fsd-font-body);
	font-size: var(--fsd-modal-button-size);
	font-weight: var(--fsd-modal-button-weight);
	line-height: 1;
	text-align: center;
	text-decoration: none;
}

body .fsd-modal a.fsd-wishlist__btn--dark {
	background: var(--fsd-color-black);
	color: var(--fsd-color-white);
}

body .fsd-modal a.fsd-wishlist__btn--light {
	background: var(--fsd-color-white);
	color: var(--fsd-color-black);
}

body .fsd-modal a.fsd-wishlist__btn--dark:hover,
body .fsd-modal a.fsd-wishlist__btn--dark:focus-visible {
	border-color: var(--fsd-color-primary);
	background: var(--fsd-color-primary);
	color: var(--fsd-color-white);
}

body .fsd-modal a.fsd-wishlist__btn--light:hover,
body .fsd-modal a.fsd-wishlist__btn--light:focus-visible {
	background: var(--fsd-color-black);
	color: var(--fsd-color-white);
}

.fsd-wishlist__heart {
	color: var(--fsd-color-text);
}

@media (max-width: 767px) {
	.fsd-wishlist__img--desktop {
		display: none !important;
	}

	.fsd-wishlist__img--mobile {
		display: block !important;
	}

	body .fsd-modal a.fsd-wishlist__btn {
		flex: 1 1 0;
		width: auto;
		padding: 16px 10px;
	}
}

/* Back-in-stock form inside the stock alert panel (Back In Stock Notifier). */
#glove-bis-form .cwginstock-subscribe-form .panel {
	margin: 0;
	border: 0;
	box-shadow: none;
}

#glove-bis-form .cwginstock-subscribe-form .cwgstock_email {
	width: 100%;
	border-color: var(--fsd-color-surface-mid);
}

