/*
 * WooCommerce's pages in the theme (inc/woocommerce.php): the basket and checkout restyled to the mock-up's
 * (components/site/Basket.tsx; app/site.css .b-*), and the order received, account and product pages given the theme's
 * type, fields and buttons. WooCommerce's own markup is styled where it stands; no template is replaced.
 *
 * Both the classic basket and checkout (shortcodes: table.cart, .cart_totals, form.checkout, #payment) and the block
 * ones (.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) are covered.
 *
 * Payment gateways (Takepayments, Cardsave, Klarna) print their own fields and buttons inside .payment_box (classic)
 * or the payment option's content (blocks). Only the box round them is styled here, never what is inside it.
 * Loaded only on WooCommerce's pages (keyostas_woo_styles_where_needed).
 */

/* ---------------------------------------------------------------- shared: type, buttons, fields, notices */

.ko .ko-woo { color: var(--k-ink); }
.ko .ko-woo .woocommerce { font-size: 17px; line-height: 1.6; }
.ko .ko-woo h2, .ko .ko-woo h3 { font-family: Archivo, sans-serif; font-weight: 800; letter-spacing: -0.025em; color: var(--k-head); }
.ko .ko-woo a:not(.button):not(.k-btn):not(.wc-block-components-button) { color: var(--k-head); }

/* WooCommerce's buttons as the theme's (orange, deep navy text, radius 10, at least 48 px). Gateways' own buttons inside
   their payment box are left alone. */
.ko .ko-woo a.button:not(.payment_box *),
.ko .ko-woo button.button:not(.payment_box *),
.ko .ko-woo input.button:not(.payment_box *),
.ko .ko-woo #respond input#submit,
.ko .ko-woo .wc-block-components-button:not(.is-link):not(.wc-block-components-payment-method-label *),
.ko .ko-woo .wp-element-button:not(.payment_box *) {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; box-sizing: border-box;
	background: var(--k-orange); color: var(--k-deep); font: 700 16px/1.2 'Inter Variable', Inter, sans-serif; text-decoration: none;
	padding: 13px 20px; border-radius: 10px; border: 0; cursor: pointer; text-shadow: none; transition: transform 0.2s ease, filter 0.2s ease;
}
.ko .ko-woo a.button:not(.payment_box *):hover,
.ko .ko-woo button.button:not(.payment_box *):hover,
.ko .ko-woo .wc-block-components-button:not(.is-link):hover { transform: translateY(-2px); filter: brightness(1.06); background: var(--k-orange); color: var(--k-deep); }
.ko .ko-woo button.button:disabled, .ko .ko-woo button.button:disabled[disabled],
.ko .ko-woo .wc-block-components-button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; padding: 13px 20px; background: var(--k-orange); color: var(--k-deep); }
/* a second-rank button (update basket, apply coupon, view, back) is drawn as the theme's outline button */
.ko .ko-woo button[name='update_cart'],
.ko .ko-woo button[name='apply_coupon'],
.ko .ko-woo .woocommerce-orders-table a.button,
.ko .ko-woo .woocommerce-Addresses a.edit {
	background: transparent; color: var(--k-head); --k-fs: inset 0 0 0 1.5px var(--k-head); box-shadow: var(--k-fs);
}
.ko .ko-woo button[name='update_cart']:hover, .ko .ko-woo button[name='apply_coupon']:hover { background: transparent; color: var(--k-head); }
@media (prefers-reduced-motion: reduce) {
	.ko .ko-woo a.button:hover, .ko .ko-woo button.button:hover, .ko .ko-woo .wc-block-components-button:hover { transform: none; }
}

/* fields (app/site.css .k-field) */
.ko .ko-woo form .form-row { padding: 0; margin: 0 0 18px; }
.ko .ko-woo form .form-row label { font-weight: 700; font-size: 16px; color: var(--k-ink); line-height: 1.4; margin-bottom: 6px; }
.ko .ko-woo form .form-row .required { color: var(--k-err); text-decoration: none; }
.ko .ko-woo form .form-row input.input-text,
.ko .ko-woo form .form-row textarea,
.ko .ko-woo form .form-row select,
.ko .ko-woo form .form-row .select2-container .select2-selection,
.ko .ko-woo .coupon input.input-text,
.ko .ko-woo .quantity input.qty {
	min-height: 52px; box-sizing: border-box; padding: 12px 16px; font: inherit; font-size: 17px; line-height: 1.4; color: var(--k-ink);
	background: var(--k-surface); border: 1.5px solid var(--k-line2); border-radius: 10px;
}
.ko .ko-woo form .form-row .select2-container .select2-selection { display: flex; align-items: center; padding: 0 8px; }
.ko .ko-woo form .form-row .select2-container .select2-selection__rendered { color: var(--k-ink); line-height: 1.4; }
.ko .ko-woo form .form-row .select2-container .select2-selection__arrow { height: 50px; }
.ko .ko-woo form .form-row input.input-text:hover, .ko .ko-woo form .form-row textarea:hover { border-color: var(--k-head); }
.ko .ko-woo form .form-row input.input-text:focus-visible, .ko .ko-woo form .form-row textarea:focus-visible,
.ko .ko-woo form .form-row select:focus-visible { outline: 3px solid var(--k-orange); outline-offset: 3px; border-color: var(--k-head); }
.ko .ko-woo form .form-row.woocommerce-invalid input.input-text { border-color: var(--k-err); }
.ko .ko-woo form .form-row textarea { min-height: 120px; }

