/* Front-end styles that cannot be expressed in theme.json. */

/* Sections sit flush against the header and footer. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Block style: core/list "Checklist". */
.wp-block-list.is-style-checklist {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-inline: 0;
	padding: 0;
	list-style: none;
}

.wp-block-woocommerce-product-price + .wp-block-list.is-style-checklist {
	margin-block-start: 40px;
}

.wp-block-list.is-style-checklist li {
	display: flex;
	gap: 12px;
	align-items: center;
}

.wp-block-list.is-style-checklist li::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	background-color: var(--wp--preset--color--accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Block style: core/table "Book details". */
.wp-block-table.is-style-book-details {
	margin: 0;
}

.wp-block-table.is-style-book-details table {
	border-collapse: collapse;
}

.wp-block-table.is-style-book-details th,
.wp-block-table.is-style-book-details td {
	padding: 14px 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: left;
	vertical-align: top;
}

.wp-block-table.is-style-book-details th {
	width: 42%;
	padding-right: 16px;
	font-weight: 400;
	color: var(--wp--preset--color--accent);
}

/* Author photo. */
.book-author__photo {
	max-width: 440px;
	margin: 0;
}

.book-author__photo img {
	width: 100%;
	display: block;
}

/* Product gallery. */
body.woocommerce .wp-block-woocommerce-product-image-gallery {
	max-width: none;
}

.wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery {
	position: relative;
	width: 100% !important;
	margin: 0;
}

.woocommerce-product-gallery__wrapper {
	margin: 0;
}

.woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	background: var(--wp--preset--color--surface);
}

body .wp-block-woocommerce-product-image-gallery div.woocommerce-product-gallery.images .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

body .wp-block-woocommerce-product-image-gallery div.woocommerce-product-gallery.images .flex-control-thumbs li {
	width: auto !important;
	margin: 0 !important;
}

body .wp-block-woocommerce-product-image-gallery div.woocommerce-product-gallery.images .flex-control-thumbs img {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border: 2px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--surface);
	opacity: 1;
	cursor: pointer;
}

body .wp-block-woocommerce-product-image-gallery div.woocommerce-product-gallery.images .flex-control-thumbs img:hover,
body .wp-block-woocommerce-product-image-gallery div.woocommerce-product-gallery.images .flex-control-thumbs img.flex-active {
	border-color: var(--wp--preset--color--accent);
}

/* Zoom trigger. Selectors are long enough to outrank WooCommerce's classic
   `.woocommerce div.product div.images …` rules, which apply on the product URL. */
body .wp-block-woocommerce-product-image-gallery div.woocommerce-product-gallery.images a.woocommerce-product-gallery__trigger {
	position: absolute;
	top: 12px;
	right: 12px;
	left: auto;
	z-index: 2;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--accent);
	font-size: 0;
	text-indent: 0;
	overflow: hidden;
}

body .wp-block-woocommerce-product-image-gallery div.woocommerce-product-gallery.images a.woocommerce-product-gallery__trigger > * {
	display: none;
}

body .wp-block-woocommerce-product-image-gallery div.woocommerce-product-gallery.images a.woocommerce-product-gallery__trigger::after {
	content: none;
}

body .wp-block-woocommerce-product-image-gallery div.woocommerce-product-gallery.images a.woocommerce-product-gallery__trigger::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 0;
	border-radius: 0;
	transform: translate(-50%, -50%);
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Product price. */
.wp-block-woocommerce-product-price .wc-block-components-product-price {
	font-size: var(--wp--preset--font-size--display);
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--contrast);
}

/* Add to cart form with quantity stepper. */
.wc-block-add-to-cart-form form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: stretch;
	margin: 0;
}

/* Classic clearfix pseudo-elements would become extra flex items in the row above. */
body div.wc-block-add-to-cart-form form.cart.cart::before,
body div.wc-block-add-to-cart-form form.cart.cart::after {
	content: none;
}

.wc-block-add-to-cart-form .quantity.wc-block-components-quantity-selector,
div.wc-block-add-to-cart-form.wc-block-add-to-cart-form--stepper form.cart div.wc-block-components-quantity-selector.quantity:where(:has(input:not([type=hidden]))),
.wp-block-woocommerce-single-product .wc-block-add-to-cart-form.wc-block-add-to-cart-form--stepper .wc-block-components-quantity-selector:where(:has(input:not([type=hidden]))) {
	display: flex;
	align-items: center;
	width: auto;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--ink);
}

.wc-block-add-to-cart-form .quantity.wc-block-components-quantity-selector::after {
	display: none;
}

.wc-block-add-to-cart-form .wc-block-components-quantity-selector__button {
	width: 52px;
	min-width: 52px;
	height: 64px;
	border: 0;
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: 30px;
	opacity: 1;
	cursor: pointer;
}

