/**
 * Revita Classic: WooCommerce cart, checkout, order received, My account and the mini-cart drawer
 * (owner WB). Classic-only rules: the templates in woocommerce/{cart,checkout,myaccount,order,notices}
 * print site-next's WooCommerce block markup around WooCommerce 5.1's classic forms, so the design
 * CSS (blocks/woocommerce-{cart,checkout,mini-cart,order-confirmation-status}.css over the vendored
 * WooCommerce block CSS) applies unchanged; this file covers what is left:
 *   1. WooCommerce 5.1's own CSS (woocommerce-layout, -smallscreen, -general load on every page and
 *      style the classic class names the templates keep for its scripts) turned back to the design;
 *   2. pieces that exist only in the classic markup (the drawer's fragment wrapper, the cart's coupon
 *      and update controls, the shipping calculator, WooCommerce's password eye, the classic notices
 *      printed by scripts, the account pages, which site-next renders with classic markup too).
 * Loaded on every page while WooCommerce is active (the drawer is site-wide), after the theme CSS.
 *
 * @package Revita_Classic
 */

/* ==========================================================================
   1. Shared
   ========================================================================== */

/* Fields in error: WooCommerce's block red, as site-next's checkout draws its invalid fields (labels and
 * borders; finding RVS-10). The design's rose stays for the required asterisks. */
:root { --revita-wc-error: #cc1818; }

/* Classic WooCommerce buttons inside the cart, checkout and account pages take the design's element
 * button (honey pill), which WooCommerce 5.1's .woocommerce a.button rules would otherwise paint grey
 * or WooCommerce purple. Outline variants are set per place below. */
:root :is(.woocommerce, .woocommerce-page) :is(a, button, input).button:is(.wp-element-button, .revita-button),
:root .woocommerce-account .woocommerce :is(a, button, input).button,
:root .woocommerce-checkout .woocommerce :is(a, button, input).button,
:root .woocommerce-cart .woocommerce :is(a, button, input).button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.9em 1.7em;
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary-deep);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
}

:root :is(.woocommerce, .woocommerce-page) :is(a, button, input).button:is(.wp-element-button, .revita-button):hover,
:root .woocommerce-account .woocommerce :is(a, button, input).button:hover,
:root .woocommerce-checkout .woocommerce :is(a, button, input).button:hover,
:root .woocommerce-cart .woocommerce :is(a, button, input).button:hover {
	background-color: var(--wp--preset--color--accent-deep);
	color: var(--wp--preset--color--primary-deep);
}

:root :is(.woocommerce, .woocommerce-page) :is(a, button, input).button:is(.wp-element-button, .revita-button):focus-visible,
:root .woocommerce-account .woocommerce :is(a, button, input).button:focus-visible,
:root .woocommerce-checkout .woocommerce :is(a, button, input).button:focus-visible,
:root .woocommerce-cart .woocommerce :is(a, button, input).button:focus-visible {
	outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep));
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--revita-focus-ring, var(--wp--preset--color--base));
}

:root :is(.woocommerce, .woocommerce-page) :is(a, button, input).button:is(:disabled, .disabled, [aria-disabled="true"]) {
	opacity: 0.5;
	cursor: default;
}

/* A secondary (outline) classic button. */
:root :is(.woocommerce, .woocommerce-page) :is(a, button, input).button.revita-button--outline {
	background-color: transparent;
	color: var(--wp--preset--color--primary-deep);
	box-shadow: inset 0 0 0 1.5px currentColor;
}

:root :is(.woocommerce, .woocommerce-page) :is(a, button, input).button.revita-button--outline:hover:not(:disabled) { background-color: var(--wp--preset--color--lavender); }

/* WooCommerce's remove links (a.remove) are red bold crosses in WooCommerce 5.1; the cart and the
 * drawer print the design's bin icon in them. */
:root a.remove.wc-block-cart-item__remove-link {
	display: block;
	box-sizing: border-box;
	inline-size: auto;
	block-size: auto;
	border-radius: 0;
	background: transparent !important;
	color: var(--wp--preset--color--contrast) !important;
	font-size: inherit;
	font-weight: inherit;
	line-height: 0;
	text-align: start;
}

:root a.remove.wc-block-cart-item__remove-link:hover { background: transparent !important; color: var(--wp--preset--color--rose) !important; }
:root a.remove.wc-block-cart-item__remove-link svg { fill: currentColor; }

/* The quantity stepper around WooCommerce's quantity field (its div.quantity and hidden label sit
 * between the buttons): the number field's own spinners are hidden, as in the block stepper. */
.revita-qty > .quantity { display: contents; }
.revita-qty input[type="number"] { -moz-appearance: textfield; appearance: textfield; text-align: center; border: 0; background: transparent; box-shadow: none; }
.revita-qty input[type="number"]::-webkit-inner-spin-button,
.revita-qty input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
:root .woocommerce .revita-qty .quantity .qty { width: 2.75rem; }
.revita-qty input[type="number"]:focus { outline: 0; }

/* The cart's and the drawer's − and + keep the browser's button font, as on site-next (the product
 * page's stepper rule in classic/wc-catalog.css sets the theme font on every stepper button). */
body :is(.wc-block-cart, .wc-block-mini-cart__drawer) .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button { font-family: revert; line-height: revert; }

/* WooCommerce's blockUI overlay while an update runs: the surface colour, not white on lavender. */
:is(.wc-block-cart, .wc-block-checkout, .wc-block-mini-cart__drawer) .blockUI.blockOverlay { border-radius: inherit; background: color-mix(in srgb, var(--wp--preset--color--base) 70%, transparent) !important; }

/* ==========================================================================
   2. Mini-cart drawer (inc/wc-cart.php revita_cart_drawer(), woocommerce/cart/mini-cart.php)
   ========================================================================== */

/* The header cart's count: 12px, not the design's 0.7rem (11.2px, blocks/woocommerce-mini-cart.css), the
 * only text under 12px on any page (finding a11y-RA-B6; the badge grows with it, 16px instead of 15). */
:root .wc-block-mini-cart .wc-block-mini-cart__badge { font-size: 0.75rem; }

/* WooCommerce's fragment wrapper sits between the drawer contents and the filled/empty blocks; it
 * passes the full height on, so the footer stays at the bottom as on site-next. */
.wc-block-mini-cart__drawer .widget_shopping_cart_content { box-sizing: border-box; block-size: 100%; }

@media screen and (max-height: 500px) {
	.wc-block-mini-cart__drawer .widget_shopping_cart_content { block-size: auto; }
}

/* The items table lays out as WooCommerce's block table (vendor/wc-blocks/mini-cart-contents.css). */
.wc-block-mini-cart__drawer .wc-block-cart-items__row.is-updating { opacity: 0.6; }
.wc-block-mini-cart__drawer .revita-mini-cart-qty { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); }
.wc-block-mini-cart__drawer .wc-block-components-product-metadata p { margin: 0; }

/* The empty state's button: the honey pill (site-next's mini-cart shopping button). */
.wc-block-mini-cart__drawer .wc-block-mini-cart__shopping-button { display: inline-flex; }

/* Loading: a guest's page prints the drawer empty (inc/wc-cart.php revita_cart_render_visitor_cart());
 * opened before cart-fragments.js filled it, the drawer shows this neutral spinner (assets/js/cart-drawer.js),
 * never the empty-cart text. The fragment replaces it. Reduced motion: the global reset (global.css)
 * stops the turn, the ring stays. */
.wc-block-mini-cart__drawer .revita-mini-cart-loading { display: grid; place-items: center; box-sizing: border-box; min-block-size: 12rem; block-size: 100%; padding: var(--wp--preset--spacing--40); }
.wc-block-mini-cart__drawer .revita-mini-cart-loading__spinner { display: block; inline-size: 2.5rem; block-size: 2.5rem; box-sizing: border-box; border: 3px solid var(--wp--preset--color--lavender); border-block-start-color: var(--wp--preset--color--primary); border-radius: 50%; animation: revita-cart-spin 0.8s linear infinite; }