/* notices: a white card with an orange (or red) rule down the left, the theme's text colours */
.ko .ko-woo .woocommerce-message, .ko .ko-woo .woocommerce-info, .ko .ko-woo .woocommerce-error,
.ko .ko-woo .woocommerce-notices-wrapper .wc-block-components-notice-banner {
	margin: 0 0 24px; padding: 16px 20px 16px 52px; border: 1px solid var(--k-line); border-left: 4px solid var(--k-orange); border-radius: 12px;
	background: var(--k-surface); color: var(--k-ink); font-size: 16px; line-height: 1.5; box-shadow: var(--k-shadow); list-style: none;
}
.ko .ko-woo .woocommerce-error { border-left-color: var(--k-err); }
.ko .ko-woo .woocommerce-message::before, .ko .ko-woo .woocommerce-info::before { color: var(--k-orange); top: 16px; left: 20px; }
.ko .ko-woo .woocommerce-error::before { color: var(--k-err); top: 16px; left: 20px; }
.ko .ko-woo .woocommerce-message .button, .ko .ko-woo .woocommerce-info .button { float: right; margin-left: 16px; }
.ko .ko-woo .woocommerce-notices-wrapper:empty { display: none; }

/* tables */
.ko .ko-woo table.shop_table { border: 0; border-radius: 0; border-collapse: collapse; margin: 0; color: var(--k-ink); }
.ko .ko-woo table.shop_table th, .ko .ko-woo table.shop_table td { border-top: 1px solid var(--k-line); padding: 10px 0; }
.ko .ko-woo table.shop_table th { font-weight: 600; }

/* ---------------------------------------------------------------- the classic basket */

@media (min-width: 1001px) {
	.ko .ko-woo--basket .woocommerce:has(> .woocommerce-cart-form) { display: grid; grid-template-columns: 7fr 5fr; gap: 0 56px; align-items: start; }
	.ko .ko-woo--basket .woocommerce:has(> .woocommerce-cart-form) > * { grid-column: 1 / -1; }
	.ko .ko-woo--basket .woocommerce > .woocommerce-cart-form { grid-column: 1; }
	.ko .ko-woo--basket .woocommerce > .cart-collaterals { grid-column: 2; grid-row: span 2; position: sticky; top: 108px; }
}
.ko .ko-woo--basket .woocommerce-cart-form { margin-bottom: 32px; }
.ko .ko-woo--basket .cart-collaterals { width: auto; }
.ko .ko-woo--basket .cart-collaterals .cart_totals, .ko .ko-woo--basket .cart-collaterals .cross-sells { float: none; width: auto; }

