/*
 * Commerce styling — WooCommerce's own markup, in the design system.
 *
 * Hand-written, not generated. theme.css is assembled from the prototypes by
 * tools/build-css.mjs and carries their hover/active classes; this sheet
 * dresses the markup WooCommerce produces (form fields, notices, order
 * tables), which no prototype contains.
 *
 * Field styling follows the design system's Input: 48px, 12px radius, 1px
 * #d3dcdb, and a 3px teal focus ring that is never removed.
 */

/* ------------------------------------------------------------------ *
 * Form fields
 * ------------------------------------------------------------------ */

.hp-checkout .form-row,
.woocommerce-address-fields .form-row,
.woocommerce-EditAccountForm .form-row {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0 0 14px;
	padding: 0;
}

.hp-checkout .form-row label,
.woocommerce-address-fields label,
.woocommerce-EditAccountForm label {
	font-weight: 500;
	font-size: 13px;
	letter-spacing: -0.005em;
	color: #41565a;
}

.hp-checkout .form-row .required,
.woocommerce-address-fields .required {
	color: #93a3a2;
	text-decoration: none;
	border: 0;
}

.hp-checkout .form-row .optional,
.woocommerce-address-fields .optional {
	color: #93a3a2;
	font-weight: 400;
}

.hp-checkout input[type='text'],
.hp-checkout input[type='email'],
.hp-checkout input[type='tel'],
.hp-checkout input[type='password'],
.hp-checkout textarea,
.hp-checkout .select2-selection,
.woocommerce-address-fields input[type='text'],
.woocommerce-address-fields input[type='email'],
.woocommerce-address-fields input[type='tel'],
.woocommerce-EditAccountForm input[type='text'],
.woocommerce-EditAccountForm input[type='email'],
.woocommerce-EditAccountForm input[type='password'],
.woocommerce-ResetPassword input[type='text'],
.woocommerce-ResetPassword input[type='email'] {
	width: 100%;
	box-sizing: border-box;
	height: 48px;
	border: 1px solid #d3dcdb;
	border-radius: 12px;
	padding: 0 14px;
	font-family: inherit;
	font-size: 15px;
	color: #00161e;
	background: #fff;
	outline: none;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.hp-checkout textarea {
	height: auto;
	min-height: 96px;
	padding: 12px 14px;
	line-height: 1.55;
}

.hp-checkout input:focus,
.hp-checkout textarea:focus,
.hp-checkout select:focus,
.woocommerce-address-fields input:focus,
.woocommerce-EditAccountForm input:focus {
	border-color: #00a7a0;
	box-shadow: 0 0 0 3px rgba(0, 167, 160, 0.32);
}

/* Woo's country/state widget, whether it falls back to a <select> or select2. */
.hp-checkout .select2-container .select2-selection--single,
.woocommerce-address-fields .select2-container .select2-selection--single {
	height: 48px;
	border: 1px solid #d3dcdb;
	border-radius: 12px;
	background: #fff;
}

.hp-checkout .select2-container .select2-selection__rendered,
.woocommerce-address-fields .select2-container .select2-selection__rendered {
	line-height: 46px;
	padding-left: 14px;
	font-size: 15px;
	color: #00161e;
}

.hp-checkout .select2-container .select2-selection__arrow,
.woocommerce-address-fields .select2-container .select2-selection__arrow {
	height: 46px;
}

.hp-checkout select,
.woocommerce-address-fields select {
	width: 100%;
	box-sizing: border-box;
	height: 48px;
	border: 1px solid #d3dcdb;
	border-radius: 12px;
	padding: 0 14px;
	font-family: inherit;
	font-size: 15px;
	color: #00161e;
	background: #fff;
	outline: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2365787a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
}

/* First/last name and town/postcode share a row, as the design draws them. */
.hp-checkout .hp-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 12px;
}

.hp-checkout .hp-fields > .form-row {
	grid-column: span 2;
	min-width: 0;
}

.hp-checkout .hp-fields > .hp-field-half {
	grid-column: span 1;
}

/* The field description, under the input rather than beside it. */
.hp-checkout .description,
.hp-checkout .woocommerce-input-wrapper + .description {
	order: 3;
	margin: 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: #65787a;
}

.hp-checkout .woocommerce-input-wrapper {
	width: 100%;
}

/* ------------------------------------------------------------------ *
 * Checkboxes: consent, marketing opt-in, remember me
 * ------------------------------------------------------------------ */

.hp-checkout .hp-consent,
.hp-checkout .hp-updates,
.hp-checkout .woocommerce-terms-and-conditions-wrapper .form-row {
	flex-direction: row;
	align-items: flex-start;
	gap: 11px;
	margin: 4px 0 0;
}

