/**
 * Beeline Checkout
 *
 * Every colour, font and radius here resolves to a CSS custom property that
 * the plugin fills in from the active theme, so this file adds structure and
 * rhythm without imposing a look. Selectors are kept to a single class where
 * possible so a theme can override anything with normal specificity.
 */

/* ---------------------------------------------------------------- Shell */

.beeline {
	font-family: var(--beeline-font);
	color: var(--beeline-text);
	max-width: var(--beeline-max);
	margin-inline: auto;
	container-type: inline-size;
}

.beeline__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--beeline-gap);
	align-items: start;
}

.beeline__main {
	min-width: 0;
}

/* The summary sits above the form on small screens — customers want to see
   what they are paying for before they start typing — and moves to a sticky
   right-hand column once there is room for two. */
.beeline__aside {
	order: -1;
	min-width: 0;
}

@media (min-width: 900px) {
	.beeline__grid {
		grid-template-columns: minmax(0, 1fr) 22rem;
	}

	.beeline__aside {
		order: 0;
	}

	.beeline-summary--sticky {
		position: sticky;
		top: 1.5rem;
	}
}

@media (min-width: 1120px) {
	.beeline__grid {
		grid-template-columns: minmax(0, 1fr) 24rem;
	}
}

body.beeline-layout-single .beeline__grid {
	grid-template-columns: 1fr;
	max-width: 42rem;
	margin-inline: auto;
}

/* ---------------------------------------------------------------- Steps */

.beeline-step {
	border: 1px solid var(--beeline-line);
	border-radius: var(--beeline-radius);
	padding: 1.25rem;
	margin-block-end: 1rem;
}

.beeline-step + .beeline-step {
	margin-block-start: 0;
}

.beeline-step__header {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.beeline-step__title {
	font-family: var(--beeline-font-heading);
	font-size: 1.0625rem;
	line-height: 1.3;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.625rem;
	flex: 1 1 auto;
}

.beeline-step__num {
	display: inline-grid;
	place-items: center;
	inline-size: 1.5rem;
	block-size: 1.5rem;
	border-radius: 50%;
	background: var(--beeline-surface);
	border: 1px solid var(--beeline-line);
	font-size: 0.8125rem;
	font-weight: 600;
	flex: 0 0 auto;
}

.beeline-step.is-complete .beeline-step__num {
	background: var(--beeline-accent);
	border-color: var(--beeline-accent);
	color: var(--beeline-accent-text);
}

.beeline-step__digest {
	flex: 1 1 100%;
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
	color: var(--beeline-muted);
}

.beeline-step__edit {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 0.875rem;
	color: var(--beeline-accent);
	text-decoration: underline;
	cursor: pointer;
	flex: 0 0 auto;
}

.beeline-step__body {
	margin-block-start: 1rem;
}

.beeline.is-enhanced[data-accordion="1"] .beeline-step:not(.is-open) > .beeline-step__body {
	display: none;
}

.beeline.is-enhanced[data-accordion="1"] .beeline-step:not(.is-open) {
	background: var(--beeline-surface);
}

.beeline-step__actions {
	margin-block-start: 1.25rem;
}

/* ---------------------------------------------------------------- Fields */

.beeline .form-row {
	margin: 0 0 0.875rem;
	padding: 0;
}

.beeline .col2-set,
.beeline #customer_details {
	display: grid;
	gap: 0 1rem;
	grid-template-columns: 1fr;
	width: 100%;
	float: none;
}

.beeline .col2-set .col-1,
.beeline .col2-set .col-2 {
	width: 100%;
	float: none;
	max-width: none;
}

.beeline .beeline-label,
.beeline .form-row label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	margin-block-end: 0.3rem;
}

.beeline .beeline-input,
.beeline input[type="text"],
.beeline input[type="email"],
.beeline input[type="tel"],
.beeline input[type="password"],
.beeline textarea,
.beeline select {
	inline-size: 100%;
	font: inherit;
	/* 16px floor stops iOS Safari zooming in on focus. */
	font-size: max(1rem, 16px);
	line-height: 1.4;
	padding: 0.7rem 0.75rem;
	border: 1px solid var(--beeline-line);
	border-radius: var(--beeline-radius);
	background: var(--beeline-bg);
	color: inherit;
	box-shadow: none;
}