/* each line is a card: date tile, course and places, price (app/site.css .b-line) */
.ko .ko-woo--basket table.shop_table.cart, .ko .ko-woo--basket table.shop_table.cart tbody { display: block; }
.ko .ko-woo--basket table.shop_table.cart thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ko .ko-woo--basket table.shop_table.cart tbody { display: grid; gap: 20px; }
.ko .ko-woo--basket table.shop_table.cart tr.cart_item {
	position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 4px 20px; align-items: center;
	padding: 20px 56px 20px 24px; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow);
}
.ko .ko-woo--basket table.shop_table.cart tr.cart_item td { display: block; padding: 0; border: 0; text-align: left; background: none; }
.ko .ko-woo--basket table.shop_table.cart tr.cart_item td::before { display: none; content: none; }
.ko .ko-woo--basket table.shop_table.cart td.product-thumbnail { display: block; grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 76px; }
.ko .ko-woo--basket table.shop_table.cart td.product-thumbnail img { width: 76px; height: auto; border-radius: 12px; }
.ko .ko-woo--basket table.shop_table.cart td.product-thumbnail a { text-decoration: none; display: block; }
.ko .ko-woo--basket table.shop_table.cart td.product-name { grid-column: 2; grid-row: 1; }
.ko .ko-woo--basket table.shop_table.cart td.product-name > a, .ko .ko-woo--basket table.shop_table.cart td.product-name { font: 700 18px/1.25 'Inter Variable', sans-serif; color: var(--k-ink); text-decoration: none; }
.ko .ko-woo--basket table.shop_table.cart td.product-name > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ko .ko-woo--basket table.shop_table.cart td.product-name dl.variation { margin: 4px 0 0; font: 400 15px/1.5 'Inter Variable', sans-serif; color: var(--k-muted); }
.ko .ko-woo--basket table.shop_table.cart td.product-name dl.variation dd { margin: 0; }
/* the theme's course details line reads as a plain line; its label stays for screen readers */
.ko .ko-woo dl.variation dt.variation-Coursedetails { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ko .ko-woo dl.variation dd.variation-Coursedetails { margin: 0; }
.ko .ko-woo--basket table.shop_table.cart td.product-name dl.variation dd p { margin: 0; }
.ko .ko-woo--basket table.shop_table.cart td.product-name .b-note { font-weight: 400; font-size: 15px; }
.ko .ko-woo--basket table.shop_table.cart tr.cart_item td.product-price { display: none; } /* the line's total is shown; the unit price is in the summary */
.ko .ko-woo--basket table.shop_table.cart td.product-quantity { grid-column: 2; grid-row: 2; }
.ko .ko-woo--basket table.shop_table.cart td.product-subtotal { grid-column: 3; grid-row: 1 / span 2; font: 800 22px/1 Archivo, sans-serif; color: var(--k-head); white-space: nowrap; text-align: right; }
.ko .ko-woo--basket table.shop_table.cart td.product-subtotal .tax_label, .ko .ko-woo--basket table.shop_table.cart td.product-subtotal small { font: 500 13px/1 'Inter Variable', sans-serif; color: var(--k-muted); margin-left: 4px; }
/* WooCommerce's "x" remove link, top right of the card, 44 px to touch */
.ko .ko-woo--basket table.shop_table.cart td.product-remove { position: absolute; top: 8px; right: 8px; }
.ko .ko-woo--basket .woocommerce a.remove {
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; font-size: 26px; line-height: 1; font-weight: 400;
	color: var(--k-muted) !important; background: transparent; text-decoration: none;
}
.ko .ko-woo--basket .woocommerce a.remove:hover { color: var(--k-err) !important; background: var(--k-tint); }
/* the number of places: WooCommerce's number box between the stepper's two buttons (app/site.css .b-qty) */
.ko .ko-woo--basket .quantity { display: inline-flex; align-items: stretch; margin-top: 12px; }
.ko .ko-woo--basket .quantity.b-qty { display: inline-grid; grid-template-columns: 44px 56px 44px; align-items: center; border: 1.5px solid var(--k-line2); border-radius: 10px; overflow: hidden; }
.ko .ko-woo--basket .quantity.b-qty input.qty { width: 56px; min-height: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.ko .ko-woo--basket .quantity.b-qty input.qty::-webkit-inner-spin-button, .ko .ko-woo--basket .quantity.b-qty input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ko .ko-woo--basket .quantity .ko-step { height: 44px; border: 0; background: var(--k-tint); color: var(--k-head); font: 700 20px/1 'Inter Variable', sans-serif; cursor: pointer; padding: 0; }
.ko .ko-woo--basket .quantity .ko-step:disabled { opacity: 0.4; cursor: not-allowed; }
.ko .ko-woo--basket .quantity .ko-step:focus-visible, .ko .ko-woo--basket .quantity.b-qty input.qty:focus-visible { outline: 3px solid var(--k-orange); outline-offset: -3px; box-shadow: inset 0 0 0 6px #12113a !important; }
/* coupon and "Update basket", under the cards */
.ko .ko-woo--basket table.shop_table.cart tr:not(.cart_item) { display: block; }
.ko .ko-woo--basket table.shop_table.cart td.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 4px 0 0; border: 0; text-align: left; }
.ko .ko-woo--basket table.shop_table.cart td.actions::before { display: none; }
.ko .ko-woo--basket table.shop_table.cart td.actions .coupon { display: flex; flex-wrap: wrap; gap: 8px; float: none; }
.ko .ko-woo--basket table.shop_table.cart td.actions .coupon input.input-text { width: 180px; margin: 0; }
.ko .ko-woo--basket table.shop_table.cart td.actions > .button { float: none; margin-left: auto; }

/* the order summary (app/site.css .b-total) */
.ko .ko-woo--basket .cart_totals {
	display: grid; gap: 12px; padding: 24px; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow);
}
.ko .ko-woo--basket .cart_totals > h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.ko .ko-woo .cart_totals table.shop_table, .ko .ko-woo .cart_totals table.shop_table tbody { display: block; width: 100%; }
.ko .ko-woo .cart_totals table.shop_table tr { display: flex; justify-content: space-between; gap: 16px; }
.ko .ko-woo .cart_totals table.shop_table th, .ko .ko-woo .cart_totals table.shop_table td { display: block; border: 0; padding: 4px 0; font-weight: 400; width: auto; text-align: left; }
.ko .ko-woo .cart_totals table.shop_table td { font-weight: 700; text-align: right; }
.ko .ko-woo .cart_totals table.shop_table td::before { display: none; content: none; }
.ko .ko-woo .cart_totals table.shop_table tr.order-total { margin-top: 8px; padding-top: 12px; border-top: 2px solid var(--k-head); font: 800 24px/1.2 Archivo, sans-serif; color: var(--k-head); }
.ko .ko-woo .cart_totals table.shop_table tr.order-total th, .ko .ko-woo .cart_totals table.shop_table tr.order-total td { font: inherit; color: inherit; }
.ko .ko-woo .cart_totals table.shop_table tr.order-total small { display: block; font: 500 13px/1.3 'Inter Variable', sans-serif; color: var(--k-muted); }
.ko .ko-woo .cart_totals .woocommerce-shipping-totals td { font-weight: 400; }
.ko .ko-woo--basket .wc-proceed-to-checkout { display: grid; gap: 12px; padding: 0; }
.ko .ko-woo--basket .wc-proceed-to-checkout .k-ticks { font-size: 15px; margin: 4px 0 0; }
.ko .ko-woo--basket .wc-proceed-to-checkout .b-pay-note { margin: 0; }
.ko .ko-woo--basket .woocommerce .wc-proceed-to-checkout a.checkout-button { display: flex; width: 100%; margin: 0; padding: 16px 24px; font-size: 17px; min-height: 56px; }
.ko .ko-woo--basket .wc-proceed-to-checkout .k-terms { margin-top: 4px; }

/* empty basket: the theme's card (keyostas_woo_empty_card), the only message; WooCommerce's own line is taken off its
   hook in inc/woocommerce.php, and its shop link stays in the page, hidden */
.ko .ko-woo .ko-woo-empty h2 { margin: 0 0 4px; }
.ko .ko-woo .ko-woo-empty p { margin: 0; }
.ko .ko-woo .ko-woo-empty ~ .return-to-shop { display: none; }

/* phones: the mock-up's line card on two columns, price under the course (app/site.css at 560px) */
@media (max-width: 560px) {
	.ko .ko-woo--basket table.shop_table.cart tr.cart_item { grid-template-columns: 64px minmax(0, 1fr); padding: 18px 48px 18px 18px; gap: 4px 16px; }
	.ko .ko-woo--basket table.shop_table.cart td.product-thumbnail { width: 64px; }
	.ko .ko-woo--basket table.shop_table.cart td.product-thumbnail .k-date-d b { font-size: 17px; }
	.ko .ko-woo--basket table.shop_table.cart td.product-subtotal { grid-column: 1 / -1; grid-row: auto; justify-self: end; }
	.ko .ko-woo--basket table.shop_table.cart td.actions .coupon, .ko .ko-woo--basket table.shop_table.cart td.actions .coupon input.input-text { width: 100%; }
	.ko .ko-woo--basket table.shop_table.cart td.actions .coupon .button, .ko .ko-woo--basket table.shop_table.cart td.actions > .button { width: 100%; }
}

/* ---------------------------------------------------------------- the classic checkout */

.ko .ko-woo .b-steps { margin: 0 0 24px; }
.ko .ko-woo--checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.ko .ko-woo--checkout form.checkout > * { min-width: 0; margin: 0; }
.ko .ko-woo--checkout form.checkout > #order_review { display: contents; } /* its table and payment box are placed apart */
.ko .ko-woo--checkout #customer_details, .ko .ko-woo--checkout #payment {
	padding: 28px; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow);
}
.ko .ko-woo--checkout #customer_details .col-1, .ko .ko-woo--checkout #customer_details .col-2 { float: none; width: auto; }
.ko .ko-woo--checkout #customer_details h3 { margin: 0 0 16px; font-size: 22px; line-height: 1.2; }
.ko .ko-woo--checkout #customer_details .col-2 h3 { margin-top: 12px; }
.ko .ko-woo--checkout #order_review_heading { font-size: 22px; line-height: 1.2; }
.ko .ko-woo--checkout table.woocommerce-checkout-review-order-table {
	display: table; width: 100%; padding: 0; background: var(--k-surface); border: 1px solid var(--k-line) !important; border-radius: 20px; box-shadow: var(--k-shadow);
	border-collapse: separate !important; border-spacing: 0;
}
.ko .ko-woo--checkout table.woocommerce-checkout-review-order-table th, .ko .ko-woo--checkout table.woocommerce-checkout-review-order-table td { padding: 12px 24px; vertical-align: top; }
.ko .ko-woo--checkout table.woocommerce-checkout-review-order-table thead th { border-top: 0; font-size: 14px; color: var(--k-muted); font-weight: 700; }
.ko .ko-woo--checkout table.woocommerce-checkout-review-order-table td.product-name dl.variation { margin: 4px 0 0; font-size: 14.5px; color: var(--k-muted); font-weight: 400; }
.ko .ko-woo--checkout table.woocommerce-checkout-review-order-table td.product-name dl.variation dd p { margin: 0; }
.ko .ko-woo--checkout table.woocommerce-checkout-review-order-table td.product-total, .ko .ko-woo--checkout table.woocommerce-checkout-review-order-table tfoot td { text-align: right; font-weight: 700; }
.ko .ko-woo--checkout table.woocommerce-checkout-review-order-table tr.order-total th, .ko .ko-woo--checkout table.woocommerce-checkout-review-order-table tr.order-total td {
	border-top: 2px solid var(--k-head); font: 800 22px/1.2 Archivo, sans-serif; color: var(--k-head);
}
/* the ways to pay (app/site.css .b-pay): each choice a bordered box; the gateway's own box inside it untouched */
.ko .ko-woo .ko-woo-payhead h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.ko .ko-woo .ko-woo-payhead .b-note { margin: 4px 0 0; }
.ko .ko-woo--checkout #payment { background: var(--k-surface); border-radius: 20px; }
.ko .ko-woo--checkout #payment ul.payment_methods { display: grid; gap: 10px; margin: 0; padding: 0 0 16px; border-bottom: 1px solid var(--k-line); list-style: none; }
.ko .ko-woo--checkout #payment ul.payment_methods > li { margin: 0; padding: 16px; border: 1.5px solid var(--k-line2); border-radius: 12px; line-height: 1.5; }
.ko .ko-woo--checkout #payment ul.payment_methods > li:has(> input:checked) { border-color: var(--k-head); box-shadow: inset 0 0 0 1px var(--k-head); }
.ko .ko-woo--checkout #payment ul.payment_methods > li > input.input-radio { width: 22px; height: 22px; margin: 0 10px 0 0; vertical-align: -5px; accent-color: #201f61; }
.ko .ko-woo--checkout #payment ul.payment_methods > li > label { font-weight: 700; color: var(--k-ink); cursor: pointer; }
.ko .ko-woo--checkout #payment ul.payment_methods > li > label img { max-height: 28px; vertical-align: middle; margin-left: 8px; }
.ko .ko-woo--checkout #payment div.payment_box { margin: 12px 0 0; border-radius: 10px; background: var(--k-tint); color: var(--k-ink); font-size: 15px; }
.ko .ko-woo--checkout #payment div.payment_box::before { border-bottom-color: var(--k-tint); }
.ko .ko-woo--checkout #payment div.form-row.place-order { display: grid; gap: 14px; margin: 0; padding: 16px 0 0; }
.ko .ko-woo--checkout #payment .place-order .b-pay-note { margin: 0; }
.ko .ko-woo--checkout #payment .woocommerce-privacy-policy-text, .ko .ko-woo--checkout #payment .woocommerce-terms-and-conditions-wrapper { font-size: 15px; color: var(--k-muted); }
.ko .ko-woo--checkout #payment #place_order { float: none; width: 100%; padding: 16px 24px; font-size: 17px; min-height: 56px; }
.ko .ko-woo--checkout .ko-woo-terms .k-terms { margin: 0; }
.ko .ko-woo--checkout .ko-woo-phonesum h2 { margin: 0; font-size: 20px; }
.ko .ko-woo--checkout .ko-woo-phonesum dl dt { min-width: 0; }