@keyframes revita-cart-spin {
	to { transform: rotate(360deg); }
}

/* ==========================================================================
   3. Cart (template-parts/pages/cart.php, woocommerce/cart/*)
   ========================================================================== */

.revita-cart-page .wp-block-woocommerce-cart { margin-block-start: var(--wp--preset--spacing--50); }
.revita-cart-page .wp-block-woocommerce-cart > .woocommerce > .woocommerce-notices-wrapper:empty { display: none; }
.revita-cart-page .wc-block-store-notices:has(.woocommerce-notices-wrapper:empty) { display: none; }

/* The classic table keeps its WooCommerce classes; WooCommerce 5.1 must not paint it. */
.wc-block-cart table.wc-block-cart-items { inline-size: 100%; margin: 0; border-radius: 0; }
.wc-block-cart table.wc-block-cart-items caption { caption-side: top; }
.wc-block-cart table.wc-block-cart-items :is(th, td) { background: transparent; }
.wc-block-cart .wc-block-components-product-metadata p { margin: 0; }
.wc-block-cart .wc-block-cart-item__quantity .product-remove { display: inline-flex; }

/* "Update cart" under the items: kept for visitors without JavaScript (the field changes apply at once
 * otherwise, assets/js/cart-drawer.js marks the form revita-cart-auto), as the design has no button. */
.wc-block-cart table.wc-block-cart-items tr.revita-cart-actions-row td.actions { padding: 0; border-block-start: 1px solid var(--wp--preset--color--border); text-align: start; }

.wc-block-cart .revita-cart-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: flex-end;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--30) 0;
}

/* Stronger than section 1's classic button rule (display: inline-flex), so the button stays hidden
 * even when a plugin prints into woocommerce_cart_actions and the row below shows. */
:root .woocommerce-cart .woocommerce .woocommerce-cart-form.revita-cart-auto button.revita-cart-update { display: none; }
/* Nothing else in the row (WooCommerce's woocommerce_cart_actions printed nothing): no empty strip. */
.woocommerce-cart-form.revita-cart-auto tr.revita-cart-actions-row:not(:has(.revita-cart-actions > :not(.revita-cart-update, input[type="hidden"], script, style))) { display: none; }

/* Coupon panel in the totals card (inc/wc-cart.php revita_cart_coupon_panel(): site-next's panel,
 * a details element instead of WooCommerce's scripted div, the same look). */
/* A summary is a list item: block, as the design's div (its touch rule makes it a 44px flex row, so lower weight here). */
:where(.wc-block-cart .revita-cart-coupon) > summary { display: block; }
.wc-block-cart .revita-cart-coupon > summary.wc-block-components-panel__button { list-style: none; cursor: pointer; }
.wc-block-cart .revita-cart-coupon > summary::-webkit-details-marker { display: none; }
.wc-block-cart .revita-cart-coupon > summary::marker { content: ""; }
/* Open: the chevron points up and stays centred on the text (WooCommerce centres it with translateY(-50%),
 * which a rotate alone dropped: 12px low, over "Примени"), and the field starts 16px below the toggle,
 * as WooCommerce's [aria-expanded=true] button (a summary has no aria-expanded): finding RVS-1. */
.wc-block-cart .revita-cart-coupon[open] > summary .wc-block-components-panel__button-icon { transform: translateY(-50%) rotate(180deg); }
.wc-block-cart .revita-cart-coupon[open] > summary.wc-block-components-panel__button { margin-block-end: 16px; }
.wc-block-cart .revita-cart-coupon > summary:focus-visible { outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep)); outline-offset: 3px; border-radius: var(--wp--custom--radius--xs); }
.wc-block-cart .revita-cart-coupon .wc-block-components-totals-coupon__form .wc-block-components-text-input { flex: 1 1 8rem; }
.wc-block-cart .revita-cart-coupon .wc-block-components-totals-coupon__button { flex: 0 0 auto; }
/* A refused code's notice, moved into the panel above the field (assets/js/cart-drawer.js). */
:root .wc-block-cart .revita-cart-coupon .wc-block-components-totals-coupon__content > .wc-block-components-notice-banner { margin: 0.75rem 0; }

:root .woocommerce-cart .wc-block-cart button.button.revita-cart-update {
	background-color: transparent;
	color: var(--wp--preset--color--primary-deep);
	box-shadow: inset 0 0 0 1.5px currentColor;
}

:root .woocommerce-cart .wc-block-cart button.button.revita-cart-update:hover:not(:disabled) { background-color: var(--wp--preset--color--lavender); }

/* Totals card: WooCommerce 5.1's cart_totals and proceed-button rules undone. */
.wc-block-cart .cart_totals { float: none; inline-size: auto; }
:root .woocommerce-cart .wc-block-cart .wc-proceed-to-checkout { padding: 0; }
:root .woocommerce-cart .wc-block-cart .wc-proceed-to-checkout a.checkout-button.wc-block-cart__submit-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 100%;
	min-block-size: 3.25rem;
	margin: 0;
	padding: 0.9em 1.7em;
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary-deep);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

:root .woocommerce-cart .wc-block-cart .wc-proceed-to-checkout a.checkout-button.wc-block-cart__submit-button:hover { background-color: var(--wp--preset--color--accent-deep); box-shadow: var(--wp--preset--shadow--glow); }
:root .woocommerce-cart .wc-block-cart .wc-proceed-to-checkout a.checkout-button.wc-block-cart__submit-button:focus-visible { outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep)); outline-offset: 3px; box-shadow: 0 0 0 3px var(--revita-focus-ring, var(--wp--preset--color--base)); }

.wc-block-cart .wc-block-components-totals-footer-item-tax-value strong { font-weight: inherit; }
.wc-block-cart .wc-block-components-totals-item__value .woocommerce-Price-amount { white-space: nowrap; }
.wc-block-cart .woocommerce-shipping-destination,
.wc-block-cart .revita-shipping-message { flex: 0 0 100%; margin: 0.5rem 0 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); line-height: 1.5; }

/* The shipping calculator (WooCommerce setting "shipping calculator on the cart"). */
.wc-block-cart .woocommerce-shipping-calculator { margin: 0.35rem 0 0; font-size: var(--wp--preset--font-size--x-small); }
.wc-block-cart .woocommerce-shipping-calculator .shipping-calculator-button { color: var(--wp--preset--color--primary); font-weight: 600; }
.wc-block-cart .woocommerce-shipping-calculator .shipping-calculator-button::after { content: none; }
.wc-block-cart .shipping-calculator-form { margin: 0.75rem 0 0; }
.wc-block-cart .shipping-calculator-form .form-row { margin: 0 0 0.6rem; padding: 0; }
.wc-block-cart .shipping-calculator-form :is(input.input-text, select) { box-sizing: border-box; inline-size: 100%; min-block-size: 2.75rem; padding: 0.5em 0.85em; border: 1.5px solid var(--revita-wc-field); border-radius: var(--wp--custom--radius--sm); background: var(--wp--preset--color--base); font-size: max(1rem, 1em); }
/* The calculator's country (and a state list) is WooCommerce's selectWoo box, not the select: the same
 * 44px design field as the calculator's other fields, not select2's 28px grey box (finding RVS-7). */
.wc-block-cart .shipping-calculator-form .select2-container .select2-selection--single { box-sizing: border-box; display: flex; align-items: center; block-size: 2.75rem; border: 1.5px solid var(--revita-wc-field); border-radius: var(--wp--custom--radius--sm); background: var(--wp--preset--color--base); }
.wc-block-cart .shipping-calculator-form .select2-container .select2-selection--single .select2-selection__rendered { padding: 0 2.5rem 0 0.85em; color: var(--wp--preset--color--contrast); font-size: max(1rem, 1em); line-height: 1.4; }
.wc-block-cart .shipping-calculator-form .select2-container .select2-selection--single .select2-selection__arrow { inset-block: 0; block-size: auto; inset-inline-end: 0.75rem; }
/* The 44px box sizes its row: select2's box stayed 40px tall, so the field overflowed it by 4px (a 6px gap
 * to the next field instead of 10px, the arrow 1.5px high; re-check RC-V-1). WooCommerce 5.1 prints the id. */