.beeline .select2-container .select2-selection--single {
	block-size: auto;
	padding: 0.35rem 0.25rem;
	border-color: var(--beeline-line);
	border-radius: var(--beeline-radius);
}

.beeline :is(input, select, textarea, button, a):focus-visible {
	outline: 2px solid var(--beeline-accent);
	outline-offset: 2px;
}

.beeline .form-row.beeline-invalid input,
.beeline .form-row.beeline-invalid select,
.beeline .form-row.beeline-invalid textarea {
	border-color: var(--beeline-error);
}

.beeline-fielderror {
	display: block;
	margin-block-start: 0.3rem;
	font-size: 0.8125rem;
	color: var(--beeline-error);
}

/* Optional fields fold away until asked for. */
.beeline .beeline-optional-field.is-hidden {
	display: none;
}

.beeline-reveal {
	background: none;
	border: 0;
	padding: 0;
	margin: 0 0 0.875rem;
	font: inherit;
	font-size: 0.875rem;
	color: var(--beeline-accent);
	text-decoration: underline;
	cursor: pointer;
}

@media (min-width: 640px) {
	.beeline .form-row-first,
	.beeline .form-row-last {
		float: none;
		width: 100%;
	}

	.beeline .beeline-pair {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0 1rem;
	}
}

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

.beeline .button,
.beeline button.button,
.beeline #place_order {
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	padding: 0.85rem 1.25rem;
	border-radius: var(--beeline-radius);
	border: 1px solid transparent;
	cursor: pointer;
}

.beeline .beeline-next,
.beeline #place_order {
	background: var(--beeline-accent);
	color: var(--beeline-accent-text);
	inline-size: 100%;
}

.beeline #place_order {
	font-size: 1.0625rem;
	padding-block: 1rem;
}

.beeline .button[disabled],
.beeline .button.is-busy {
	opacity: 0.6;
	cursor: progress;
}

/* ---------------------------------------------------------------- Shipping */

.beeline-shipping ul,
.beeline-shipping #shipping_method {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

.beeline-shipping li {
	display: flex;
	/*
	 * Wrapping matters. WooCommerce lets other plugins print inside this list
	 * item, after the label — a locker or pick-up point plugin puts the chosen
	 * location there. On a single non-wrapping line that content becomes a
	 * flex sibling of a label already claiming the width, and is squeezed to
	 * nothing: present in the markup, invisible on the page.
	 */
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem;
	border: 1px solid var(--beeline-line);
	border-radius: var(--beeline-radius);
	padding: 0.75rem 0.875rem;
	margin: 0;
}

/* The radio keeps its size whatever else is in the row. */
.beeline-shipping li > input[type="radio"] {
	flex: 0 0 auto;
}

/*
 * Anything another plugin adds after the label gets a line of its own, at full
 * width, rather than competing with the label for space.
 */
.beeline-shipping li > *:not(input):not(label) {
	flex: 1 1 100%;
	min-inline-size: 0;
	margin-block-start: 0.15rem;
}

.beeline-shipping li:has(input:checked) {
	border-color: var(--beeline-accent);
	box-shadow: inset 0 0 0 1px var(--beeline-accent);
}

.beeline-shipping li label {
	margin: 0;
	flex: 1 1 auto;
	min-inline-size: 0;
	cursor: pointer;
}

.beeline-shipping.beeline-invalid li {
	border-color: var(--beeline-error);
}

.beeline-shipping .beeline-fielderror {
	margin-block-start: 0.5rem;
}

.beeline-shipping__prompt {
	color: var(--beeline-muted);
	margin: 0;
}

/* ---------------------------------------------------------------- Summary */

.beeline-summary {
	border: 1px solid var(--beeline-line);
	border-radius: var(--beeline-radius);
	padding: 1rem 1.25rem 1.25rem;
	background: var(--beeline-surface);
}