/* wide screens: details and payment on the left, the order and the terms on the right (Basket.tsx b-grid--pay) */
@media (min-width: 1001px) {
	.ko .ko-woo--checkout .ko-woo-phonesum { display: none; }
	.ko .ko-woo--checkout form.checkout {
		grid-template-columns: 7fr 5fr; column-gap: 56px; row-gap: 20px;
		grid-template-areas: 'det head' 'det rev' 'det terms' 'payhead .' 'pay .';
		grid-template-rows: auto auto 1fr auto auto;
	}
	.ko .ko-woo--checkout form.checkout > * { grid-column: 1 / -1; }
	.ko .ko-woo--checkout form.checkout #customer_details { grid-area: det; }
	.ko .ko-woo--checkout form.checkout #order_review_heading { grid-area: head; align-self: end; }
	.ko .ko-woo--checkout form.checkout .woocommerce-checkout-review-order-table { grid-area: rev; }
	.ko .ko-woo--checkout form.checkout .ko-woo-payhead { grid-area: payhead; }
	.ko .ko-woo--checkout form.checkout #payment { grid-area: pay; }
	.ko .ko-woo--checkout form.checkout .ko-woo-terms { grid-area: terms; align-self: start; }
}
@media (max-width: 620px) {
	.ko .ko-woo--checkout #customer_details, .ko .ko-woo--checkout #payment { padding: 20px; }
	.ko .ko-woo--checkout table.woocommerce-checkout-review-order-table th, .ko .ko-woo--checkout table.woocommerce-checkout-review-order-table td { padding: 10px 16px; }
}