.wc-block-cart .shipping-calculator-form .select2-container { display: block; height: auto; }
.wc-block-cart .shipping-calculator-form #calc_shipping_country_field { min-block-size: 2.75rem; }
.wc-block-cart .shipping-calculator-form .select2-container--focus .select2-selection--single,
.wc-block-cart .shipping-calculator-form .select2-container--open .select2-selection--single { border-color: var(--wp--preset--color--primary-deep); outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep)); outline-offset: 3px; }

/* Radio choices when the cart offers two rates (free delivery from 1,500 ден, flat rate below). */
.wc-block-cart .wc-block-components-shipping-rates-control { display: grid; gap: 0.5rem; margin-block: 0.5rem 0; }

/* The free delivery note under "Продолжи кон наплата" (the drawer's note, blocks/woocommerce-mini-cart.css). */
.wc-block-cart .revita-mini-cart-note {
	display: flex;
	box-sizing: border-box;
	inline-size: 100%;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	margin: var(--wp--preset--spacing--20) 0 0;
	padding: 0.55em 1em;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--primary-deep);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-align: center;
}

.wc-block-cart .revita-mini-cart-note::before {
	content: "";
	flex: none;
	width: 1.3em;
	height: 1.3em;
	background: var(--wp--preset--color--primary);
	-webkit-mask: url(../../images/icons/truck.svg) center / contain no-repeat;
	mask: url(../../images/icons/truck.svg) center / contain no-repeat;
}

/* Empty cart: site-next's product collection starts with an (empty) notices block, so the list gets
 * the flow gap above it. */
.wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-collection > .wc-block-product-template:first-child { margin-block-start: var(--wp--style--block-gap, 24px); }

/* Phones: the bar with "Продолжи кон наплата" that WooCommerce's block cart keeps at the bottom of the
 * screen while the totals card's button is below it (assets/js/cart-drawer.js adds and removes it;
 * blocks/woocommerce-cart.css and vendor/wc-blocks/cart.css style it). */
:root .wc-block-cart .wc-block-cart__submit-container--sticky a.wc-block-cart__submit-button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; text-decoration: none; }

/* ==========================================================================
   4. Checkout (template-parts/pages/checkout.php, woocommerce/checkout/*)
   ========================================================================== */

/* The classic column wrappers (#customer_details .col-1/.col-2) hold the step cards one under the other. */
:root .wc-block-checkout #customer_details { inline-size: auto; }
:root .wc-block-checkout #customer_details :is(.col-1, .col-2) { float: none; inline-size: auto; }
.wc-block-checkout #customer_details::before,
.wc-block-checkout #customer_details::after { content: none; }
.wc-block-checkout .revita-step-empty { display: none; }
.wc-block-checkout .wc-block-components-checkout-step { min-inline-size: 0; }
.wc-block-checkout .wc-block-components-checkout-step > legend.screen-reader-text { float: none; }
.wc-block-checkout .wc-block-components-checkout-step__title { margin: 0; }

/* "Најави се" in the first step's heading (site-next); the login form opens above the steps. */
.wc-block-checkout .revita-checkout-login:has(form.login:not([style*="none"])) { margin: 0 0 var(--wp--preset--spacing--30); }
:root .wc-block-checkout form.woocommerce-form-login.login { margin: 0; padding: var(--wp--preset--spacing--40); border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius--lg); background: var(--wp--preset--color--base); box-shadow: var(--wp--preset--shadow--soft); }
:root .wc-block-checkout form.woocommerce-form-login .form-row:is(.form-row-first, .form-row-last) { float: none; inline-size: auto; }
:root .wc-block-checkout form.woocommerce-form-login > :first-child { margin-block-start: 0; }
:root .wc-block-checkout form.woocommerce-form-login > :is(p, .form-row) + :is(p, .form-row) { margin-block-start: 12px; }
:root .wc-block-checkout form.woocommerce-form-login .woocommerce-form-login__submit { margin-inline-end: 1rem; }

/* A coupon notice in the order summary card (checkout.js prints it above the coupon form). */
.wc-block-checkout .wc-block-components-checkout-order-summary__content > :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) { margin: 0 16px 16px; }

/* Fields: WooCommerce 5.1's floated rows in the block checkout's address-form grid (first and last
 * name side by side, the rest full width, 12px apart). The text fields carry WooCommerce's block
 * text-input class (inc/wc-cart.php revita_checkout_field_args()): their label sits inside the field
 * and moves up while it is focused or filled, as on site-next. The country, notes and checkbox rows
 * keep their label above the field. */