.beeline-summary__head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.beeline-summary__toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-weight: 600;
	color: inherit;
	cursor: pointer;
	text-align: start;
	/* Shrinkable, so a long total pushes the label onto two lines instead of
	   pushing itself out of the panel. */
	flex: 1 1 auto;
	min-width: 0;
}

.beeline-summary__total {
	font-weight: 700;
	white-space: nowrap;
	margin-inline-start: auto;
	flex: 0 0 auto;
}

.beeline-summary__chevron {
	flex: 0 0 auto;
	inline-size: 0.5rem;
	block-size: 0.5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.18s ease;
}

.beeline-summary__toggle[aria-expanded="true"] .beeline-summary__chevron {
	transform: rotate(-135deg) translateY(-2px);
}

.beeline-summary__body {
	margin-block-start: 1rem;
}

.beeline-summary__body[hidden] {
	display: none;
}

.beeline .shop_table,
.beeline .woocommerce-checkout-review-order-table {
	inline-size: 100%;
	border: 0;
	border-collapse: collapse;
	margin: 0;
	font-size: 0.9375rem;
}

.beeline .shop_table th,
.beeline .shop_table td {
	border: 0;
	padding: 0.5rem 0;
	text-align: start;
	vertical-align: top;
}

/* Right-align the value column, but do not stop it wrapping. WooCommerce puts
   a tax label inside the same cell — "£1,234.56 incl. VAT" — and nowrap on the
   cell forced that onto one line, overflowing a 22rem column. The amount
   itself still never breaks. */
.beeline .shop_table td:last-child,
.beeline .shop_table th:last-child {
	text-align: end;
}

.beeline .shop_table .woocommerce-Price-amount,
.beeline .shop_table .amount {
	white-space: nowrap;
}

.beeline .shop_table .tax_label,
.beeline .shop_table small {
	display: block;
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--beeline-muted);
	white-space: normal;
}

/* A long product name or a SKU-style string with no spaces in it would
   otherwise stretch the table past its column. */
.beeline .shop_table .product-name {
	overflow-wrap: anywhere;
}

.beeline .shop_table tfoot tr:last-child th,
.beeline .shop_table tfoot tr:last-child td {
	border-top: 1px solid var(--beeline-line);
	padding-block-start: 0.75rem;
	font-size: 1.0625rem;
	font-weight: 700;
}

.beeline .cart_item .product-name {
	line-height: 1.35;
}

.beeline-delivery-total__pending {
	color: var(--beeline-muted);
	font-weight: 400;
	font-size: 0.875rem;
}

/* Sits directly under the heading, above the item list, so it stays reachable
   while the summary is collapsed on a small screen. */
.beeline-summary__edit {
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
}

/* Desktop keeps the summary open, so the heading is not a control. */
@media (min-width: 900px) {
	.beeline-summary__toggle {
		pointer-events: none;
	}

	.beeline-summary__chevron {
		display: none;
	}

	.beeline-summary__body[hidden] {
		display: block;
	}
}

/* ---------------------------------------------------------------- Coupon */

.beeline-coupon {
	margin-block-start: 1rem;
	padding-block-start: 1rem;
	border-top: 1px solid var(--beeline-line);
}

.beeline-coupon__toggle {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 0.875rem;
	color: var(--beeline-accent);
	text-decoration: underline;
	cursor: pointer;
}

.beeline-coupon__fields {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.5rem;
	margin-block-start: 0.75rem;
}

.beeline-coupon__msg {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 0.8125rem;
}

.beeline-coupon__msg.is-error {
	color: var(--beeline-error);
}

.beeline-coupon__msg.is-success {
	color: var(--beeline-success);
}

/* ---------------------------------------------------------------- Express */

.beeline-express {
	margin-block-end: 1.25rem;
}

/* Above the payment methods the row is already inside a bordered step, so it
   needs less air above it than it does at the top of the page. */
.beeline-express--payment {
	margin-block-start: 0;
	margin-block-end: 1rem;
}

.beeline-express--payment .beeline-express__divider {
	margin-block-start: 1rem;
}