/* ---------------------------------------------------------------- the block basket and checkout */

.ko .ko-woo .ko-woo-block .wc-block-components-sidebar-layout { margin-bottom: 0; }
.ko .ko-woo .ko-woo-block .wp-block-woocommerce-cart, .ko .ko-woo .ko-woo-block .wp-block-woocommerce-checkout { margin: 0; max-width: none; }
.ko .ko-woo .ko-woo-block .wc-block-components-main, .ko .ko-woo .ko-woo-block .wc-block-components-sidebar { box-sizing: border-box; }
/* the summary column as the mock-up's order summary card */
.ko .ko-woo .ko-woo-block .wc-block-cart__sidebar > *:first-child, .ko .ko-woo .ko-woo-block .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__content,
.ko .ko-woo .ko-woo-block .wp-block-woocommerce-checkout-order-summary-block {
	background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow);
}
.ko .ko-woo .ko-woo-block .wp-block-woocommerce-cart-order-summary-block { padding: 8px 20px 20px; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow); }
.ko .ko-woo .ko-woo-block .wc-block-components-totals-footer-item { color: var(--k-head); }
.ko .ko-woo .ko-woo-block .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.ko .ko-woo .ko-woo-block .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font: 800 22px/1.2 Archivo, sans-serif; }
.ko .ko-woo .ko-woo-block .wc-block-cart__submit-button, .ko .ko-woo .ko-woo-block .wc-block-components-checkout-place-order-button { width: 100%; min-height: 56px; font-size: 17px; }
/* lines: a card each, the product name in the theme's weight */
.ko .ko-woo .ko-woo-block table.wc-block-cart-items, .ko .ko-woo .ko-woo-block table.wc-block-cart-items tbody { display: block; border: 0; }
.ko .ko-woo .ko-woo-block table.wc-block-cart-items thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ko .ko-woo .ko-woo-block table.wc-block-cart-items tbody { display: grid; gap: 20px; }
.ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-items__row {
	display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; padding: 20px 24px;
	background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow);
}
.ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-items__row > td { display: block; padding: 0 !important; border: 0 !important; }
.ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-item__image { width: 76px; grid-column: 1; grid-row: 1; }
.ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-item__image img { width: 76px; }
.ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-item__product { grid-column: 2; grid-row: 1; }
.ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-item__total { grid-column: 3; grid-row: 1; text-align: right; }
/* A price entered in WooCommerce as a sale price is not a saving the site offers (the live online price is stored as the
   sale price of a product whose regular price is the classroom price): no "Save £..." badge and no struck-through
   "was" price, on a basket line and in the checkout's order summary alike. The classic basket and checkout print
   neither. */
