/*
 * The checkout — design/Checkout.dc.html: white panels on a soft page, the
 * summary on the right (on top, folded, on a phone). The markup is
 * WooCommerce's (woocommerce/checkout/*); its script swaps the shipping,
 * payment and summary parts as the address or the method changes.
 * Also the „поръчката е приета“ page (checkout/thankyou.php).
 */

body.woocommerce-checkout {
	background: var(--soft);
}

body.woocommerce-checkout .site-main {
	background: var(--soft);
}

body.woocommerce-checkout .page-body {
	padding-top: 32px;
	padding-bottom: 88px;
}

/* The quiet header */
.site-header--checkout .site-header__inner {
	justify-content: space-between;
}

/* The shop's header centres the logo on a phone; here the phone is beside it */
.site-header--checkout .logo {
	position: static;
	transform: none;
}

.checkout-help {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--muted);
}

.checkout-help a {
	color: var(--ink);
	font-weight: 700;
}

/* Head */
.kt-checkout__head {
	margin-bottom: 28px;
}

.kt-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-size: 14px;
	color: var(--ink-2);
}

.kt-back:hover {
	color: var(--ink);
}

.kt-checkout__title {
	margin: 0;
	font-size: clamp(30px, 4vw, 48px);
	font-weight: 800;
	line-height: 1.1;
}

.kt-checkout__lead {
	margin: 10px 0 0;
	font-size: 15px;
	color: var(--ink-2);
}

/* Layout */
.kt-checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 24px;
	align-items: start;
}

.kt-checkout__main {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

#order_review {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.kt-checkout__side {
	position: sticky;
	top: 24px;
}

.kt-panel {
	padding: 28px;
	border-radius: 28px;
	background: var(--white);
}

.kt-panel[hidden] {
	display: none;
}

.kt-panel__title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
	font-size: 22px;
	font-weight: 700;
}

.kt-step {
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: var(--r-pill);
	background: var(--ink);
	color: var(--white);
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Fields */
.kt-fields,
.woocommerce-address-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 14px;
}