.wc-block-checkout :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper, div.create-account) {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

:root .wc-block-checkout form .form-row { flex: 1 1 100%; float: none; inline-size: auto; margin: 0; padding: 0; }
:root .wc-block-checkout form .form-row:is(.form-row-first, .form-row-last) { flex: 1 1 calc(50% - 12px); }
.wc-block-checkout:is(.is-mobile, .is-small) form .form-row:is(.form-row-first, .form-row-last) { flex-basis: 100%; }
.wc-block-checkout .create-account .clear { display: none; }
:root .wc-block-checkout form .form-row:not(.wc-block-components-text-input) label { margin: 0 0 0.35rem; color: var(--wp--preset--color--contrast); font-size: var(--wp--preset--font-size--small); line-height: 1.5; }
:root .wc-block-checkout form .form-row :is(.required, abbr.required) { border: 0; color: var(--wp--preset--color--rose); font-weight: 700; text-decoration: none; visibility: visible; }

/* Floating-label fields: WooCommerce 5.1's wrapper span is inline; the placeholder (Checkout Field
 * Editor) shows only while the label sits at the top, as the label stands in for it before. */
.wc-block-checkout .form-row.wc-block-components-text-input > .woocommerce-input-wrapper { display: block; }
/* The block field's type metrics (WooCommerce 5.1's form-row label line-height 2 and the design's
 * classic 1em field text would otherwise win). */
:root .wc-block-checkout form .form-row.wc-block-components-text-input > label { display: block; font-size: 16px; line-height: 22px; }
/* The label lies over the field: above WooCommerce's password wrapper too (span.password-input is
 * position: relative and comes later, so it covered "Креирај лозинка на сметката"); clicks go to the field. */
:root .wc-block-checkout form .form-row.wc-block-components-text-input > label { z-index: 1; pointer-events: none; }
:root .wc-block-checkout form .form-row.wc-block-components-text-input input.input-text { font-size: 16px; line-height: 25px; }
.wc-block-checkout .form-row.wc-block-components-text-input:not(.is-active) > label:not(.screen-reader-text) ~ .woocommerce-input-wrapper input::placeholder { color: transparent; }
/* A long placeholder without a label (the Checkout Field Editor's second address line) ends in an
 * ellipsis on phones instead of being cut mid-word. */
.wc-block-checkout form .form-row input.input-text { text-overflow: ellipsis; }
.wc-block-checkout .form-row.wc-block-components-text-input > label .optional { font-weight: inherit; }
.wc-block-checkout .form-row.wc-block-components-text-input.woocommerce-invalid > label { color: var(--revita-wc-error); }
.wc-block-checkout .form-row.wc-block-components-text-input.woocommerce-invalid input.input-text { border-color: var(--revita-wc-error); }

/* The country field (selectWoo) as the block checkout's select: its label small at the top inside
 * the 50px box, the value under it. */
.wc-block-checkout form .form-row:is(#billing_country_field, #shipping_country_field) { position: relative; }
:root .wc-block-checkout form .form-row:is(#billing_country_field, #shipping_country_field) > label:not(.screen-reader-text) { position: absolute; inset-block-start: 5px; inset-inline-start: calc(12px + 1.5px); z-index: 1; max-inline-size: calc(100% - 3.5rem); margin: 0; overflow: hidden; font-size: 0.875rem; line-height: 22px; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
:root .wc-block-checkout form .form-row:is(#billing_country_field, #shipping_country_field) .select2-container .select2-selection--single { align-items: flex-end; }
:root .wc-block-checkout form .form-row:is(#billing_country_field, #shipping_country_field) .select2-container .select2-selection--single .select2-selection__rendered { padding-block-end: 4px; padding-inline-start: 12px; line-height: 22px; }
/* The block select's chevron instead of select2's triangle. */
:root .wc-block-checkout form .form-row:is(#billing_country_field, #shipping_country_field) .select2-container .select2-selection--single .select2-selection__arrow { inset-block: 50% auto; inset-inline-end: 12px; inline-size: 24px; block-size: 24px; background: var(--wp--preset--color--contrast); transform: translateY(-50%) rotate(90deg); -webkit-mask: url(../../images/icons/chevron-right.svg) center / 18px no-repeat; mask: url(../../images/icons/chevron-right.svg) center / 18px no-repeat; }
:root .wc-block-checkout form .form-row:is(#billing_country_field, #shipping_country_field) .select2-container .select2-selection--single .select2-selection__arrow b { display: none; }

:root .wc-block-checkout form .form-row:not(.wc-block-components-text-input) :is(input.input-text, textarea) {
	box-sizing: border-box;
	inline-size: 100%;
	min-block-size: 3.125rem;
	padding: 0.85rem 1.1rem;
	border: 1.5px solid var(--revita-wc-field);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: max(1rem, 1em);
	line-height: 1.4;
}

:root .wc-block-checkout form .form-row textarea { min-block-size: 7em; }
:root .wc-block-checkout form .form-row:not(.wc-block-components-text-input) :is(input.input-text, textarea):focus { border-color: var(--wp--preset--color--primary-deep); outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep)); outline-offset: 3px; box-shadow: 0 0 0 3px var(--revita-focus-ring, var(--wp--preset--color--base)); }
:root .wc-block-checkout form .form-row.woocommerce-invalid label { color: var(--revita-wc-error); }
:root .wc-block-checkout form .form-row.woocommerce-invalid :is(input.input-text, textarea, select, .select2-selection) { border-color: var(--revita-wc-error); }
:root .wc-block-checkout form .form-row.woocommerce-validated :is(input.input-text, textarea, select, .select2-selection) { border-color: var(--revita-wc-field); }

/* Country select (selectWoo/select2 on WooCommerce's select). */
:root .wc-block-checkout form .form-row select { min-block-size: 3.125rem; padding: 0.6rem 1.1rem; border: 1.5px solid var(--revita-wc-field); border-radius: var(--wp--custom--radius--sm); background-color: var(--wp--preset--color--base); }
.wc-block-checkout .select2-container .select2-selection--single { box-sizing: border-box; display: flex; align-items: center; block-size: 3.125rem; border: 1.5px solid var(--revita-wc-field); border-radius: var(--wp--custom--radius--sm); background: var(--wp--preset--color--base); }
.wc-block-checkout .select2-container .select2-selection--single .select2-selection__rendered { padding: 0 2.5rem 0 1.1rem; color: var(--wp--preset--color--contrast); font-size: max(1rem, 1em); line-height: 1.4; }
.wc-block-checkout .select2-container .select2-selection--single .select2-selection__arrow { inset-block: 0; block-size: auto; inset-inline-end: 0.75rem; }
.wc-block-checkout .select2-container--focus .select2-selection--single,
.wc-block-checkout .select2-container--open .select2-selection--single { border-color: var(--wp--preset--color--primary-deep); outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep)); outline-offset: 3px; }
.select2-container .select2-dropdown { border-color: var(--revita-wc-field); border-radius: var(--wp--custom--radius--sm); overflow: hidden; }
.select2-container .select2-results__option--highlighted[aria-selected],
.select2-container .select2-results__option--highlighted[data-selected] { background-color: var(--wp--preset--color--primary); }

/* Checkboxes (create account, ship to a different address): the design's 24px box. WooCommerce 5.1
 * sets .input-checkbox inline, which collapses the box. Box and words 12px apart in both, as on
 * site-next (the gap does it; the box's and the words' own margins are reset). */
:root .wc-block-checkout form .form-row .woocommerce-form__input-checkbox[type="checkbox"] { display: inline-grid; margin: 0; }
:root .wc-block-checkout form :is(.form-row, .revita-ship-different) label.checkbox { display: inline-flex; align-items: center; gap: 12px; min-block-size: 2.75rem; margin: 0; cursor: pointer; font-size: var(--wp--preset--font-size--small); }
:root .wc-block-checkout form :is(.form-row, .revita-ship-different) label.woocommerce-form__label-for-checkbox > :is(input[type="checkbox"], span) { margin: 0; padding: 0; }
/* Every checkbox label of the checkout's forms keeps that 12px gap, also the login form's "Запомни ме"
 * (no .checkbox class); the terms checkbox keeps its text and the required asterisk together (its
 * no-break space and asterisk are flex items too): the gap there is the box's own margin (WB-re-N1). */
:root .wc-block-checkout form .form-row label.woocommerce-form__label-for-checkbox { display: inline-flex; align-items: center; gap: 12px; }
:root .wc-block-checkout form .woocommerce-terms-and-conditions-wrapper .form-row label.checkbox { gap: 0; }
:root .wc-block-checkout form .woocommerce-terms-and-conditions-wrapper .form-row label.woocommerce-form__label-for-checkbox > input[type="checkbox"] { margin-inline-end: 12px; }
.wc-block-checkout .revita-ship-different { margin: 0 0 var(--wp--preset--spacing--20); }
.wc-block-checkout .shipping_address { margin-block-end: var(--wp--preset--spacing--30); }
.wc-block-checkout .woocommerce-additional-fields > h3 { margin: var(--wp--preset--spacing--30) 0 var(--wp--preset--spacing--20); font-size: var(--wp--preset--font-size--medium); }

/* Shipping options and payment methods: WooCommerce block radio cards. */
.wc-block-checkout .revita-shipping-options .wc-block-components-shipping-rates-control { margin: 0; }
.wc-block-checkout .revita-shipping-message { margin: 0; color: var(--wp--preset--color--muted); }
:root .woocommerce-checkout #payment { border-radius: 0; background: transparent; }
:root .woocommerce-checkout #payment ul.payment_methods { margin: 0; padding: 0; border: 0; }
:root .woocommerce-checkout #payment ul.payment_methods li { display: block; margin: 0; line-height: inherit; list-style: none; }
:root .woocommerce-checkout #payment ul.payment_methods li input.wc-block-components-radio-control__input { display: block !important; margin: 0; }
:root .woocommerce-checkout #payment div.payment_box { margin: 0; padding: 0 16px 16px; border-radius: 0; background: transparent; color: inherit; font-size: var(--wp--preset--font-size--small); line-height: 1.4; }
:root .woocommerce-checkout #payment div.payment_box::before { content: none; }
:root .woocommerce-checkout #payment div.payment_box p { margin: 0; line-height: inherit; }
:root .woocommerce-checkout #payment div.payment_box p + p { margin-block-start: 0.5em; }
:root .woocommerce-checkout #payment div.form-row { padding: 0; }

/* WooCommerce's payment choices are list items (checkout.js and gateways expect them); the block CSS
 * draws the separators of div options, so the same for these. */
.wc-block-components-radio-control--highlight-checked li.wc-block-components-radio-control-accordion-option { position: relative; }
.wc-block-components-radio-control--highlight-checked li.wc-block-components-radio-control-accordion-option::after { content: ""; position: absolute; top: 0; right: 1px; left: 1px; height: 1px; background: var(--wc-separator-color, color-mix(in srgb, currentColor 20%, transparent)); }
.wc-block-components-radio-control--highlight-checked li.wc-block-components-radio-control-accordion-option:first-child::after,
.wc-block-components-radio-control--highlight-checked li.wc-block-components-radio-control-accordion-option--checked-option-highlighted + li.wc-block-components-radio-control-accordion-option::after { display: none; }

/* The chosen card without the script's classes (WooCommerce re-renders the payment choices): the
 * same highlight. A payment option's label stays plain inside its card, as on site-next. */
.wc-block-checkout .wc-block-components-radio-control--highlight-checked :is(.wc-block-components-radio-control-accordion-option:has(> label > input:checked), label.wc-block-components-radio-control__option:not(.wc-block-components-radio-control-accordion-option > label):has(> input:checked)) {
	background: color-mix(in srgb, var(--wp--preset--color--lavender) 65%, transparent);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--primary);
}

/* Terms and "Нарачај". */
.wc-block-checkout .wc-block-checkout__terms .woocommerce-privacy-policy-text p { margin: 0; }
.wc-block-checkout .wc-block-checkout__terms .woocommerce-terms-and-conditions-wrapper > * + * { margin-block-start: 0.5rem; }
.wc-block-checkout .wc-block-checkout__actions_row { display: flex; }
:root .woocommerce-checkout #payment #place_order.wc-block-components-checkout-place-order-button {
	float: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	inline-size: 100%;
	min-block-size: 3.5rem;
	margin: 0;
	padding: 0.9em 1.7em;
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary-deep);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: 1.2;
}