.ko .ko-woo .ko-woo-block .wc-block-components-sale-badge { display: none; }
.ko .ko-woo .ko-woo-block .wc-block-components-product-price del,
.ko .ko-woo .ko-woo-block .wc-block-components-product-price .screen-reader-text:has(+ del),
.ko .ko-woo .ko-woo-block .wc-block-components-product-price del + .screen-reader-text { display: none; }
.ko .ko-woo .ko-woo-block .wc-block-components-product-price ins { text-decoration: none; }
/* The product's short description under a line (staff write the place and the weeks there, "Location: Virtual",
   "Course Dates: ...") is not shown: the "Course date" and "Location" rows say both once, in the dates list's words. */
.ko .ko-woo .ko-woo-block .wc-block-components-product-metadata__description { display: none; }
@media (max-width: 560px) {
	.ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-items__row { grid-template-columns: 64px minmax(0, 1fr); padding: 18px; gap: 4px 16px; }
	.ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-item__image, .ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-item__image img { width: 64px; }
	.ko .ko-woo .ko-woo-block .wc-block-cart-items .wc-block-cart-item__total { grid-column: 1 / -1; grid-row: 2; justify-self: end; }
}
.ko .ko-woo .ko-woo-block .wc-block-components-product-name { font: 700 18px/1.25 'Inter Variable', sans-serif; color: var(--k-ink); text-decoration: none; }
.ko .ko-woo .ko-woo-block .wc-block-cart-item__total .wc-block-components-product-price { font: 800 22px/1 Archivo, sans-serif; color: var(--k-head); }
.ko .ko-woo .ko-woo-block .wc-block-components-product-details { font-size: 15px; color: var(--k-muted); }
.ko .ko-woo .ko-woo-block .wc-block-components-product-details__course-details .wc-block-components-product-details__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ko .ko-woo .ko-woo-block .wc-block-components-quantity-selector { border-radius: 10px; border-color: var(--k-line2); }
.ko .ko-woo .ko-woo-block .wc-block-components-quantity-selector::after { border-color: var(--k-line2); border-radius: 10px; }
.ko .ko-woo .ko-woo-block .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button { background: var(--k-tint); color: var(--k-head); font-weight: 700; }
/* the date tile over a dated line's picture (keyostas_woo_block_tiles gives each its words) */
.ko .ko-woo .wc-block-cart-item__image a { position: relative; display: block; text-decoration: none; }
.ko .ko-woo .wc-block-cart-item__image a::after {
	position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 18px 0 6px; box-sizing: border-box;
	border-radius: 14px; background: var(--k-navy); color: #fff; font: 800 22px/1.05 Archivo, sans-serif; letter-spacing: -0.02em; text-align: center; white-space: pre;
}
.ko .ko-woo .wc-block-cart-item__image a::before {
	position: absolute; left: 0; right: 0; top: 0; z-index: 2; padding: 5px 0 4px; border-radius: 14px 14px 0 0; background: var(--k-orange); color: #12113a;
	font: 800 11px/1 'Inter Variable', Inter, sans-serif; letter-spacing: 0.1em; text-align: center;
}
.ko .ko-woo .wc-block-cart-item__image a img { min-height: 78px; object-fit: cover; }
/* the theme's card under the block (ticks, invoice line, other dates, terms), lined up under the summary column */
.ko .ko-woo .ko-woo-after { display: grid; gap: 12px; padding: 24px; margin-top: 24px; }
.ko .ko-woo .ko-woo-after .k-ticks, .ko .ko-woo .ko-woo-after .b-note { margin: 0; }
@media (min-width: 700px) { .ko .ko-woo .ko-woo-after { width: calc(35% - 8px); min-width: 340px; margin-left: auto; box-sizing: border-box; } }
/* Update 26 (audit fix 5): set by keyostas_woo_block_layout_script() (inc/woocommerce.php) from 1001px while the block shows its
   two columns, and nothing at all below that. The card under the block as wide as the order summary, right edges level; the
   checkout's summary column level with the first card above the block, and kept on screen while it fits under the header. */
.ko .ko-woo .ko-woo-after.ko-woo-after--side { width: var(--ko-side-w); min-width: 0; margin-left: auto; box-sizing: border-box; }
.ko .ko-woo .ko-woo-block .wc-block-components-sidebar.ko-side-up { margin-top: calc(-1 * var(--ko-side-up, 0px)); }
.ko .ko-woo .ko-woo-block .wc-block-components-sidebar.ko-side-stick { position: sticky; top: var(--ko-side-top, 108px); align-self: flex-start; }
/* the block checkout's short summary (the total first on a phone, as on the classic checkout; hidden from 1001px above) */
.ko .ko-woo .ko-woo-phonesum--block { margin: 0 0 24px; }
/* on phones the theme's own bar (total and "Go to checkout", last in the frame) takes the place of the block's */
@media (max-width: 620px) { .ko .ko-woo .wc-block-cart__submit-container--sticky { display: none; } }

/* ---------------------------------------------------------------- order received, account, products */

.ko .ko-woo--received .woocommerce-order { display: grid; gap: 24px; }
.ko .ko-woo--received .woocommerce-order > * { margin: 0; }
.ko .ko-woo--received .woocommerce-thankyou-order-received { padding: 20px 24px; border-left: 4px solid var(--k-ok); border-radius: 12px; background: var(--k-surface); box-shadow: var(--k-shadow); font-weight: 700; color: var(--k-head); }
.ko .ko-woo--received ul.order_details { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; }
.ko .ko-woo--received ul.order_details::before, .ko .ko-woo--received ul.order_details::after { display: none; }
.ko .ko-woo--received ul.order_details li { float: none; margin: 0; padding: 14px 18px; border: 1px solid var(--k-line); border-radius: 12px; background: var(--k-surface); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--k-muted); }
.ko .ko-woo--received ul.order_details li strong { display: block; margin-top: 4px; font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--k-head); }
.ko .ko-woo--received .woocommerce-order-details, .ko .ko-woo--received .woocommerce-customer-details, .ko .ko-woo--received .woocommerce-bacs-bank-details {
	padding: 24px; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow);
}
.ko .ko-woo--received h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.2; }
.ko .ko-woo--received address { border: 0; padding: 0; font-style: normal; }