/* Not Speedy's rows: it shows and hides them itself (speedy.css, speedy.js) */
:is(.kt-checkout, .kt-form) .form-row:where(:not(#speedy_custom_checkout_field *)) {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
}

:is(.kt-checkout, .kt-form) .form-row-first {
	grid-column: 1;
}

:is(.kt-checkout, .kt-form) .form-row-last {
	grid-column: 2;
}

:is(.kt-checkout, .kt-form) .form-row > label {
	font-size: 14px;
	font-weight: 600;
	color: var(--ink);
}

:is(.kt-checkout, .kt-form) .form-row .required {
	color: #c2185b;
	text-decoration: none;
	border: 0;
}

:is(.kt-checkout, .kt-form) .form-row .optional {
	color: var(--muted);
	font-weight: 400;
}

:is(.kt-checkout, .kt-form) .woocommerce-input-wrapper {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

:is(.kt-checkout, .kt-form) .woocommerce-input-wrapper > strong {
	font-weight: 600; /* the country, when the shop sells to one */
}

:is(.kt-checkout, .kt-form) .input-text,
:is(.kt-checkout, .kt-form) select,
.kt-coupon input {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: 1.5px solid var(--field-border);
	border-radius: var(--r-field);
	background: var(--white);
	color: var(--ink);
	font: 16px var(--font-body); /* 16 px: no zoom on iOS */
}

/* Safari lets a native select's long option („услуга: СТАНДАРТ 24 ЧАСА,
   цена: …“, Speedy) widen the page past the select's own box: its wrapper
   clips it, 3 px out for the focus ring. (A select2 field keeps its list.) */
:is(.kt-checkout, .kt-form) .woocommerce-input-wrapper:has(> select:not(.select2-hidden-accessible)) {
	display: block;
	margin: -3px;
	padding: 3px;
	overflow: hidden;
	overflow: clip;
}

:is(.kt-checkout, .kt-form) textarea.input-text {
	height: auto;
	min-height: 104px;
	padding: 14px 16px;
	resize: vertical;
}

:is(.kt-checkout, .kt-form) .input-text::placeholder,
.kt-coupon input::placeholder {
	color: #8a8698;
}

:is(.kt-checkout, .kt-form) .input-text:focus,
:is(.kt-checkout, .kt-form) select:focus,
.kt-coupon input:focus {
	border-color: var(--ink);
	outline: 3px solid rgba(46, 124, 246, 0.35);
	outline-offset: 0;
}

:is(.kt-checkout, .kt-form) .description {
	font-size: 13px;
	color: var(--muted);
}

:is(.kt-checkout, .kt-form) .woocommerce-invalid .input-text,
:is(.kt-checkout, .kt-form) .woocommerce-invalid select,
:is(.kt-checkout, .kt-form) .woocommerce-invalid .select2-selection {
	border-color: #c62828;
}

:is(.kt-checkout, .kt-form) .checkout-inline-error-message {
	margin: 0;
	font-size: 13px;
	color: #c62828;
}

/* The address is never asked for at the checkout: Speedy's own fields and
   BOX NOW's locker carry it (inc/checkout.php). The rows stay in the form —
   Speedy's script fills them — and stay hidden, whatever a script toggles. */
.kt-checkout :is(#billing_country_field, #billing_address_1_field, #billing_address_2_field, #billing_city_field, #billing_state_field, #billing_postcode_field) {
	display: none !important;
}

/* A checkbox among the fields (Bulgarisation's company invoice, an account) */
:is(.kt-checkout, .kt-form) .form-row label.checkbox {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

:is(.kt-checkout, .kt-form) .form-row label.checkbox .optional {
	display: none;
}

:is(.kt-checkout, .kt-form) .form-row label.checkbox input[type="checkbox"] {
	flex: none;
	appearance: none;
	width: 24px;
	height: 24px;
	margin: 0;
	border: 1.5px solid var(--field-border);
	border-radius: 7px;
	background: var(--white) center / 14px no-repeat;
	cursor: pointer;
}

:is(.kt-checkout, .kt-form) .form-row label.checkbox input[type="checkbox"]:checked {
	border-color: var(--ink);
	background-color: var(--ink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

:is(.kt-checkout, .kt-form) .form-row label.checkbox input[type="checkbox"]:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

/* The company's fields only with „Искаш ли фактура за фирма?“ ticked — from
   the first paint (Bulgarisation's script hides them at its first update). */
@supports selector(:has(*)) {
	.kt-checkout .woo-bg-company-info {
		display: none !important;
	}

	.kt-checkout:has(#woo-billing-to-company:checked) .woo-bg-company-info {
		display: flex !important;
	}
}

/* WooCommerce's enhanced selects (country, region) */
:is(.kt-checkout, .kt-form) .select2-container {
	width: 100% !important;
}

:is(.kt-checkout, .kt-form) .select2-container .select2-selection--single {
	height: 52px;
	border: 1.5px solid var(--field-border);
	border-radius: var(--r-field);
}

:is(.kt-checkout, .kt-form) .select2-container .select2-selection--single .select2-selection__rendered {
	padding-left: 16px;
	line-height: 49px;
	color: var(--ink);
}

:is(.kt-checkout, .kt-form) .select2-container .select2-selection--single .select2-selection__arrow {
	top: 1px;
	right: 10px;
	height: 49px;
}

.select2-dropdown {
	border: 1.5px solid var(--field-border);
	border-radius: var(--r-field);
	overflow: hidden;
}

.select2-results__option--highlighted[aria-selected],
.select2-results__option--highlighted[data-selected] {
	background: var(--ink) !important;
	color: var(--white) !important;
}

/* Ship elsewhere, notes, an account */
:is(.kt-checkout, .kt-form) .woocommerce-shipping-fields,
:is(.kt-checkout, .kt-form) .woocommerce-additional-fields,
:is(.kt-checkout, .kt-form) .woocommerce-account-fields {
	margin-top: 22px;
}

:is(.kt-checkout, .kt-form) .woocommerce-shipping-fields h3,
:is(.kt-checkout, .kt-form) .woocommerce-additional-fields h3 {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 700;
}

:is(.kt-checkout, .kt-form) .shipping_address {
	margin-top: 14px;
}

:is(.kt-checkout, .kt-form) input[type='checkbox'] {
	width: 20px;
	height: 20px;
	accent-color: var(--ink);
}

:is(.kt-checkout, .kt-form) .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

/* Option cards: delivery and payment */
.kt-checkout ul.kt-rates,
.kt-checkout ul.wc_payment_methods {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kt-opt {
	position: relative;
	margin: 0;
}

.kt-opt__input {
	position: absolute;
	top: 26px;
	left: 22px;
	width: 22px;
	height: 22px;
	margin: 0;
	opacity: 0;
}

.kt-opt__label {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 15px;
	font-weight: 700;
	min-height: 72px;
	padding: 16px 20px;
	border: 1.5px solid var(--line-2);
	border-radius: 18px;
	background: var(--white);
	cursor: pointer;
	transition: border-color 0.15s;
}

.kt-opt__label:hover {
	border-color: var(--field-border);
}

/* The radio dot is the label's own ::before, not an element inside it: Speedy
   replaces the whole label of its method when its price is 0 (speedy.js,
   label[for=shipping_method_0_speedy_shipping_method] → title + .amount). */
.kt-opt__label::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	box-sizing: border-box;
	border: 2px solid var(--field-border);
	border-radius: var(--r-pill);
	background: var(--white);
	transition: border-width 0.15s;
}

.kt-opt__label > .amount {
	flex: none;
	margin-left: auto;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

.kt-opt__input:checked + .kt-opt__label {
	border: 2px solid var(--ink);
	padding: 15.5px 19.5px;
}

/* The chosen one is the checked radio, never the method WooCommerce drew as
   chosen: until its update came back the two differed, and both looked chosen. */
.kt-opt__input:checked + .kt-opt__label::before {
	border: 7px solid var(--ink);
}

.kt-opt__input:focus-visible + .kt-opt__label {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

.kt-opt__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.kt-opt__name {
	font-size: 15px;
	font-weight: 700;
}

.kt-opt__note {
	font-size: 13px;
	font-weight: 400;
	color: var(--muted);
}

.kt-opt__price {
	flex: none;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

.kt-rate__later {
	font-size: 13px;
	font-weight: 600;
	color: var(--ink-2);
}

.kt-rate__free {
	color: var(--success);
}

/* Delivery: the whole method is the card, so what a courier's plugin hangs
   under its label (BOX NOW's button, the chosen locker) stays inside it */
.kt-rate {
	border: 1.5px solid var(--line-2);
	border-radius: 18px;
	background: var(--white);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.kt-rate:hover {
	border-color: var(--field-border);
}

.kt-rate:has(> .kt-opt__input:checked) {
	border-color: var(--ink);
	box-shadow: inset 0 0 0 0.5px var(--ink);
}

/* Without :has(), .is-on — kept on the checked radio's card by main.js */
@supports not selector(:has(*)) {
	.kt-rate.is-on {
		border-color: var(--ink);
		box-shadow: inset 0 0 0 0.5px var(--ink);
	}
}

/* While WooCommerce updates, the cards stay clickable: its grey cover took
   the clicks, so a change made then was lost and the radio and the order
   could differ. A click now starts the update over (main.js). */
.kt-ship-rates > .blockUI {
	display: none !important;
}

.kt-ship-rates:has(> .blockUI) .kt-opt__price {
	opacity: 0.45;
	transition: opacity 0.2s;
}

.kt-rate:has(> .kt-opt__input:focus-visible) {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

.kt-rate > .kt-opt__label,
.kt-rate > .kt-opt__input:checked + .kt-opt__label {
	padding: 16px 20px;
	border: 0;
	background: none;
	outline: 0;
}

.kt-rate > :not(.kt-opt__input):not(.kt-opt__label) {
	margin: -4px 20px 16px 58px;
}

/* BOX NOW's stylesheet lays out every shipping label by id
   (.woocommerce-checkout #shipping_method li label: wrap, its own gap,
   word-break); the cards keep their own layout */
#shipping_method .kt-rate > .kt-opt__label {
	display: flex;
	flex-wrap: nowrap;
	gap: 16px;
	width: auto;
	overflow-wrap: normal;
	word-break: normal;
}

#shipping_method .kt-rate .kt-opt__price .amount {
	margin-left: 0;
}

/* The courier's mark: its wordmark in its colour (decorative — the name follows) */
.kt-courier {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 32px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.kt-courier--speedy {
	background: #e30613; /* Speedy red */
	color: #fff;
	font-size: 14px;
	letter-spacing: -0.01em;
}

.kt-courier--boxnow {
	background: #84c33f; /* BOX NOW green */
	color: var(--ink);
	font-size: 11px;
}

/* BOX NOW's button and the chosen locker (bx_wp_plugin), in the theme's
   colours: the plugin paints the button with !important, by id */
.kt-checkout .kt-rate #box_now_delivery_button {
	height: 44px;
	margin: -4px 20px 12px 58px;
	padding: 0 20px;
	border: 0;
	border-radius: var(--r-pill);
	background-color: var(--ink) !important;
	color: var(--white) !important;
	font: 700 14px/1 var(--font-body);
	cursor: pointer;
}

.kt-checkout .kt-rate #box_now_delivery_button.disabled {
	background-color: var(--line-2) !important;
	color: var(--muted) !important;
}

.kt-checkout .kt-rate #box_now_selected_locker_details {
	margin-top: 0;
	padding: 12px 14px;
	border-radius: 14px;
	background: var(--soft);
	font-size: 14px;
	line-height: 1.5;
}

.kt-rate .boxnow-locker-label {
	font-weight: 700;
}

.kt-rate .boxnow-locker-name strong,
.kt-rate .boxnow-locker-address strong {
	font-weight: 600;
	color: var(--muted);
}

/* Under the methods, out of the redrawn part (kingtex_checkout_ship_panel()):
   Speedy's fields, moved here from the contact panel by main.js. Speedy
   shows and hides its block (.speedy_hide) with its method. */
.kt-ship-more {
	margin-top: 12px;
	padding: 20px;
	border-radius: 18px;
	background: var(--soft);
}

.kt-ship-more[hidden] {
	display: none;
}

.kt-ship-more #speedy_custom_checkout_field {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.kt-ship-more #speedy_services_errors:empty {
	display: none;
}

.kt-ship-more #speedy_custom_checkout_field > .form-row {
	margin: 0;
	padding: 0;
}

.kt-ship-more .form-row > label {
	display: block;
	margin-bottom: 8px;
}

/* „Изпращане до“: Speedy's three tiles (address, office, automat), in the theme's lines */
.kt-ship-more #speedy_shipping_to_field {
	padding-bottom: 0;
}

.kt-ship-more #speedy_shipping_to_field .woocommerce-input-wrapper {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
}

.kt-ship-more label[for='speedy_shipping_to_OFFICE'],
.kt-ship-more label[for='speedy_shipping_to_APT'],
.kt-ship-more label[for='speedy_shipping_to_ADDRESS'].radio {
	flex: 1 1 140px;
	width: auto;
	height: 56px;
	margin: 0 !important;
	padding: 8px 14px;
	border: 1.5px solid var(--line-2);
	border-radius: 14px;
	background: var(--white);
	font-size: 15px;
	font-weight: 700;
	color: var(--ink);
	justify-content: flex-start;
	gap: 6px;
}

.kt-ship-more input[type='radio']:checked + label[for^='speedy_shipping_to_'] {
	height: 56px;
	border: 2px solid var(--ink) !important;
	background: var(--white);
	justify-content: flex-start;
}

.kt-ship-more label[for^='speedy_shipping_to_']::before {
	flex: none;
	width: 32px;
	height: 32px;
	padding: 0;
	background-size: contain;
	background-position: center;
}

.kt-ship-more input[type='radio']:checked + label[for^='speedy_shipping_to_']::after {
	margin-left: auto;
	padding: 0;
	font-size: 18px;
}

.kt-ship-more label[for^='speedy_shipping_to_'] .required {
	display: none;
}

.kt-ship-more .speedy_office_locator_map,
.kt-ship-more #speedy_offices_map,
.kt-ship-more #speedy_apts_map {
	overflow: hidden;
	border-radius: 14px;
}

.kt-ship-more #speedy_user_checkout_field {
	padding: 14px 16px;
	border-radius: 14px;
	background: var(--white);
	font-size: 14px;
	line-height: 1.6;
}