.hp-checkout .hp-consent label,
.hp-checkout .hp-updates label,
.hp-checkout .woocommerce-terms-and-conditions-wrapper label {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	font-size: 13.5px;
	line-height: 1.55;
	color: #41565a;
	cursor: pointer;
}

.hp-checkout input[type='checkbox'] {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	accent-color: #00a7a0;
	cursor: pointer;
}

/* ------------------------------------------------------------------ *
 * Order on WhatsApp: hover, and the button before the consent box is ticked
 *
 * The button is the same dark green as the floating chat button below. It
 * borrows the prototypes' hover and press classes, which are !important and
 * would turn it ink on hover, so the green hover and the held-still disabled
 * state have to be !important too.
 * ------------------------------------------------------------------ */

a[data-hp-wa]:hover {
	background: #128247 !important;
}

[data-hp-wa][aria-disabled='true'] {
	opacity: 0.45;
	cursor: not-allowed;
}

a[data-hp-wa][aria-disabled='true']:hover,
a[data-hp-wa][aria-disabled='true']:active {
	background: #0f6b3a !important;
	transform: none !important;
}

/* ------------------------------------------------------------------ *
 * Chat on WhatsApp: the floating button
 *
 * The site's primary button shape, fixed bottom right, in a dark green: the
 * WhatsApp hue taken down to where white text reads comfortably (6.6:1), so
 * it says WhatsApp without the neon. It sits above the sticky header and
 * below the bag drawer, and steps aside while the drawer is open
 * because the drawer carries the order button. On a phone it drops its label
 * and becomes a circle, so it never covers a line of text.
 * ------------------------------------------------------------------ */

.hp-wa-float {
	position: fixed;
	right: 24px;
	bottom: max(24px, env(safe-area-inset-bottom));
	z-index: 55;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 54px;
	padding: 0 22px 0 18px;
	border-radius: 999px;
	background: #0f6b3a;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: -0.01em;
	white-space: nowrap;
	/* The ring keeps the pill legible over the ink footer. */
	box-shadow: 0 18px 40px -16px rgba(6, 48, 26, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
	transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), background-color 140ms ease, opacity 200ms ease;
}

.hp-wa-float:hover {
	background: #128247;
	color: #fff;
	transform: translateY(-2px);
}

.hp-wa-float:active {
	transform: scale(0.98);
}

.hp-wa-float:focus-visible {
	outline: 2px solid #00a7a0;
	outline-offset: 3px;
}

body.hp-drawer-open .hp-wa-float {
	opacity: 0;
	pointer-events: none;
}

.hp-wa-ask:hover {
	color: #00827e !important;
}

@media (max-width: 760px) {
	.hp-wa-float {
		right: 16px;
		bottom: max(16px, env(safe-area-inset-bottom));
		width: 54px;
		padding: 0;
	}

	.hp-wa-float__label {
		display: none;
	}
}

@media print {
	.hp-wa-float {
		display: none;
	}
}

/* Anchored sections clear the sticky header when linked to. */
#inside {
	scroll-margin-top: 150px;
}

/* ------------------------------------------------------------------ *
 * Notices
 * ------------------------------------------------------------------ */

.woocommerce-notices-wrapper ul,
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
	list-style: none;
	margin: 0 0 18px;
	padding: 14px 18px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.55;
}

.woocommerce-error {
	background: #fbeae9;
	color: #8d2e28;
}

.woocommerce-message {
	background: #e4f5ec;
	color: #0b5a36;
}

.woocommerce-info {
	background: rgba(0, 167, 160, 0.1);
	color: #00504d;
}

.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
	list-style: none;
}

.woocommerce-error a,
.woocommerce-message a,
.woocommerce-info a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
}

/* The login prompt above checkout. */
.woocommerce-form-login-toggle .woocommerce-info {
	margin-bottom: 20px;
}

.hp-checkout .woocommerce-form-login {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 20px;
	padding: 22px;
	border-radius: 18px;
	background: #fff;
	border: 1px solid rgba(0, 22, 30, 0.08);
}

.hp-checkout .woocommerce-form-login button {
	height: 48px;
	padding: 0 24px;
	border: none;
	border-radius: 999px;
	background: #00161e;
	color: #fff;
	font-family: inherit;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
}

/* ------------------------------------------------------------------ *
 * Payment box (a gateway's own fields, when it has any)
 * ------------------------------------------------------------------ */

.hp-checkout .payment_box {
	margin: 8px 0 0;
	padding: 14px 16px;
	border-radius: 12px;
	background: #f7faf9;
	font-size: 13.5px;
	line-height: 1.55;
	color: #41565a;
}

.hp-checkout .payment_box p:first-child {
	margin-top: 0;
}