.ko .ko-woo--account .woocommerce-MyAccount-navigation ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ko .ko-woo--account .woocommerce-MyAccount-navigation a { display: block; padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.ko .ko-woo--account .woocommerce-MyAccount-navigation a:hover { background: var(--k-surface); }
.ko .ko-woo--account .woocommerce-MyAccount-navigation .is-active a { background: var(--k-navy); color: #fff !important; }
.ko .ko-woo--account .woocommerce-MyAccount-content, .ko .ko-woo--account form.woocommerce-form-login, .ko .ko-woo--account form.woocommerce-form-register {
	padding: 28px; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow);
}
.ko .ko-woo--account .woocommerce form.login, .ko .ko-woo--account .woocommerce form.register { margin: 0 0 24px; }

.ko .ko-woo--product .product .price { font: 800 28px/1.2 Archivo, sans-serif; color: var(--k-head); }
/* the same on WooCommerce's own product pages and lists: no "Sale!" flash and no struck-through price beside the price */
/* (!important: WooCommerce's own sheet sets these with longer selectors) */
.ko .ko-woo--product .onsale { display: none !important; }
.ko .ko-woo--product .price del, .ko .ko-woo--product .price del + .screen-reader-text { display: none !important; }
.ko .ko-woo--product .price ins { text-decoration: none !important; }
.ko .ko-woo--product .product .stock { font-weight: 700; color: var(--k-ok); }
.ko .ko-woo--product .product .stock.out-of-stock { color: var(--k-err); }
.ko .ko-woo--product form.cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ko .ko-woo--product form.cart .quantity input.qty { width: 88px; text-align: center; }
.ko .ko-woo--product .product_meta { font-size: 15px; color: var(--k-muted); }
.ko .ko-woo--product .woocommerce-tabs ul.tabs li { border-radius: 10px 10px 0 0; background: var(--k-tint); border-color: var(--k-line); }
.ko .ko-woo--product .woocommerce-tabs ul.tabs li.active { background: var(--k-surface); }
.ko .ko-woo--product .woocommerce-tabs ul.tabs::before { border-color: var(--k-line); }
.ko .ko-woo--product ul.products li.product { padding: 16px; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow); }
.ko .ko-woo--product ul.products li.product .woocommerce-loop-product__title { font: 700 18px/1.3 'Inter Variable', sans-serif; color: var(--k-ink); }
/* the block line's unit price: the line total stands on its own, as the mock-up's card shows it */
.ko .ko-woo .ko-woo-block .wc-block-cart-item__prices { display: none; }
/* a block basket emptied by removing its last line: the theme's card, printed hidden beside the block
   (keyostas_woo_round_blocks), is shown and the block's own empty message (its heading and "Return to shop") and the
   card of ticks and terms are hidden, as other block parts are hidden above. The block is past loading (not
   .is-loading) before this applies, because its first HTML carries the empty message on a full basket too. */
.ko .ko-woo .ko-woo-empty--later { display: none; }
.ko .ko-woo .ko-woo-block--cart:has(.wp-block-woocommerce-cart:not(.is-loading) .wp-block-woocommerce-empty-cart-block) > .ko-woo-empty { display: block; }
.ko .ko-woo .ko-woo-block--cart:has(.wp-block-woocommerce-cart:not(.is-loading) .wp-block-woocommerce-empty-cart-block) :is(.wp-block-woocommerce-empty-cart-block, .ko-woo-after) { display: none; }
/* a browser without :has() keeps the block's own message, without its product list, as a card like the theme's */
.ko .ko-woo .wp-block-woocommerce-empty-cart-block :is(.wp-block-woocommerce-product-new, .wp-block-separator, .wc-block-grid) { display: none; }
.ko .ko-woo .wp-block-woocommerce-empty-cart-block { padding: 32px; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; box-shadow: var(--k-shadow); }
/* WooCommerce's small-screen sheet right-aligns every cell with !important; the line card keeps its own alignment */
.ko .ko-woo--basket table.shop_table.cart tr.cart_item td:not(.product-subtotal), .ko .ko-woo--basket table.shop_table.cart td.actions { text-align: left !important; }
.ko .ko-woo--basket table.shop_table.cart tr.cart_item td.product-subtotal { text-align: right !important; }

/* ---------------------------------------------------------------- the e-learning section on the order received page
   (update 12, inc/elearning-thanks.php): a card above the order details, the Start form's large orange button with its
   line under it, and the list of places. */