:root .woocommerce-checkout #payment #place_order.wc-block-components-checkout-place-order-button:hover { background-color: var(--wp--preset--color--accent-deep); box-shadow: var(--wp--preset--shadow--glow); }
:root .woocommerce-checkout #payment #place_order.wc-block-components-checkout-place-order-button:focus-visible { outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep)); outline-offset: 3px; box-shadow: 0 0 0 3px var(--revita-focus-ring, var(--wp--preset--color--base)); }

/* Notices that checkout.js prepends to the form (WooCommerce's NoticeGroup). When the order is refused,
 * assets/js/cart-drawer.js may focus the group (an error with no field marked): no ring on the box. */
.wc-block-checkout .woocommerce-NoticeGroup { margin-block-end: var(--wp--preset--spacing--30); }
.wc-block-checkout .woocommerce-NoticeGroup:focus { outline: 0; }
.wc-block-checkout__main > .woocommerce-notices-wrapper:empty { display: none; }

/* The checkout and order-pay pages (checkout header, minimal footer): on a short page (an order that
 * cannot be paid) the footer sits at the bottom of the screen, not halfway down with white below it. */
body.woocommerce-checkout:not(.woocommerce-order-received) .wp-site-blocks { display: flex; flex-direction: column; min-block-size: 100vh; }
body.woocommerce-checkout:not(.woocommerce-order-received) .wp-site-blocks > main { flex: 1 0 auto; }

/* Order-pay (woocommerce/checkout/form-pay.php): the order table as a card above the payment step. */
.wc-block-checkout form.revita-order-pay { max-inline-size: 760px; margin-inline: auto; }
:root .woocommerce-checkout .wc-block-checkout table.revita-order-pay__table {
	overflow: hidden;
	margin: 0 0 var(--wp--preset--spacing--30);
	border: 1px solid var(--wp--preset--color--border);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--soft);
}

:root .woocommerce-checkout .wc-block-checkout table.revita-order-pay__table :is(th, td) { padding: 0.75rem 1rem; border: 0; border-block-start: 1px solid var(--wp--preset--color--border); font-size: var(--wp--preset--font-size--small); line-height: 1.5; text-align: start; }
:root .woocommerce-checkout .wc-block-checkout table.revita-order-pay__table thead th { border-block-start: 0; background: var(--wp--preset--color--lavender); color: var(--wp--preset--color--primary-deep); }
:root .woocommerce-checkout .wc-block-checkout table.revita-order-pay__table :is(td.product-total, td.product-subtotal, th.product-total) { text-align: end; }
:root .woocommerce-checkout .wc-block-checkout table.revita-order-pay__table tfoot tr:last-child :is(th, td) { color: var(--wp--preset--color--primary); font-size: var(--wp--preset--font-size--medium); font-weight: 700; }
.wc-block-checkout form.revita-order-pay .wc-block-checkout__actions > * + * { margin-block-start: var(--wp--preset--spacing--30); }

/* Rows a plugin prints on the totals' table hooks (inc/wc-cart.php revita_cart_table_rows_end()): in
 * the totals rows' layout (label left, value right). */
table.revita-hook-rows { inline-size: 100%; margin: 0; border: 0; border-collapse: collapse; background: transparent; font-size: inherit; }
table.revita-hook-rows :is(th, td) { padding: 8px 16px; border: 0; background: transparent; font-weight: inherit; line-height: 1.5; text-align: start; vertical-align: top; }
table.revita-hook-rows td { text-align: end; white-space: nowrap; }
/* In the cart totals card the rows have no side padding (the checkout summary's rows do): plugin rows
 * line up with "Меѓузбир" there (WB-re-N2). */
.wc-block-cart table.revita-hook-rows :is(th, td) { padding-inline: 0; }

/* Order summary card (sidebar): the summary toggle is a button only while the layout is narrow
 * (assets/js/cart-drawer.js); without the script the content stays open. */
.wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block:not(.revita-has-toggle) .wc-block-components-checkout-order-summary__content { display: block; }
.wc-block-checkout .wc-block-components-checkout-order-summary__title-text { margin: 0; }
.wc-block-checkout .wc-block-components-checkout-order-summary__title-icon svg { display: block; fill: currentColor; transition: transform 0.2s; }
.wc-block-checkout .wc-block-components-checkout-order-summary__title.is-open .wc-block-components-checkout-order-summary__title-icon svg { transform: rotate(180deg); }
.wc-block-checkout .wc-block-components-checkout-order-summary__title[role="button"]:focus-visible { outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep)); outline-offset: -5px; }
.wc-block-checkout .wc-block-components-order-summary-item__image img { inline-size: 48px; block-size: 48px; object-fit: contain; }
.wc-block-checkout .wc-block-components-order-summary-item__description .wc-block-components-product-name { margin: 0; font-size: inherit; }
.wc-block-checkout .wc-block-components-product-metadata p { margin: 0; }
.wc-block-checkout .wc-block-components-totals-footer-item-tax-value strong { font-weight: inherit; }

/* The summary repeated as the last step above "Нарачај" while the checkout is narrow (payment.php;
 * WooCommerce's block CSS hides it at 920px and wider): numbered after the step cards, as site-next's
 * fifth card (its note card counts as a step there; here the notes sit in step 2). */
.wc-block-checkout .checkout-order-summary-block-fill-wrapper { counter-increment: revita-step; }

/* Coupon panel at the bottom of the summary card. */
.wc-block-checkout .woocommerce-form-coupon-toggle .wc-block-components-panel__button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	inline-size: 100%;
	min-block-size: 2.75rem;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wc-block-checkout .woocommerce-form-coupon-toggle .wc-block-components-panel__button-icon { order: 2; flex: none; fill: currentColor; transition: transform 0.2s; }
.wc-block-checkout .woocommerce-form-coupon-toggle .wc-block-components-panel__button[aria-expanded="true"] .wc-block-components-panel__button-icon { transform: translateY(-50%) rotate(180deg); }
.wc-block-checkout .woocommerce-form-coupon-toggle .wc-block-components-panel__button:focus-visible { outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep)); outline-offset: 3px; border-radius: var(--wp--custom--radius--xs); }
:root .wc-block-checkout form.checkout_coupon { gap: 0.5rem; margin: 0; padding: 0 16px 16px; border: 0; border-radius: 0; }
:root .wc-block-checkout form.checkout_coupon:not([style*="none"]) { display: flex; flex-wrap: wrap; }
/* The form holds the cart panel's field and button (woocommerce/checkout/form-coupon.php): WooCommerce's
 * block coupon form (vendor/wc-blocks/checkout.css) with the floating label "Внеси код" (finding RVS-9). */