.wc-block-add-to-cart-form .wc-block-components-quantity-selector__input,
div.wc-block-add-to-cart-form.wc-block-add-to-cart-form--stepper .wc-block-components-quantity-selector input[type=number].input-text.qty.text {
	width: 48px;
	height: 64px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: 30px;
	text-align: center;
	-moz-appearance: textfield;
}

.wc-block-add-to-cart-form .single_add_to_cart_button {
	flex: 1 1 240px;
	min-height: 64px;
	margin: 0;
	padding: 0 32px;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--highlight);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	cursor: pointer;
}

.wc-block-add-to-cart-form .single_add_to_cart_button:hover {
	background: var(--wp--preset--color--accent);
}

/* Header mini cart. */
.wc-block-mini-cart__button {
	gap: 8px;
	padding: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: 22px;
}

.wc-block-mini-cart__drawer .components-modal__content,
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* Shared form fields for cart and checkout. */
.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
	border: 1px solid var(--wp--preset--color--contrast) !important;
	border-radius: 6px !important;
	background: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
	font-family: var(--wp--preset--font-family--serif);
}

.wc-block-components-text-input label,
.wc-blocks-components-select .wc-blocks-components-select__label,
.wc-block-components-combobox .wc-block-components-combobox-control label {
	color: var(--wp--preset--color--accent) !important;
}

.wc-block-components-text-input.is-active label {
	background: var(--wp--preset--color--base);
}

.wc-block-components-radio-control__input,
.wc-block-components-checkbox__input {
	accent-color: var(--wp--preset--color--accent);
}

/* Cart. */
.manuaal-cart .wp-block-post-title {
	font-size: clamp(3rem, 6vw, 5rem);
}

.manuaal-cart .wp-block-woocommerce-cart {
	box-sizing: border-box;
	padding: clamp(24px, 4vw, 56px);
	border: 2px solid var(--wp--preset--color--accent);
	border-radius: 28px;
}

.manuaal-cart .wc-block-components-sidebar-layout {
	flex-direction: column;
	margin: 0;
}

.manuaal-cart .wc-block-components-sidebar-layout .wc-block-components-main,
.manuaal-cart .wc-block-components-sidebar-layout .wc-block-components-sidebar {
	width: 100%;
	padding: 0;
}

.manuaal-cart .wc-block-cart-items__header {
	color: var(--wp--preset--color--accent);
}

.manuaal-cart .wc-block-cart-items td,
.manuaal-cart .wc-block-cart-items th,
.manuaal-cart .wc-block-components-totals-wrapper,
.manuaal-cart .wc-block-components-totals-wrapper::after {
	border-color: var(--wp--preset--color--line) !important;
}

.manuaal-cart .wc-block-components-product-name {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.manuaal-cart .wc-block-components-quantity-selector {
	border-color: var(--wp--preset--color--accent);
	border-radius: 6px;
	color: var(--wp--preset--color--contrast);
}

.manuaal-cart .wc-block-components-quantity-selector::after {
	border-color: var(--wp--preset--color--accent);
}

.manuaal-cart .wc-block-cart-item__remove-link {
	color: var(--wp--preset--color--accent) !important;
}

.manuaal-cart .wc-block-cart__totals-title {
	display: none;
}

.manuaal-cart .wc-block-components-totals-item__label {
	color: var(--wp--preset--color--accent);
}

.manuaal-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	color: var(--wp--preset--color--contrast);
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
}

.manuaal-cart .wc-block-cart__submit-button,
.manuaal-checkout .wc-block-components-checkout-place-order-button {
	width: 100%;
	min-height: 72px;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--highlight);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
}

.manuaal-cart .wc-block-cart__submit-button:hover,
.manuaal-checkout .wc-block-components-checkout-place-order-button:hover {
	background: var(--wp--preset--color--accent);
}

/* Checkout. */
.manuaal-checkout .wc-block-components-checkout-step__title,
.manuaal-checkout .wc-block-components-checkout-order-summary__title-text,
.manuaal-checkout .wc-block-components-title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 600;
	letter-spacing: 1px;
	color: var(--wp--preset--color--accent);
}

.manuaal-checkout .wc-block-components-checkout-step__description {
	color: var(--wp--preset--color--muted);
}

.manuaal-checkout .wc-block-components-radio-control__option,
.manuaal-checkout .wc-block-components-radio-control--highlight-checked,
.manuaal-checkout .wc-block-components-radio-control-accordion-option {
	border-color: var(--wp--preset--color--line);
	box-shadow: none;
}