.ko .ko-woo--received .ko-thanks { display: grid; gap: 14px; padding: 24px; }
.ko .ko-thanks > * { margin: 0; }
.ko .ko-thanks .k-h3 { margin: 0; }
.ko .ko-thanks-start { display: grid; gap: 10px; justify-items: start; }
.ko .ko-thanks-start form { margin: 0; }
.ko .ko-thanks-under, .ko .ko-thanks-note { font-size: 15px; color: var(--k-muted); }
.ko .ko-thanks-say { font-weight: 600; color: var(--k-ink); }
.ko .ko-thanks-h { font: 800 17px/1.3 Archivo, 'Inter Variable', sans-serif; color: var(--k-head); }
.ko .ko-thanks-places { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ko .ko-thanks-places li { padding: 12px 14px; border: 1px solid var(--k-line); border-radius: 10px; overflow-wrap: anywhere; }
.ko .ko-thanks-n { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--k-label, var(--k-muted)); }
.ko .ko-thanks-you { color: var(--k-muted); }
@media (max-width: 620px) { .ko .ko-thanks-start .k-btn { width: 100%; } .ko .ko-thanks-start form { width: 100%; } }

/* Fields that keep WooCommerce's white background in both schemes (the block basket and checkout): what sits on them
   takes the light scheme's colours in dark mode too (update 12c; Devon, 18 November 2026: in dark mode the labels were
   light on white, about 1.2 to 1). Light mode looks as before. A label in an error state keeps WooCommerce's red, which
   reads on white. The validation message under a field sits on the page, so in dark mode it takes the page's own error
   colour. The fields themselves are told they are light (color-scheme), so the browser's own colours for them (Chrome's
   autofill, the note's scroll bar, the select's list) are light too: the main sheet gives inputs color-scheme dark in
   dark mode, under which Chrome paints an autofilled field dark, and the dark label would vanish on it. The item count
   on the order summary is a white figure on a disc of the text colour, so the disc keeps the light scheme's ink. Test:
   wordpress/dev/tests/checkout-contrast.cjs. */
.ko .ko-woo .wc-block-components-text-input input,
.ko .ko-woo textarea.wc-block-components-textarea,
.ko .ko-woo .wc-blocks-components-select__select { color-scheme: light; }
.ko .ko-woo .wc-block-components-text-input label,
.ko .ko-woo .wc-blocks-components-select__container,
.ko .ko-woo .wc-blocks-components-select__label { color: #16162b; }
.ko .ko-woo .wc-blocks-components-select__expand { fill: #16162b; color: #16162b; }
.ko .ko-woo textarea.wc-block-components-textarea { color: #2b2d2f; }
.ko .ko-woo .wc-block-components-text-input input::placeholder,
.ko .ko-woo textarea.wc-block-components-textarea::placeholder { color: #50516b; opacity: 1; }
.ko .ko-woo .wc-block-components-text-input.has-error label,
.ko .ko-woo .has-error .wc-blocks-components-select__label { color: #cc1818; }
.ko .ko-woo .has-error .wc-blocks-components-select__expand { fill: #cc1818; }
.ko .ko-woo .wc-block-components-order-summary-item__quantity { color: #16162b; }
/* the block basket's quantity buttons: WooCommerce dims them while not hovered (4.1 to 1 for the "+"); shown in full */
.ko .ko-woo .wc-block-components-quantity-selector__button:not(:disabled) { opacity: 1; }
/* the theme's own fields (the classic basket and checkout): placeholders in the scheme's muted colour */
.ko .ko-woo form .form-row input.input-text::placeholder,
.ko .ko-woo form .form-row textarea::placeholder,
.ko .ko-woo input#coupon_code::placeholder { color: var(--k-muted); opacity: 1; }
@media (prefers-color-scheme: dark) {
	.ko .ko-woo .wc-block-components-validation-error,
	.ko .ko-woo .wc-block-components-validation-error p,
	.ko .ko-woo .checkout-inline-error-message,
	.ko .ko-woo form.checkout_coupon .coupon-error-notice,
	.ko .ko-woo table.cart td.actions .coupon .coupon-error-notice,
	.ko .ko-woo form .form-row.woocommerce-invalid label { color: var(--k-err); }
}

/* Update 21 (D212): the NEBOSH Diploma bundle's office line (inc/bundle.php) on a line of its own in the block basket
   and checkout. Only a line holding both a "Course date" and a "Course details" row is the bundle's (a dated course has
   "Course date" and "Location", or "Course details" alone); the block's " / " between the two (an aria-hidden span) goes. */
.ko .ko-woo .wc-block-components-product-details:has(> .wc-block-components-product-details__course-details) > .wc-block-components-product-details__course-date > span[aria-hidden="true"] { display: none; }
.ko .ko-woo .wc-block-components-product-details:has(> .wc-block-components-product-details__course-date) > .wc-block-components-product-details__course-details { display: block; }

/* Update 21: the order received page fits a phone (it ran 100 px past a 390 px screen, live under update 20 too). The page
   is a one-column grid whose column took the order table's widest unbroken word (an email address in a "Delegate" row);
   the column may now shrink, long words in the course column break (prices never), and the order number and date boxes keep inside the page. */
.ko .ko-woo--received .woocommerce-order { grid-template-columns: minmax(0, 1fr); }
.ko .ko-woo--received .woocommerce-order > * { min-width: 0; }
.ko .ko-woo--received .woocommerce-table--order-details { width: 100%; }
.ko .ko-woo--received .woocommerce-table--order-details .product-name,
.ko .ko-woo--received address,
.ko .ko-woo--received ul.order_details li { overflow-wrap: anywhere; }
.ko .ko-woo--received .woocommerce-table--order-details .product-total,
.ko .ko-woo--received .woocommerce-table--order-details tfoot td .amount { white-space: nowrap; }
.ko .ko-woo--received ul.order_details li { min-width: 0; max-width: 100%; }