.beeline-express__label {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--beeline-muted);
}

.beeline-express__buttons {
	display: grid;
	gap: 0.5rem;
}

.beeline-express__divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 1.25rem 0 0;
	font-size: 0.8125rem;
	color: var(--beeline-muted);
}

.beeline-express__divider::before,
.beeline-express__divider::after {
	content: "";
	flex: 1 1 auto;
	block-size: 1px;
	background: var(--beeline-line);
}

/* ---------------------------------------------------------------- Upsells */

.beeline-upsells {
	margin-block-end: 1.5rem;
	/* The offers box is its own query container. Without this the card layout
	   below resolved against the whole checkout, so offers placed in the
	   22rem summary column still used the wide three-column arrangement. */
	container-type: inline-size;
}

.beeline-upsells[hidden] {
	display: none;
}

.beeline-upsells__title {
	font-family: var(--beeline-font-heading);
	font-size: 0.9375rem;
	margin: 0 0 0.75rem;
}

.beeline-upsells__intro {
	margin: -0.5rem 0 0.75rem;
	font-size: 0.8125rem;
	color: var(--beeline-muted);
}

.beeline-upsells__footnote {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	color: var(--beeline-muted);
}

/* Highlight treatments. The tinted and outlined panels use the highlight
   colour; the raised card stays neutral so it reads as depth rather than as a
   second accent competing with the pay button below it. color-mix is declared
   after a solid fallback, so older engines simply keep the plain surface. */

.beeline-upsells--tint {
	padding: 1rem;
	border-radius: var(--beeline-radius);
	background: var(--beeline-surface);
	background: color-mix(in srgb, var(--beeline-highlight) 7%, transparent);
}

.beeline-upsells--outline {
	padding: 1rem;
	border-radius: var(--beeline-radius);
	border: 1px solid var(--beeline-line);
	border-color: color-mix(in srgb, var(--beeline-highlight) 45%, transparent);
}

.beeline-upsells--bar {
	padding: 0.25rem 0 0.25rem 0.875rem;
	border-inline-start: 3px solid var(--beeline-highlight);
}

.beeline-upsells--card {
	padding: 1rem;
	border-radius: var(--beeline-radius);
	border: 1px solid var(--beeline-line);
	background: var(--beeline-bg);
	box-shadow: var(--beeline-shadow);
}

/* A rule along the top edge — the quietest way to mark the box as different
   without drawing a container around it. */
.beeline-upsells--topline {
	padding-block-start: 0.875rem;
	border-block-start: 3px solid var(--beeline-highlight);
}

/* Dashed reads as "optional extra" rather than "part of your order", which
   suits an offer better than a solid rule does. */
.beeline-upsells--dashed {
	padding: 1rem;
	border-radius: var(--beeline-radius);
	border: 2px dashed var(--beeline-line);
	border-color: color-mix(in srgb, var(--beeline-highlight) 50%, transparent);
}

/* Card with the shadow tinted toward the highlight — lifts off the page more
   than a neutral card without adding another border. */
.beeline-upsells--glow {
	padding: 1rem;
	border-radius: var(--beeline-radius);
	border: 1px solid var(--beeline-line);
	background: var(--beeline-bg);
	box-shadow: var(--beeline-shadow);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06),
		0 10px 28px color-mix(in srgb, var(--beeline-highlight) 22%, transparent);
	border-color: color-mix(in srgb, var(--beeline-highlight) 30%, transparent);
}

/* The loudest option: a solid header strip over a tinted body. The header text
   uses its own contrast token rather than the accent's, because the highlight
   colour can be set independently and a white label on a pale yellow strip
   would be unreadable. */
.beeline-upsells--banner {
	padding: 0 0 1rem;
	border-radius: var(--beeline-radius);
	border: 1px solid var(--beeline-line);
	border-color: color-mix(in srgb, var(--beeline-highlight) 35%, transparent);
	background: var(--beeline-surface);
	background: color-mix(in srgb, var(--beeline-highlight) 6%, transparent);
	overflow: hidden;
}