.wc-block-checkout form.checkout_coupon .wc-block-components-totals-coupon__form .wc-block-components-text-input { flex: 1 1 8rem; }
.wc-block-checkout form.checkout_coupon .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button { flex: 0 0 auto; }
/* A plugin that still prints WooCommerce's classic rows in the form keeps the design's field. */
:root .wc-block-checkout form.checkout_coupon .form-row { flex: 1 1 8rem; float: none; inline-size: auto; margin: 0; padding: 0; }
:root .wc-block-checkout form.checkout_coupon .form-row-last { flex: 0 0 auto; }
:root .wc-block-checkout form.checkout_coupon .clear { display: none; }
:root .wc-block-checkout form.checkout_coupon .form-row input.input-text { box-sizing: border-box; inline-size: 100%; min-block-size: 2.75rem; padding: 0.6em 1em; border: 1.5px solid var(--revita-wc-field); border-radius: var(--wp--custom--radius--sm); font-size: max(1rem, 1em); }

/* ==========================================================================
   5. Notices (woocommerce/notices/*: WooCommerce's block notice banner around the classic classes)
   ========================================================================== */

/* WooCommerce 5.1 draws an icon font glyph and a clearfix on .woocommerce-error/-message/-info; the
 * banner brings its own icon (the svg). */
.wc-block-components-notice-banner:is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before,
.wc-block-components-notice-banner:is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::after { content: none; display: none; }
.wc-block-components-notice-banner:is(.woocommerce-error, .woocommerce-message, .woocommerce-info) { inline-size: auto; margin: 0 0 var(--wp--preset--spacing--30); list-style: none; }
.wc-block-components-notice-banner > .wc-block-components-notice-banner__content ul { margin: 0; padding: 0; }
.wc-block-components-notice-banner > .wc-block-components-notice-banner__content li + li { margin-block-start: 0.25rem; }
/* The "View cart" link of an add-to-cart notice keeps the design's size (woocommerce.css: 24px, a 44px
 * line of its own on touch screens; inc/wc-cart.php puts it after the message); only the classic
 * button look is undone. */
.wc-block-components-notice-banner .wc-block-components-notice-banner__content .button.wc-forward { background: transparent; box-shadow: none; }
.woocommerce-notices-wrapper:empty { display: none; }

/* Notices printed without the template (WooCommerce's scripts write plain .woocommerce-error etc.,
 * and the checkout's "no payment methods" list item): the same banner look. */
:is(.woocommerce-error, .woocommerce-message, .woocommerce-info):not(.wc-block-components-notice-banner) {
	margin: 0 0 var(--wp--preset--spacing--30);
	padding: 0.9rem 1.1rem;
	border: 1px solid color-mix(in srgb, var(--revita-notice, var(--wp--preset--color--primary)) 30%, var(--wp--preset--color--base));
	border-inline-start: 4px solid var(--revita-notice, var(--wp--preset--color--primary));
	border-radius: var(--wp--custom--radius--md);
	background: color-mix(in srgb, var(--revita-notice, var(--wp--preset--color--primary)) 7%, var(--wp--preset--color--base));
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
}

.woocommerce-error:not(.wc-block-components-notice-banner) { --revita-notice: var(--wp--preset--color--rose); }
.woocommerce-message:not(.wc-block-components-notice-banner) { --revita-notice: var(--wp--preset--color--success); }
/* An info notice stays purple although WooCommerce 5.1 gives some both classes (My account's empty
 * orders list is woocommerce-message and woocommerce-info: the same look as the empty downloads). */
.woocommerce-info:not(.wc-block-components-notice-banner) { --revita-notice: var(--wp--preset--color--primary); }
:is(.woocommerce-error, .woocommerce-message, .woocommerce-info):not(.wc-block-components-notice-banner)::before { content: none; }

/* Shipping choices on the cart: the checkout's radio cards (lavender with a purple ring when chosen). */
.wc-block-cart .wc-block-components-radio-control__option { border-radius: var(--wp--custom--radius--md); }
.wc-block-cart .wc-block-components-radio-control--highlight-checked :is(label.wc-block-components-radio-control__option--checked-option-highlighted, label.wc-block-components-radio-control__option:has(> input:checked)) {
	background: color-mix(in srgb, var(--wp--preset--color--lavender) 65%, transparent);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--primary);
}

/* ==========================================================================
   6. Order received (woocommerce/checkout/thankyou.php, woocommerce/order/*)
   ========================================================================== */

/* The shortcode's div.woocommerce is <main>'s only child: it spans the full width, so the thank-you
 * band reaches the edges; .woocommerce-order inside it is the constrained layout (as site-next's main). */
:root main.revita-order-received > .woocommerce {
	max-width: none;
	margin-left: calc(var(--wp--style--root--padding-left) * -1) !important;
	margin-right: calc(var(--wp--style--root--padding-right) * -1) !important;
}

/* WordPress zeroes the padding of a nested has-global-padding element, and the margins of a full-width
 * block inside it; this one is the page's layout, so its band reaches the edges as on site-next. */
:root main.revita-order-received > .woocommerce > .woocommerce-order { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
:root main.revita-order-received > .woocommerce > .woocommerce-order > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }

/* The band's content column (site-next: contentSize 720px). */
.revita-thanks.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { max-width: 720px; }
.revita-thanks .wc-block-order-confirmation-status .woocommerce-notice { margin: 0 auto; padding: 0; border: 0; background: transparent; color: inherit; }
.revita-thanks .wc-block-order-confirmation-status__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-block-start: var(--wp--preset--spacing--30); }
.revita-thanks .wc-block-order-confirmation-status__actions a { margin: 0; }

/* Summary card: WooCommerce 5.1's ul.order_details (floated, dashed, uppercase) as the design's list. */
:root .woocommerce .revita-order-summary ul.order_details { margin: 0; padding: 0; }
:root .woocommerce .revita-order-summary ul.order_details::before,
:root .woocommerce .revita-order-summary ul.order_details::after { content: none; }
:root .woocommerce .revita-order-summary ul.order_details li { float: none; margin: 0; padding: 0; border: 0; font-size: inherit; line-height: 1.5; text-transform: none; }

/* Order details: two columns (58% / 42%) as site-next's order-confirmation columns. */
.wp-block-columns.revita-order-details { gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60); margin-block-start: var(--wp--preset--spacing--60); }
/* No addresses (WooCommerce 5.1 shows them to the logged-in customer only): the details take the row. */
.wp-block-columns.revita-order-details:not(:has(> .revita-order-details__aside *)) > .revita-order-details__main { flex-basis: 100% !important; }
.wp-block-columns.revita-order-details > .revita-order-details__aside:not(:has(*)) { display: none; }
.revita-order-details .woocommerce-order-details__title,
.revita-order-details .woocommerce-column__title { margin: 0 0 var(--wp--preset--spacing--20); font-size: var(--wp--preset--font-size--large); }
:root .woocommerce .revita-order-details .woocommerce-order-details { margin: 0; }
:root .woocommerce .revita-order-details table.shop_table { margin: 0; }
/* WooCommerce 5.1's shop_table look undone where the block table's CSS applies (order received). */
:root .woocommerce .revita-order-details .wc-block-order-confirmation-totals table.shop_table :is(th, td) { padding: 16px; line-height: inherit; }
:root .woocommerce .revita-order-details .wc-block-order-confirmation-totals table.shop_table thead th { font-weight: 700; }
:root .woocommerce .revita-order-details .wc-block-order-confirmation-totals table.shop_table tfoot :is(th, td) { border-block-start: 1px solid var(--wc-separator-color, color-mix(in srgb, currentColor 20%, transparent)); font-weight: inherit; }
:root .woocommerce .revita-order-details .wc-block-order-confirmation-totals table.shop_table tfoot th { font-weight: 700; }
/* The total row in bold, label and amount, as the design's order confirmation (the inherit above reset the
 * amount); order received and My account's order view (finding RVS-5). */
:root .woocommerce .revita-order-details .wc-block-order-confirmation-totals table.shop_table tfoot tr:last-child :is(th, td) { font-weight: 700; }
/* The order received tables' 16px corners and separator border (WooCommerce 5.1's .woocommerce
 * table.shop_table rule, 5px and rgba(0,0,0,.1), is as specific as the design's and loads later). */