/* A customer's saved address: the text on the left, the pencil (main.js) on
   its right at the first line, „Услуги“ under both. The pencil's column is
   fixed: on a phone it never goes under the text. */
.kt-ship-more #speedy_user_checkout_field.kt-ship-user {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px;
	gap: 0 12px;
	align-items: start;
	padding-top: 12px;
}

.kt-ship-user > * {
	grid-column: 1;
	min-width: 0;
}

.kt-ship-user > .kt-ship-edit {
	grid-column: 2;
	grid-row: 1;
}

.kt-ship-user > #speedy_destination_services_id_field {
	grid-column: 1 / -1;
}

/* Speedy's rows put the value beside a 120 px label: at 320 px it was a
   letter a line. Label and value run on as one line of text instead. */
.kt-ship-user .speedy-info-content {
	display: block;
}

.kt-ship-user .speedy-info-row {
	display: block;
	padding: 2px 0;
}

.kt-ship-user .speedy-info-row strong {
	min-width: 0;
	margin-right: 4px;
}

.kt-ship-edit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--soft-3);
	color: var(--ink);
	cursor: pointer;
	transition: background 0.2s;
}

.kt-ship-edit:hover {
	background: var(--line);
}

.kt-ship-table,
.kt-ship-table tbody,
.kt-ship-table tr,
.kt-ship-table td {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
}