.manuaal-checkout .wc-block-components-order-summary-item__description,
.manuaal-checkout .wc-block-components-totals-wrapper {
	border-color: var(--wp--preset--color--line);
}

.manuaal-checkout .wc-block-components-totals-footer-item {
	padding-top: 22px;
	border-top: 2px solid var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.manuaal-checkout .wc-block-components-checkout-place-order-button {
	min-height: 80px;
}

.manuaal-checkout .wc-block-components-checkout-return-to-cart-button {
	color: var(--wp--preset--color--accent);
}

/* Billing always matches the parcel machine recipient; company details have their own fields. */
.manuaal-checkout .wc-block-checkout__use-address-for-billing {
	display: none;
}

/* ShipIt24 parcel machine picker: its search box, dropdown and selected-machine card
   have light backgrounds and inherit text colour, so give them dark text. */
.shipit24-city-combobox,
.shipit24-lockers-container {
	color: var(--wp--preset--color--ink);
}

.shipit24-city-combobox .select2-search__field,
.shipit24-lockers-container .select2-search__field {
	background: #fff;
	color: var(--wp--preset--color--ink);
}

/* Notices: block banners (store notices, cart, checkout) and classic notices (account pages). */
.wc-block-components-notice-banner {
	--manuaal-notice-color: var(--wp--preset--color--accent);
	gap: 14px;
	padding: 16px 20px !important;
	border: 1px solid var(--manuaal-notice-color);
	border-radius: 0;
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
}

.wc-block-components-notice-banner.is-success,
.wc-block-components-notice-banner.is-info {
	--manuaal-notice-color: var(--wp--preset--color--accent);
	background-color: var(--wp--preset--color--surface);
	border-color: var(--manuaal-notice-color);
}

.wc-block-components-notice-banner.is-warning {
	--manuaal-notice-color: var(--wp--preset--color--highlight);
	background-color: var(--wp--preset--color--surface);
	border-color: var(--manuaal-notice-color);
}

.wc-block-components-notice-banner.is-error {
	--manuaal-notice-color: var(--wp--preset--color--error);
	background-color: var(--wp--preset--color--surface);
	border-color: var(--manuaal-notice-color);
}

/* WooCommerce focuses the banner only so screen readers announce it; it isn't interactive. */
.wc-block-components-notice-banner:focus,
.wc-block-components-notice-banner:focus-visible {
	outline: none;
}

.wc-block-components-notice-banner > .wc-block-components-notice-banner__content {
	font-size: var(--wp--preset--font-size--medium);
}

.wc-block-components-notice-banner > svg,
.wc-block-components-notice-banner.is-success > svg,
.wc-block-components-notice-banner.is-info > svg,
.wc-block-components-notice-banner.is-warning > svg,
.wc-block-components-notice-banner.is-error > svg {
	width: 24px;
	height: 24px;
	align-self: center;
	background-color: var(--manuaal-notice-color);
	fill: var(--wp--preset--color--ink);
}

.wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward {
	color: var(--wp--preset--color--accent) !important;
	font-family: var(--wp--preset--font-family--body);
	font-size: inherit;
	font-weight: 500;
	letter-spacing: 1px;
	line-height: inherit;
	text-transform: uppercase;
	opacity: 1;
	text-underline-offset: 4px;
}

.wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward:hover,
.wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward:focus {
	color: var(--wp--preset--color--contrast) !important;
}

.wc-block-components-notice-banner > .wc-block-components-notice-banner__content a:not(.wc-forward) {
	color: var(--wp--preset--color--accent);
}

.wc-block-components-notice-banner > .wc-block-components-button {
	align-self: center;
	margin-top: 0 !important;
	color: var(--wp--preset--color--contrast) !important;
}

.wc-block-components-notice-banner.wc-block-components-notice-snackbar,
.wc-block-components-notice-snackbar-list .wc-block-components-notice-banner {
	border-color: var(--manuaal-notice-color) !important;
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.45);
}

body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-error {
	margin: 0 0 24px;
	padding: 16px 20px 16px 56px;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 0;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
	list-style: none;
}

body .woocommerce-error {
	border-color: var(--wp--preset--color--error);
}

body .woocommerce-message::before,
body .woocommerce-info::before {
	color: var(--wp--preset--color--accent);
}

body .woocommerce-error::before {
	color: var(--wp--preset--color--error);
}

body .woocommerce-message a,
body .woocommerce-info a,
body .woocommerce-error a {
	color: var(--wp--preset--color--accent);
}

body .woocommerce-message .button,
body .woocommerce-info .button,
body .woocommerce-error .button {
	padding: 0;
	background: none;
	color: var(--wp--preset--color--accent);
	font-size: inherit;
	text-decoration: underline;
	text-transform: uppercase;
}