.beeline-upsells--banner .beeline-upsells__title {
	margin: 0 0 1rem;
	padding: 0.625rem 1rem;
	background: var(--beeline-highlight);
	color: var(--beeline-highlight-text);
}

.beeline-upsells--banner .beeline-upsells__intro,
.beeline-upsells--banner .beeline-upsells__list,
.beeline-upsells--banner .beeline-upsells__footnote {
	margin-inline: 1rem;
}

.beeline-upsells--banner .beeline-upsells__intro {
	margin-block: -0.5rem 0.75rem;
}

/* Nested borders read as clutter, so cards inside a panel lose their own. */
.beeline-upsells--tint .beeline-offer,
.beeline-upsells--card .beeline-offer,
.beeline-upsells--glow .beeline-offer,
.beeline-upsells--banner .beeline-offer {
	border-color: transparent;
	background: var(--beeline-bg);
}

.beeline-upsells--tint .beeline-offer,
.beeline-upsells--banner .beeline-offer {
	border-color: var(--beeline-line);
}

.beeline-upsells__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.625rem;
}

.beeline-offer {
	display: grid;
	grid-template-columns: 3.5rem minmax(0, 1fr);
	gap: 0.875rem;
	align-items: center;
	border: 1px solid var(--beeline-line);
	border-radius: var(--beeline-radius);
	padding: 0.75rem;
	margin: 0;
}

.beeline-offer__media {
	display: block;
	line-height: 0;
}

.beeline-offer__media img,
.beeline-offer__img {
	inline-size: 3.5rem;
	block-size: 3.5rem;
	object-fit: cover;
	border-radius: calc(var(--beeline-radius) / 1.5);
	margin: 0;
}

.beeline-offer__body {
	min-width: 0;
}

.beeline-offer__title {
	margin: 0;
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.3;
}

.beeline-offer__blurb {
	margin: 0.2rem 0 0;
	font-size: 0.8125rem;
	color: var(--beeline-muted);
}

.beeline-offer__price {
	margin: 0.35rem 0 0;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.5rem;
	font-size: 0.9375rem;
}

.beeline-offer__was {
	text-decoration: line-through;
	color: var(--beeline-muted);
	font-size: 0.875rem;
}

.beeline-offer__now {
	font-weight: 700;
}

.beeline-offer__saving {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--beeline-success);
}

.beeline-offer__add {
	grid-column: 2;
	justify-self: start;
	margin-block-start: 0.5rem;
	padding: 0.55rem 0.9rem;
	font-size: 0.875rem;
	background: transparent;
	border: 1px solid var(--beeline-accent);
	color: var(--beeline-accent);
}

.beeline-offer.is-added {
	border-color: var(--beeline-success);
}

.beeline-offer.is-added .beeline-offer__add {
	border-color: var(--beeline-success);
	color: var(--beeline-success);
	pointer-events: none;
}

@container (min-width: 34rem) {
	.beeline-offer {
		grid-template-columns: 3.5rem minmax(0, 1fr) auto;
	}

	.beeline-offer__add {
		grid-column: 3;
		justify-self: end;
		margin-block-start: 0;
	}
}

/* ---------------------------------------------------------------- Payment */

.beeline-payment .woocommerce-checkout-payment {
	background: transparent;
	border-radius: 0;
}

.beeline-payment ul.wc_payment_methods {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: grid;
	gap: 0.5rem;
	border: 0;
}

.beeline-payment ul.wc_payment_methods > li {
	border: 1px solid var(--beeline-line);
	border-radius: var(--beeline-radius);
	padding: 0.875rem;
	margin: 0;
	background: transparent;
	list-style: none;
}

.beeline-payment ul.wc_payment_methods > li:has(input:checked) {
	border-color: var(--beeline-accent);
	box-shadow: inset 0 0 0 1px var(--beeline-accent);
}

.beeline-payment .payment_box {
	background: var(--beeline-surface);
	border-radius: calc(var(--beeline-radius) / 1.5);
	margin: 0.75rem 0 0;
	padding: 0.875rem;
	font-size: 0.875rem;
}

.beeline-payment .payment_box::before {
	display: none;
}