.kt-rates__empty {
	margin: 0;
	padding: 16px 18px;
	border-radius: 16px;
	background: var(--soft);
	font-size: 14px;
	color: var(--ink-2);
}

.kt-free-line {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 16px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--success);
}

/* Payment: the whole method is the card, its description inside */
.kt-checkout .wc_payment_method.kt-opt {
	border: 1.5px solid var(--line-2);
	border-radius: 18px;
}

.kt-checkout .wc_payment_method.kt-opt:has(.kt-opt__input:checked) {
	border: 2px solid var(--ink);
}

.kt-checkout .wc_payment_method .kt-opt__label,
.kt-checkout .wc_payment_method .kt-opt__input:checked + .kt-opt__label {
	min-height: 0;
	padding: 18px 20px 6px;
	border: 0;
}

.kt-checkout .wc_payment_method .payment_box {
	padding: 0 20px 18px 58px;
	font-size: 13px;
	color: var(--muted);
}

.kt-checkout .wc_payment_method .payment_box p {
	margin: 0;
}

.kt-checkout .wc_payment_method:not(:has(.payment_box)) .kt-opt__label {
	padding-bottom: 18px;
}

/* Terms and the order button */
.kt-checkout .place-order {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 22px;
}

/* The terms as a card (woocommerce/checkout/terms.php, 1.0.9) — the payment
   method's card: the whole card is the place to tap, the tick 26 px.
   Empty / ticked (tinted) / refused by „Поръчай“ (red, WooCommerce's own
   woocommerce-invalid and message) / the keyboard's ring. Until 1.0.9: a
   24 px box and one 14 px line, lost above the button. */