:root main.revita-order-received .revita-order-details :is(.wc-block-order-confirmation-totals, .wc-block-order-confirmation-downloads) table.shop_table { border-color: var(--wc-separator-color, color-mix(in srgb, currentColor 20%, transparent)); border-radius: var(--wp--custom--radius--md); }
.revita-order-details .wc-block-order-confirmation-totals__product a { color: var(--wp--preset--color--primary-deep); font-weight: 600; text-decoration: none; }
.revita-order-details .wc-block-order-confirmation-totals__product a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; }
:root .woocommerce .revita-order-details .woocommerce-customer-details address { padding: 0; border: 0; border-radius: 0; font-style: normal; }
.revita-order-details .woocommerce-customer-details > * + * { margin-block-start: var(--wp--preset--spacing--40); }
:root .woocommerce .revita-order-details .wc-block-order-confirmation-billing-address { border: 1px solid var(--wp--preset--color--lavender-strong); }
.revita-order-details .wc-block-order-confirmation-billing-address p { margin: 0.5rem 0 0; }
.revita-order-received .wp-block-woocommerce-order-confirmation-additional-information p { margin: 0; }
/* "преку Стандардна цена" under the shipping total (a small element: 12-13px otherwise), here and in
 * My account's order view: the small size, never under 14px. */
.woocommerce small.shipped_via { font-size: var(--wp--preset--font-size--small, 0.875rem); }

/* ==========================================================================
   7. My account (template-parts/pages/account.php, woocommerce/myaccount/*)
   ========================================================================== */

/* The account content is wider than the article column (WooCommerce's block-theme CSS: 1000px). */
:root .woocommerce-account main .woocommerce { max-width: 1000px; }

/* Classic fields (login, register, lost password, addresses, account details): the design's fields. */
:root .woocommerce-account .woocommerce form .form-row :is(input.input-text, textarea) {
	display: block;
	box-sizing: border-box;
	inline-size: 100%;
	min-block-size: 3.125rem;
	padding: 0.9rem 1.1rem;
	border: 1.5px solid var(--revita-wc-field);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	line-height: normal;
}

/* Password fields (login, register, account details): the text stops before WooCommerce's 44px eye
 * button, as the design's rule says (woocommerce.css; the padding above is more specific): RVS-4. */
:root .woocommerce-account .woocommerce form .form-row .password-input input.input-text { padding-inline-end: 3rem; }

:root .woocommerce-account .woocommerce form .form-row select { min-block-size: 3.125rem; padding: 0.6rem 1.1rem; border: 1.5px solid var(--revita-wc-field); border-radius: var(--wp--custom--radius--sm); background-color: var(--wp--preset--color--base); }
:root .woocommerce-account .woocommerce form .form-row label { margin-block-end: 0.7em; line-height: 2; }
:root .woocommerce-account .woocommerce form .form-row .required { color: var(--wp--preset--color--rose); text-decoration: none; visibility: visible; }
:root .woocommerce-account .woocommerce form .form-row.woocommerce-invalid :is(input.input-text, select) { border-color: var(--revita-wc-error); }
.woocommerce-account .select2-container .select2-selection--single { box-sizing: border-box; display: flex; align-items: center; block-size: 3.125rem; border: 1.5px solid var(--revita-wc-field); border-radius: var(--wp--custom--radius--sm); }
.woocommerce-account .select2-container .select2-selection--single .select2-selection__rendered { padding: 0 2.5rem 0 1.1rem; color: var(--wp--preset--color--contrast); }
.woocommerce-account .select2-container .select2-selection--single .select2-selection__arrow { inset-block: 0; block-size: auto; inset-inline-end: 0.75rem; }
:root .woocommerce-account .woocommerce form .form-row .woocommerce-form__input-checkbox[type="checkbox"] { display: inline-grid; margin: 0 0.5em 0 0; }
.woocommerce-account .woocommerce-form-login__rememberme { margin-inline-start: 1rem; }

/* "Show password" (WooCommerce 5.1's eye after password fields; assets/js/cart-drawer.js makes it a
 * labelled button): WooCommerce 11's icons and centring, as on site-next (the design's
 * woocommerce.css makes it a 44px target). Icons from WooCommerce 11.2.2 woocommerce-layout.css
 * (GPLv3, see assets/css/vendor/wc-blocks/). */
:root .woocommerce form .password-input .show-password-input { top: 50%; padding: 0; transform: translateY(-50%); background: transparent; color: var(--wp--preset--color--contrast); }
:root .woocommerce form .password-input .show-password-input::after { content: none; display: none; }
:root .woocommerce form .password-input .show-password-input::before {
	content: "";
	display: block;
	inline-size: 22px;
	block-size: 22px;
	background-repeat: no-repeat;
	background-size: cover;
	background-image: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.3 3.3C16.9 2.9 16.2 2.9 15.7 3.3L13.3 5.7C12.2437 5.3079 11.1267 5.1048 10 5.1C6.2 5.2 2.8 7.2 1 10.5C1.2 10.9 1.5 11.3 1.8 11.7C2.6 12.8 3.6 13.7 4.7 14.4L3 16.1C2.6 16.5 2.5 17.2 3 17.7C3.4 18.1 4.1 18.2 4.6 17.7L17.3 4.9C17.7 4.4 17.7 3.7 17.3 3.3ZM6.7 12.3L5.4 13.6C4.2 12.9 3.1 11.9 2.3 10.7C3.5 9 5.1 7.8 7 7.2C5.7 8.6 5.6 10.8 6.7 12.3ZM10.1 9C9.6 8.5 9.7 7.7 10.2 7.2C10.7 6.8 11.4 6.8 11.9 7.2L10.1 9ZM18.3 9.5C17.8 8.8 17.2 8.1 16.5 7.6L15.5 8.6C16.3 9.2 17 9.9 17.6 10.8C15.9 13.4 13 15 9.9 15H9.1L8.1 16C8.8 15.9 9.4 16 10 16C13.3 16 16.4 14.4 18.3 11.7C18.6 11.3 18.8 10.9 19.1 10.5C18.8 10.2 18.6 9.8 18.3 9.5ZM14 10L10 14C12.2 14 14 12.2 14 10Z" fill="%23111111"/></svg>');
}
:root .woocommerce form .password-input .show-password-input.display-password::before { background-image: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18.3 9.49999C15 4.89999 8.50002 3.79999 3.90002 7.19999C2.70002 8.09999 1.70002 9.29999 0.900024 10.6C1.10002 11 1.40002 11.4 1.70002 11.8C5.00002 16.4 11.3 17.4 15.9 14.2C16.8 13.5 17.6 12.8 18.3 11.8C18.6 11.4 18.8 11 19.1 10.6C18.8 10.2 18.6 9.79999 18.3 9.49999ZM10.1 7.19999C10.6 6.69999 11.4 6.69999 11.9 7.19999C12.4 7.69999 12.4 8.49999 11.9 8.99999C11.4 9.49999 10.6 9.49999 10.1 8.99999C9.60003 8.49999 9.60003 7.69999 10.1 7.19999ZM10 14.9C6.90002 14.9 4.00002 13.3 2.30002 10.7C3.50002 8.99999 5.10002 7.79999 7.00002 7.19999C6.30002 7.99999 6.00002 8.89999 6.00002 9.89999C6.00002 12.1 7.70002 14 10 14C12.2 14 14.1 12.3 14.1 9.99999V9.89999C14.1 8.89999 13.7 7.89999 13 7.19999C14.9 7.79999 16.5 8.99999 17.7 10.7C16 13.3 13.1 14.9 10 14.9Z" fill="%23111111"/></svg>'); }

/* Logged in: the navigation as a card of pill links beside the content (WooCommerce's 30% / 68%). */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--soft);
	list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li { margin: 0; padding: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation li + li { margin-block-start: 0.15rem; }
.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: flex;
	align-items: center;
	min-block-size: 2.75rem;
	padding: 0.35rem 1rem;
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--primary-deep);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { background: var(--wp--preset--color--lavender); color: var(--wp--preset--color--primary-deep); }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); }
.woocommerce-account .woocommerce-MyAccount-navigation li a:focus-visible { outline: 2px solid var(--revita-focus, var(--wp--preset--color--primary-deep)); outline-offset: 2px; }
.woocommerce-account .woocommerce-MyAccount-content > :first-child { margin-block-start: 0; }
.woocommerce-account .woocommerce-MyAccount-content :is(h2, h3) { font-size: var(--wp--preset--font-size--large); }
.woocommerce-account .woocommerce-MyAccount-content mark { padding: 0; background: transparent; color: var(--wp--preset--color--primary-deep); font-weight: 600; }
.woocommerce-account .woocommerce-MyAccount-content a:not(.button) { color: var(--wp--preset--color--primary); }