.beeline-trust {
	margin: 1rem 0 0;
	font-size: 0.8125rem;
	color: var(--beeline-muted);
	text-align: center;
}

/* ------------------------------------------------------------- Mobile bar */

.beeline-paybar {
	position: fixed;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 90;
	background: var(--beeline-bg);
	border-top: 1px solid var(--beeline-line);
	box-shadow: var(--beeline-shadow);
	padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
}

.beeline-paybar[hidden] {
	display: none;
}

.beeline-paybar__inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	max-width: var(--beeline-max);
	margin-inline: auto;
}

.beeline-paybar__meta {
	display: grid;
	line-height: 1.2;
}

.beeline-paybar__label {
	font-size: 0.75rem;
	color: var(--beeline-muted);
}

.beeline-paybar__total {
	font-weight: 700;
	font-size: 1.0625rem;
}

.beeline-paybar__cta {
	margin-inline-start: auto;
	background: var(--beeline-accent);
	color: var(--beeline-accent-text);
	padding: 0.75rem 1.25rem;
	border-radius: var(--beeline-radius);
	border: 0;
	font-weight: 600;
	cursor: pointer;
}

@media (min-width: 900px) {
	.beeline-paybar {
		display: none;
	}
}

/* When the bar is on, keep the last step clear of it. */
body.beeline-paybar-on .beeline__main {
	padding-block-end: 5.5rem;
}

/* ------------------------------------------------------------ Misc + a11y */

.beeline .screen-reader-text {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	margin: -1px;
	padding: 0;
	border: 0;
}