.kt-terms {
	margin: 0;
}

.kt-terms__card {
	position: relative;
	display: flex !important;
	align-items: center;
	gap: 14px;
	margin: 0 !important;
	padding: 16px 18px;
	border: 1.5px solid var(--line-2);
	border-radius: 18px;
	background: var(--white);
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.4;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.kt-terms__card:hover {
	border-color: var(--field-border);
}

/* the box itself stays a real checkbox, under the drawn one (centred, as
   the drawn one is — the checkout's own rule for a label.checkbox) */
.kt-terms__input {
	position: absolute;
	top: 50%;
	left: 18px;
	transform: translateY(-50%);
	width: 26px;
	height: 26px;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.kt-terms__box {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 2px solid var(--field-border);
	border-radius: 8px;
	background: var(--white);
	color: transparent;
	transition: background-color 0.15s, border-color 0.15s;
}

.kt-terms__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.kt-terms__main {
	font-weight: 600;
	color: var(--ink);
}

.kt-terms__sub {
	font-size: 13px;
	line-height: 1.45;
	color: var(--muted);
}

.kt-terms__card a {
	color: var(--ink);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.kt-terms__sub a {
	color: var(--ink-2);
	font-weight: 500;
}

/* ticked: the card takes the payment card's frame, lightly tinted */
.kt-terms__card:has(.kt-terms__input:checked) {
	padding: 15.5px 17.5px;
	border: 2px solid var(--ink);
	background: var(--soft-3);
}

.kt-terms__input:checked + .kt-terms__box {
	border-color: var(--ink);
	background: var(--ink);
	color: var(--white);
}

/* the keyboard's ring, around the whole card */
.kt-terms__card:has(.kt-terms__input:focus-visible) {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

/* refused: „Поръчай“ without the tick */
.kt-terms.woocommerce-invalid .kt-terms__card {
	padding: 15.5px 17.5px;
	border: 2px solid #c62828;
	background: #fff4f5;
}

.kt-terms.woocommerce-invalid .kt-terms__box {
	border-color: #c62828;
}

.kt-checkout .kt-terms .checkout-inline-error-message {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 2px 2px 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #c62828;
}

.kt-checkout .kt-terms .checkout-inline-error-message::before {
	content: "!";
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 999px;
	background: #c62828;
	color: var(--white);
	font-size: 13px;
	font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
	.kt-terms__card,
	.kt-terms__box {
		transition: none;
	}
}

.kt-place {
	width: 100%;
	height: 58px;
	font-size: 17px;
	font-weight: 700;
}

.kt-place[disabled],
.processing .kt-place {
	opacity: 0.6;
}

/* Summary */
.kt-sum {
	display: block;
}

.kt-sum__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
	list-style: none;
}

.kt-sum__head::-webkit-details-marker {
	display: none;
}

.kt-sum__title {
	flex: 1;
	margin: 0;
	font-size: 20px;
	font-weight: 700;
}

.kt-sum-due,
.kt-sum__toggle {
	display: none;
}

.kt-sum-items,
.kt-sum-items tbody {
	display: block;
	width: 100%;
}

.kt-sum-item {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	padding: 8px 0;
}

.kt-sum-item td {
	padding: 0;
	border: 0;
}

.kt-sum-item__thumb {
	position: relative;
}

.kt-sum-item__thumb .focus {
	display: block;
	width: 64px;
	height: 72px;
	border-radius: 14px;
}

.kt-sum-item__qty {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: var(--r-pill);
	background: var(--ink);
	color: var(--white);
	font-size: 12px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.kt-sum-item__name {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.kt-sum-item__meta {
	font-size: 13px;
	font-weight: 400;
	color: var(--muted);
}

.kt-sum-item__price {
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

/* WooCommerce's script hides its coupon form until a link is clicked; here it is always shown. */
.kt-coupon {
	display: flex !important;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0 0;
}

.kt-coupon input {
	flex: 1;
	width: auto;
	min-width: 0;
	height: 48px;
	font-size: 15px;
}

.kt-coupon .btn {
	height: 48px;
}

.coupon-error-notice {
	flex-basis: 100%;
	font-size: 13px;
	color: #c62828;
}

.kt-sum .woocommerce-message,
.kt-sum .woocommerce-error,
.kt-sum .woocommerce-info {
	margin: 14px 0 0;
	font-size: 14px;
}

.kt-sum-totals {
	width: 100%;
	margin-top: 18px;
	border-collapse: collapse;
	border-top: 1px solid var(--line);
	font-size: 15px;
}

.kt-sum-totals th,
.kt-sum-totals td {
	padding: 12px 0 0;
	border: 0;
	vertical-align: baseline;
}

.kt-sum-totals th {
	text-align: left;
	font-weight: 400;
	color: var(--ink-2);
}

.kt-sum-totals td {
	text-align: right;
	color: var(--ink-2);
}

.kt-sum-totals .cart-subtotal td,
.kt-sum-totals .cart-discount td {
	color: var(--ink);
}

.kt-sum-totals .woocommerce-remove-coupon {
	margin-left: 6px;
	font-size: 13px;
	color: var(--muted);
}

.kt-sum-totals .order-total th,
.kt-sum-totals .order-total td {
	padding-top: 16px;
}

.kt-sum-totals .order-total th {
	font-weight: 700;
	color: var(--ink);
}

.kt-sum-totals .order-total td {
	font-size: 26px;
	font-weight: 800;
	color: var(--ink);
}

.kt-sum-totals .order-total small {
	display: block;
	font: 400 12px var(--font-body);
	color: var(--muted);
}

.kt-sum__promises {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 20px 0 0;
	padding: 14px 16px;
	border-radius: 16px;
	background: var(--soft);
	list-style: none;
	font-size: 13px;
	color: var(--ink-2);
}

.kt-sum__promises li {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* WooCommerce's notices above the form (errors after „Поръчай“): each
   line is a link to its field */
.woocommerce-NoticeGroup-checkout {
	margin-bottom: 4px;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error a {
	font-weight: 500;
	text-decoration: none;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error a:hover {
	text-decoration: underline;
}

/* a finger reaches each line: 44 px rows (1.0.9; 20 px until then — the
   audit's refused checkout, dev/responsive-audit.cjs) */
@media (pointer: coarse) {
	.woocommerce-NoticeGroup-checkout .woocommerce-error {
		gap: 0;
		padding-block: 6px;
	}

	/* a block, not flex: flex would drop the space after „<strong>Име</strong>“ */
	.woocommerce-NoticeGroup-checkout .woocommerce-error a {
		display: block;
		min-height: 44px;
		padding-block: 11px;
	}
}

.kt-checkout .woocommerce-form-login,
.woocommerce-form-login-toggle + .woocommerce-form-login {
	padding: 20px;
	border-radius: 20px;
	background: var(--white);
	margin-bottom: 16px;
}

@media (max-width: 960px) {
	.kt-checkout {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	/* The summary on top, folded to one line with the total */
	.kt-checkout__side {
		position: static;
		order: -1;
	}

	.kt-sum[open] .kt-sum__head {
		margin-bottom: 18px;
	}

	.kt-sum:not([open]) .kt-sum__head {
		margin-bottom: 0;
	}

	.kt-sum__head {
		cursor: pointer;
		min-height: 44px;
	}

	.kt-sum__title {
		min-width: 0;
		font-size: 18px;
		white-space: nowrap;
	}

	.kt-sum-due {
		display: inline;
		flex: none;
		font: 800 18px var(--font-display);
		white-space: nowrap;
	}

	.kt-sum__toggle {
		display: inline-flex;
		transition: transform 0.2s;
	}

	.kt-sum[open] .kt-sum__toggle {
		transform: rotate(180deg);
	}
}

/* A phone: the folded line is title, total and arrow; at 320 the title takes two lines */
@media (max-width: 420px) {
	.kt-sum__head {
		gap: 8px;
	}

	.kt-sum__title,
	.kt-sum-due {
		font-size: 16px;
	}

	.kt-sum__title {
		white-space: normal;
	}
}

@media (max-width: 700px) {
	body.woocommerce-checkout .page-body {
		padding-top: 20px;
		padding-bottom: 48px;
	}

	.kt-panel {
		padding: 20px;
		border-radius: 22px;
	}

	.kt-panel__title {
		font-size: 19px;
		margin-bottom: 18px;
	}

	.kt-step {
		width: 26px;
		height: 26px;
		font-size: 13px;
	}

	.kt-checkout #billing_phone_field,
	.kt-checkout #billing_email_field,
	.kt-checkout .woo-bg-company-info {
		grid-column: 1 / -1;
	}

	.kt-opt__label {
		gap: 12px;
		padding: 14px 16px;
	}

	.kt-opt__input:checked + .kt-opt__label {
		padding: 13.5px 15.5px;
	}

	.kt-opt__input {
		top: 24px;
		left: 18px;
	}

	.kt-rate > .kt-opt__label,
	.kt-rate > .kt-opt__input:checked + .kt-opt__label {
		padding: 14px 16px;
	}

	.kt-rate > :not(.kt-opt__input):not(.kt-opt__label),
	.kt-checkout .kt-rate #box_now_delivery_button {
		margin: -2px 16px 14px;
	}

	.kt-courier {
		width: 52px;
		height: 28px;
	}

	.kt-courier--speedy {
		font-size: 12px;
	}

	.kt-courier--boxnow {
		font-size: 9px;
	}

	.kt-ship-more {
		padding: 16px;
	}

	/* A courier's card on a phone: the mark and the name on one line, the line under them */
	#shipping_method .kt-rate > .kt-opt__label {
		gap: 12px;
	}

	#shipping_method .kt-rate:has(.kt-courier) > .kt-opt__label {
		display: grid;
		grid-template-columns: 22px auto 1fr auto;
		align-items: center;
		gap: 4px 10px;
	}

	.kt-rate:has(.kt-courier) > .kt-opt__label::before {
		grid-row: 1 / span 2;
	}

	.kt-rate:has(.kt-courier) > .kt-opt__label > .kt-opt__text {
		display: contents;
	}

	.kt-rate:has(.kt-courier) .kt-courier {
		grid-column: 2;
		grid-row: 1;
	}

	.kt-rate:has(.kt-courier) .kt-opt__name {
		grid-column: 3;
		grid-row: 1;
	}

	.kt-rate:has(.kt-courier) .kt-opt__price {
		grid-column: 4;
		grid-row: 1;
	}

	.kt-rate:has(.kt-courier) .kt-opt__note {
		grid-column: 2 / -1;
		grid-row: 2;
	}

	.kt-ship-more #speedy_shipping_to_field .woocommerce-input-wrapper {
		flex-direction: column;
	}

	.kt-ship-more label[for='speedy_shipping_to_OFFICE'],
	.kt-ship-more label[for='speedy_shipping_to_APT'],
	.kt-ship-more label[for='speedy_shipping_to_ADDRESS'].radio,
	.kt-ship-more input[type='radio']:checked + label[for^='speedy_shipping_to_'] {
		flex: none;
		width: 100%;
		height: 52px;
	}

	.kt-checkout .wc_payment_method .payment_box {
		padding: 0 16px 16px 50px;
	}

	.kt-checkout .wc_payment_method .kt-opt__label,
	.kt-checkout .wc_payment_method .kt-opt__input:checked + .kt-opt__label {
		padding: 16px 16px 6px;
	}
}

/* „Поръчката е приета“ (woocommerce/checkout/thankyou.php) */
.kt-thanks {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 820px;
	margin: 0 auto;
}

.kt-thanks__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.kt-thanks__icon {
	width: 64px;
	height: 64px;
	border-radius: var(--r-pill);
	background: var(--tint-mint);
	color: var(--success);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.kt-thanks__title {
	margin: 6px 0 0;
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 800;
	line-height: 1.1;
}

.kt-thanks .woocommerce-thankyou-order-received,
.kt-thanks__lead {
	margin: 0;
	font-size: 16px;
	color: var(--ink-2);
}

.kt-thanks__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	width: 100%;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.kt-thanks__facts li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	border-radius: 16px;
	background: var(--soft);
	font-size: 13px;
	color: var(--muted);
}

.kt-thanks__facts strong {
	font-size: 16px;
	color: var(--ink);
}

/* The payment's own words (1.2.2, thankyou.php): a short line under the
   payment in its tile („Плащане в брой или с карта при доставка.“), anything
   bigger under the tiles in the same card */
.kt-thanks__pay-note {
	font-size: 13px;
	line-height: 1.45;
	color: var(--muted);
}

.kt-thanks__pay {
	width: 100%;
	margin-top: 4px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--ink-2);
}

.kt-thanks__pay > :first-child {
	margin-top: 0;
}

.kt-thanks__pay > :last-child {
	margin-bottom: 0;
}

/* Speedy's box under „Адрес за доставка“ (h3#speedy-title-text „SPEEDY“ and
   table.speedy-table — the town, the postcode, the office, the price): the
   address again, in no card. Its plugin's PHP is not public, so its hook is
   unknown and it is hidden here; on „Благодарим“ and in „Моят профил“ (1.2.2). */
.kt-thanks #speedy-title-text,
.kt-thanks .speedy-table,
.kt-order-view #speedy-title-text,
.kt-order-view .speedy-table {
	display: none !important;
}

/* A payment method's own note on a failed order (as WooCommerce prints it) */
.kt-thanks__more > p {
	margin: 0 0 16px;
	padding: 16px 20px;
	border-radius: 20px;
	background: var(--white);
	font-size: 15px;
}

/* WooCommerce's order details and addresses */
.kt-thanks__more > section,
.kt-thanks__more .woocommerce-order-details,
.kt-thanks__more .woocommerce-customer-details {
	margin: 0 0 16px;
	padding: 28px;
	border-radius: 28px;
	background: var(--white);
}

.kt-thanks__more h2 {
	margin: 0 0 16px;
	font: 700 20px var(--font-display);
}

.kt-thanks__more table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.kt-thanks__more th,
.kt-thanks__more td {
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.kt-thanks__more tfoot th {
	font-weight: 400;
	color: var(--ink-2);
}

.kt-thanks__more td:last-child,
.kt-thanks__more th:last-child {
	text-align: right;
}

.kt-thanks__more tfoot tr:last-child th,
.kt-thanks__more tfoot tr:last-child td {
	border-bottom: 0;
	font-weight: 800;
	color: var(--ink);
}

.kt-thanks__more address {
	font-style: normal;
	line-height: 1.6;
}

.kt-thanks__more .woocommerce-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
}

.kt-thanks__back {
	margin: 0;
}

@media (max-width: 700px) {
	.kt-thanks__more > section,
	.kt-thanks__more .woocommerce-order-details,
	.kt-thanks__more .woocommerce-customer-details {
		padding: 20px;
		border-radius: 22px;
	}
}

@media (pointer: coarse) {
	.kt-sum__head {
		min-height: 44px;
	}

	/* Speedy's office map (OpenLayers): its + and − */
	.kt-checkout .ol-control button {
		width: 44px;
		height: 44px;
		font-size: 22px;
	}

	.checkout-help a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
	}
}