.hp-checkout .place-order .woocommerce-privacy-policy-text p {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.6;
	color: #65787a;
}

.hp-place-order[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Woo blanks the order review while it recalculates. */
.blockUI.blockOverlay {
	background: rgba(247, 250, 249, 0.6) !important;
	opacity: 1 !important;
}

/* ------------------------------------------------------------------ *
 * Account: orders table, addresses, settings
 * ------------------------------------------------------------------ */

.woocommerce-MyAccount-content h2 {
	margin: 0 0 16px;
	font-weight: 600;
	font-size: 22px;
	letter-spacing: -0.024em;
	color: #00161e;
}

.woocommerce-orders-table,
.woocommerce-table--order-details {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid rgba(0, 22, 30, 0.08);
	border-radius: 20px;
	overflow: hidden;
}

.woocommerce-orders-table th,
.woocommerce-table--order-details th {
	text-align: left;
	padding: 14px 18px;
	background: #f7faf9;
	font-weight: 600;
	font-size: 10.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #65787a;
}

.woocommerce-orders-table td,
.woocommerce-table--order-details td {
	padding: 16px 18px;
	border-top: 1px solid rgba(0, 22, 30, 0.06);
	font-size: 14px;
	color: #00161e;
}

.woocommerce-orders-table a,
.woocommerce-table--order-details a {
	color: #00615f;
	font-weight: 600;
}

.woocommerce-orders-table .button,
.woocommerce-MyAccount-content .button,
.woocommerce-Address .edit {
	display: inline-flex;
	align-items: center;
	height: 38px;
	padding: 0 16px;
	border: none;
	border-radius: 999px;
	background: #eef2f1;
	color: #00161e;
	font-family: inherit;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
}

.woocommerce-MyAccount-content .button:hover,
.woocommerce-Address .edit:hover {
	background: #dfe6e5;
}

.woocommerce-EditAccountForm .button,
.woocommerce-address-fields .button {
	height: 50px;
	padding: 0 26px;
	background: #00161e;
	color: #fff;
	font-size: 15px;
}

.woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.woocommerce-Address {
	padding: 24px;
	border-radius: 20px;
	background: #fff;
	border: 1px solid rgba(0, 22, 30, 0.08);
}

.woocommerce-Address-title h2,
.woocommerce-Address-title h3 {
	margin: 0 0 10px;
	font-weight: 600;
	font-size: 18px;
	letter-spacing: -0.02em;
	color: #00161e;
}

.woocommerce-Address address {
	font-style: normal;
	font-size: 14px;
	line-height: 1.7;
	color: #41565a;
}

.woocommerce-EditAccountForm fieldset {
	margin: 24px 0 0;
	padding: 20px 22px;
	border: 1px solid rgba(0, 22, 30, 0.08);
	border-radius: 18px;
	background: #fff;
}

.woocommerce-EditAccountForm legend {
	padding: 0 6px;
	font-weight: 600;
	font-size: 14px;
	color: #00161e;
}

.woocommerce-pagination ul {
	display: flex;
	gap: 6px;
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
	display: grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border-radius: 999px;
	background: #eef2f1;
	font-weight: 600;
	font-size: 13.5px;
	color: #00161e;
	text-decoration: none;
}

.woocommerce-pagination .current {
	background: #00161e;
	color: #fff;
}

/* ------------------------------------------------------------------ *
 * Responsive
 *
 * Matching the prototypes' breakpoints: two-column layouts collapse at
 * 1024px, everything goes single column at 760px.
 * ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.hp-checkout [data-r='2'],
	body.hp-route-account [data-r='2'],
	body.hp-route-confirm [data-r='2'] {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 28px !important;
	}

	.hp-checkout [data-summary],
	body.hp-route-account .woocommerce-MyAccount-navigation {
		position: static !important;
	}

	body.hp-route-confirm [data-r='hero'] {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 28px !important;
	}

	body.hp-route-confirm [data-hero-img] {
		width: 100% !important;
		max-width: 260px;
	}
}

@media (max-width: 760px) {
	.hp-checkout .hp-fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.hp-checkout .hp-fields > .form-row,
	.hp-checkout .hp-fields > .hp-field-half {
		grid-column: span 1;
	}

	.hp-checkout [data-pad] {
		padding: 22px !important;
	}

	.woocommerce-Addresses {
		grid-template-columns: minmax(0, 1fr);
	}

	body.hp-route-confirm [data-steps] {
		grid-template-columns: repeat(2, 1fr) !important;
		row-gap: 20px !important;
	}

	.woocommerce-orders-table th:nth-child(3),
	.woocommerce-orders-table td:nth-child(3) {
		display: none;
	}
}