@media (max-width: 768px) {
	.woocommerce-account .woocommerce-MyAccount-navigation { margin-block-end: var(--wp--preset--spacing--40); }
}

/* Orders and downloads tables, and the account forms, as the design's cards. The corners are clipped with
 * clip-path too: a plugin's ".shop_table.shop_table_responsive { overflow: visible !important }"
 * (Advanced Flat Rate Shipping) undoes the overflow on the orders table, and the lavender header showed
 * past the rounded border (finding RVS-3). */
:root .woocommerce-account .woocommerce table.shop_table {
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border);
	border-collapse: separate;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--base);
	clip-path: inset(0 round var(--wp--custom--radius--md));
}

:root .woocommerce-account .woocommerce table.shop_table thead th { background: var(--wp--preset--color--lavender); color: var(--wp--preset--color--primary-deep); }
/* WooCommerce 5.1 sets the orders table to .85em (13.6px): the small size, 14px at least. */
:root .woocommerce-account .woocommerce table.my_account_orders { font-size: var(--wp--preset--font-size--small, 0.875rem); }
:root .woocommerce-account .woocommerce table.shop_table :is(th, td) { padding: 0.75rem 1rem; }
:root .woocommerce-account .woocommerce table.shop_table td .button { min-block-size: 2.5rem; margin: 0.15rem 0.25rem 0.15rem 0; padding: 0.55em 1.2em; font-size: var(--wp--preset--font-size--x-small); }
/* WooCommerce 5.1's link buttons in the account content (the orders table's "Поглед", "Пребарај продукти"
 * in the empty notices) are anchors, content-box by default: the padding came on top of the minimum
 * height (55px and 71px instead of 40px and 44px). Border-box, as the form buttons (finding RVS-2). */
:root .woocommerce-account .woocommerce :is(a, input).button { box-sizing: border-box; }
/* The empty orders / downloads notice: its words and its button on one centred line (WooCommerce 5.1
 * floats the button right and puts the words after it); on a narrow screen the button wraps under the
 * words. WooCommerce 5.1's clearfix ::after would be a flex item too (it pushed the words to the middle). */
:root .woocommerce-account .woocommerce-MyAccount-content :is(.woocommerce-info, .woocommerce-message):has(> .button) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; }
:root .woocommerce-account .woocommerce-MyAccount-content :is(.woocommerce-info, .woocommerce-message):has(> .button)::after { content: none; }
:root .woocommerce-account .woocommerce-MyAccount-content :is(.woocommerce-info, .woocommerce-message):has(> .button) > .button { order: 1; flex: none; float: none; }
:root .woocommerce-account .woocommerce .woocommerce-MyAccount-content form:not(.woocommerce-cart-form) {
	padding: var(--wp--preset--spacing--50);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--soft);
}

:root .woocommerce-account .woocommerce .woocommerce-MyAccount-content fieldset { margin: var(--wp--preset--spacing--40) 0 0; padding: var(--wp--preset--spacing--30) 0 0; border: 0; border-block-start: 1px solid var(--wp--preset--color--border); }
:root .woocommerce-account .woocommerce .woocommerce-MyAccount-content fieldset legend { padding: 0 0.5rem 0 0; color: var(--wp--preset--color--primary-deep); font-family: var(--wp--preset--font-family--heading); font-weight: 600; }
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-address-fields__field-wrapper { display: flex; flex-wrap: wrap; gap: 0 var(--wp--preset--spacing--30); }
:root .woocommerce-account .woocommerce .woocommerce-address-fields__field-wrapper .form-row { flex: 1 1 100%; float: none; inline-size: auto; }
:root .woocommerce-account .woocommerce .woocommerce-address-fields__field-wrapper .form-row:is(.form-row-first, .form-row-last) { flex-basis: calc(50% - var(--wp--preset--spacing--30)); }

/* Addresses: two cards of equal height side by side (one column when narrow), like the order
 * confirmation's (lavender mist). WooCommerce 5.1 floats them at 48% and adds clearfix pseudo-elements
 * to the list and to each card's title row; in the grid and in the title's flex row those would be
 * items (an empty one pushed the second card's title to the right). */
:root .woocommerce-account .woocommerce .woocommerce-Addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--wp--preset--spacing--30); }
:root .woocommerce-account .woocommerce .woocommerce-Addresses::before,
:root .woocommerce-account .woocommerce .woocommerce-Addresses::after,
:root .woocommerce-account .woocommerce .woocommerce-Address-title::before,
:root .woocommerce-account .woocommerce .woocommerce-Address-title::after { content: none; display: none; }
:root .woocommerce-account .woocommerce .woocommerce-Addresses .woocommerce-Address { float: none; inline-size: auto; max-inline-size: none; margin: 0; }

:root .woocommerce-account .woocommerce .woocommerce-Addresses .woocommerce-Address {
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--lavender-strong);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--gradient--lavender-mist);
}

.woocommerce-account .woocommerce-Address-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
/* The address titles are H2s (woocommerce/myaccount/my-address.php; WooCommerce 5.1: H3). */
.woocommerce-account .woocommerce-Address-title :is(h2, h3) { margin: 0; }
:root .woocommerce-account .woocommerce-Address-title .edit { float: none; font-weight: 600; }
.woocommerce-account .woocommerce-Address address { margin-block-start: 0.5rem; font-style: normal; }

/* Order view: in the narrower account content the details stack, as WooCommerce's order view does:
 * the order table, then the address cards side by side (one column when narrow). */
.woocommerce-account .woocommerce-MyAccount-content .revita-order-details { margin-block-start: var(--wp--preset--spacing--40); }
.woocommerce-account .woocommerce-MyAccount-content .wp-block-columns.revita-order-details { flex-direction: column; flex-wrap: nowrap; }
.woocommerce-account .woocommerce-MyAccount-content .wp-block-columns.revita-order-details > .wp-block-column { flex-basis: auto !important; inline-size: 100%; }
.woocommerce-account .woocommerce-MyAccount-content .revita-order-details .woocommerce-customer-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--wp--preset--spacing--30); }
.woocommerce-account .woocommerce-MyAccount-content .revita-order-details .woocommerce-customer-details > * + * { margin-block-start: 0; }
/* The order confirmation's total row and address cards (its block CSS loads on the order received page
 * only; the same values as blocks/woocommerce-order-confirmation-status.css there). */
.woocommerce-account .revita-order-details .wc-block-order-confirmation-totals tfoot tr:last-child :is(th, td) { color: var(--wp--preset--color--primary); font-size: var(--wp--preset--font-size--large); font-weight: 700; }
:root .woocommerce-account .woocommerce .revita-order-details :is(.wc-block-order-confirmation-shipping-address, .wc-block-order-confirmation-billing-address) { box-sizing: border-box; padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40); border: 1px solid var(--wp--preset--color--lavender-strong); border-radius: var(--wp--custom--radius--md); background: var(--wp--preset--gradient--lavender-mist); }
.woocommerce-account .revita-order-details :is(.wc-block-order-confirmation-shipping-address, .wc-block-order-confirmation-billing-address) address { margin: 0; font-style: normal; }