.beeline-live {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.beeline .blockUI.blockOverlay {
	background: var(--beeline-bg) !important;
	opacity: 0.6 !important;
}

.beeline-skeleton {
	background: linear-gradient(90deg, var(--beeline-surface) 25%, transparent 37%, var(--beeline-surface) 63%);
	background-size: 400% 100%;
	animation: beeline-shimmer 1.4s ease infinite;
	border-radius: var(--beeline-radius);
	block-size: 1rem;
}

@keyframes beeline-shimmer {
	0% { background-position: 100% 50%; }
	100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
	.beeline *,
	.beeline *::before,
	.beeline *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* Without JavaScript nothing is collapsed and no step gate exists: the
   checkout degrades to one long, working form. The buttons that only mean
   something with JS stay hidden until the script announces itself. */
.beeline:not(.is-enhanced) .beeline-next,
.beeline:not(.is-enhanced) .beeline-step__edit,
.beeline:not(.is-enhanced) .beeline-paybar {
	display: none;
}

/* --------------------------------------------------- Phone: full-ish width */

/* A theme's content container is sized for reading prose. On a 360px screen it
   can spend a sixth of the width on gutters the checkout has no use for, which
   is width that should be going to addresses, delivery options and order
   lines. This breaks out of whatever the theme centres content in and keeps a
   small gutter of its own.
   The breakout is the standard `50% - 50vw` trick, multiplied by a token so a
   theme can switch it off with --beeline-phone-bleed: 0.
   These rules sit at the end of the file on purpose: several of them override
   padding shorthands declared earlier, which would otherwise win on source
   order. */

@media (max-width: 600px) {
	.beeline {
		margin-inline: calc((50% - 50vw) * var(--beeline-phone-bleed, 1));
		max-width: 100vw;
		padding-inline: var(--beeline-phone-gutter);
	}

	/* Reclaimed width is wasted if the boxes inside just grow their padding. */
	.beeline-step {
		padding: 1rem 0.875rem;
	}

	.beeline-summary {
		padding: 0.875rem 1rem 1rem;
	}

	.beeline-offer {
		padding: 0.625rem;
		gap: 0.75rem;
	}

	.beeline-upsells--tint,
	.beeline-upsells--outline,
	.beeline-upsells--card {
		padding: 0.875rem;
	}

	/* The bar is fixed to the viewport, so it lines up with the gutter rather
	   than with the theme's container. */
	.beeline-paybar {
		padding-inline: var(--beeline-phone-gutter);
	}

	/* Two columns of form fields never fitted here anyway. */
	.beeline .col2-set,
	.beeline #customer_details {
		gap: 0;
	}
}

/* ------------------------------------------------------- Store holidays */

/* Deliberately unscoped from .beeline: the banner appears on every page of
   the store, not only the checkout. Kept to two class names to stay out of
   the way of themes. */

.beeline-holiday-banner {
	position: relative;
	z-index: 20;
	box-sizing: border-box;
	inline-size: 100%;
	padding: 0.75rem 1rem;
	background: var(--beeline-holiday-bg, #1f2933);
	color: var(--beeline-holiday-text, #fff);
	text-align: center;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.beeline-holiday-banner__item {
	margin: 0 auto;
	max-width: 60rem;
}

.beeline-holiday-banner__item + .beeline-holiday-banner__item {
	margin-block-start: 0.5rem;
	padding-block-start: 0.5rem;
	border-block-start: 1px solid rgba(255, 255, 255, 0.25);
}

.beeline-holiday-banner a {
	color: inherit;
	text-decoration: underline;
}

/* The checkout notice is a warning in context, not a second banner, so it is
   quieter and keyed to the checkout's own tokens. */
.beeline-holiday-notice {
	margin-block-end: 1rem;
	padding: 0.75rem 0.875rem;
	border-radius: var(--beeline-radius, 8px);
	border-inline-start: 3px solid var(--beeline-holiday-accent, #b45309);
	background: var(--beeline-surface, rgba(0, 0, 0, 0.03));
	font-size: 0.875rem;
	line-height: 1.45;
}

.beeline-holiday-notice__item {
	margin: 0;
}

.beeline-holiday-notice__item + .beeline-holiday-notice__item {
	margin-block-start: 0.5rem;
}

/* Rendered inside the totals table when this plugin's checkout is switched
   off, where a padded table cell would misalign the columns. */
.beeline-holiday-row td {
	padding: 0 0 0.75rem !important;
}

/* --------------------------------------------------------- Store credit */

.beeline-credit {
	margin-block-end: 1.25rem;
	padding: 0.875rem 1rem;
	border: 1px solid var(--beeline-line);
	border-radius: var(--beeline-radius);
	background: var(--beeline-surface);
}

.beeline-credit__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.beeline-credit__label {
	font-weight: 600;
}

.beeline-credit__balance {
	font-weight: 700;
	white-space: nowrap;
}

.beeline-credit__expiry {
	margin: 0.35rem 0 0;
	font-size: 0.8125rem;
	color: var(--beeline-muted);
}

.beeline-credit__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	margin-block-start: 0.75rem;
}

.beeline-credit__use {
	background: transparent;
	border: 1px solid var(--beeline-accent);
	color: var(--beeline-accent);
	padding: 0.55rem 0.9rem;
	font-size: 0.875rem;
}

.beeline-credit__toggle {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 0.875rem;
	color: var(--beeline-accent);
	text-decoration: underline;
	cursor: pointer;
}

.beeline-credit__partial {
	flex: 1 1 100%;
	display: grid;
	grid-template-columns: minmax(0, 8rem) auto;
	gap: 0.5rem;
}

.beeline-credit__partial[hidden] {
	display: none;
}

.beeline-credit__applied {
	margin: 0.5rem 0 0;
	font-size: 0.9375rem;
	color: var(--beeline-success);
	font-weight: 600;
}

.beeline-credit__remove {
	background: none;
	border: 0;
	padding: 0;
	margin-inline-start: 0.5rem;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--beeline-muted);
	text-decoration: underline;
	cursor: pointer;
}

.beeline-credit__msg:empty {
	display: none;
}

.beeline-credit__msg {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	color: var(--beeline-muted);
}

/* -------------------------------------------------------------- Vouchers */

.beeline-voucher-free {
	font-weight: 700;
	color: var(--beeline-success);
	text-transform: uppercase;
	font-size: 0.8125rem;
	letter-spacing: 0.03em;
}

/* --------------------------------------------------------- Carrier logos */

/* Sits inside the delivery option's label, so it must not disturb the line it
   is on. A fixed height keeps the row from jumping as images load. */
.beeline-carrier-logos {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	vertical-align: middle;
}

.beeline-carrier-logos--before {
	margin-inline-end: 0.5rem;
}

.beeline-carrier-logos--after {
	margin-inline-start: 0.5rem;
}

/* On its own line under the name, without depending on what the surrounding
   label happens to be. display:flex is block-level, so it breaks the line in
   ordinary inline content; flex-basis covers the case where the label is
   itself a wrapping flex container, as it is in this plugin's delivery step.
   The markup order is unchanged, so the logos still follow the text for
   anyone reading with a screen reader. */
.beeline-carrier-logos--below {
	display: flex;
	inline-size: 100%;
	flex-basis: 100%;
	margin-block-start: 0.35rem;
}

/* Sized with !important, and with enough specificity to outrank a theme rule
   that also uses it. Themes routinely declare things like
   `.woocommerce img { height: auto !important }`, which silently beats an
   ordinary class selector and leaves logos at their natural size. Physical
   height and width are used rather than the logical properties, because that
   is what those theme rules target — a non-important `block-size` loses to an
   important `height` even though they are the same property. */
.beeline-carrier-logos img.beeline-carrier-logo,
img.beeline-carrier-logo {
	display: inline-block !important;
	box-sizing: content-box !important;
	height: var(--beeline-carrier-height, 22px) !important;
	max-height: var(--beeline-carrier-height, 22px) !important;
	min-height: 0 !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	object-fit: contain;
	vertical-align: middle;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	/* A carrier mark is not a content image, so the rounding and framing
	   themes apply to those is unwanted here. */
	border-radius: 0 !important;
	box-shadow: none !important;
	background: none !important;
}

/* The label wraps around the logo on narrow screens rather than squashing it. */
.beeline-shipping li label {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.25rem 0.35rem;
}

/* ------------------------------------------------------ Thank-you page */

.beeline-thankyou__above,
.beeline-thankyou__below {
	margin-block: 1.25rem;
}

.beeline-thankyou__page {
	margin-block-start: 1.5rem;
}

/* WooCommerce's overview list is a row of labelled figures; some themes leave
   it as plain bullets, which reads poorly next to a confirmation. */
.beeline-thankyou__overview {
	list-style: none;
	margin: 1.25rem 0;
	padding: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	border: 1px solid var(--beeline-line, rgba(0, 0, 0, 0.12));
	border-radius: var(--beeline-radius, 8px);
}

.beeline-thankyou__overview li {
	margin: 0;
	display: grid;
	gap: 0.15rem;
	font-size: 0.8125rem;
	color: var(--beeline-muted, rgba(0, 0, 0, 0.6));
	border: 0;
	padding: 0;
}

.beeline-thankyou__overview li strong {
	font-size: 1rem;
	color: var(--beeline-text, inherit);
}

/* -------------------------------------------------- Thank-you preview */

.beeline-thankyou-preview__flag {
	margin: 0 0 1.5rem;
	padding: 0.75rem 1rem;
	border: 1px dashed var(--beeline-line, rgba(0, 0, 0, 0.2));
	border-radius: var(--beeline-radius, 8px);
	background: var(--beeline-surface, rgba(0, 0, 0, 0.03));
	font-size: 0.875rem;
	color: var(--beeline-muted, rgba(0, 0, 0, 0.6));
}

/* ------------------------------------------ Delivery shown only once */

/*
 * There is deliberately no rule here hiding the summary's delivery row.
 *
 * There used to be, as a safety net for themes whose review-order template
 * does not fire the hooks this plugin uses to lift the options out. It did
 * more harm than good: once the row is converted into a plain delivery line
 * it keeps whatever classes the theme gave it, so a rule matching those
 * classes hid the very line the customer needs in order to see what delivery
 * costs. Removing the duplicate is handled where it can be done with
 * certainty — in PHP before the markup is sent, and in the browser against
 * whatever actually arrived.
 */

.beeline-delivery-total__pending {
	opacity: 0.7;
	font-weight: 400;
}
