/* PageSpeed mitigation — defer offscreen swatch render + image decode.
 *
 * Products with 50-100+ image swatches contributed ~328ms of unattributed
 * forced reflow on PDP load (per Lighthouse desktop trace, 2026-05-12):
 * the browser was decoding every 40×40 webp + invalidating layout for
 * each one, even though only the top 2-3 rows of the swatch grid sat in
 * the initial viewport.
 *
 * `content-visibility: auto` flips offscreen wrappers to a deferred-
 * rendering mode — the browser skips both layout AND image decode for
 * them until they scroll near the viewport. Wrappers that ARE in the
 * initial viewport degrade to `visible` automatically (no-op), so the
 * top swatches paint normally and don't regress LCP/CLS.
 *
 * `contain-intrinsic-size: auto 500px` reserves placeholder height so
 * the page doesn't collapse + reshuffle when offscreen wrappers swap
 * between rendered/skipped during scroll. 500px is a soft upper-bound
 * for a 60-swatch grid in the ~400px-wide PDP info column (~10 rows ×
 * ~50px). On grids shorter than 500px the browser shrinks; longer grids
 * get the right size once first paint measures them (the `auto` keyword
 * tells it to remember the actual size after each render).
 */
.om-variations-wrapper {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}
/* Not in the product page's own form. `content-visibility: auto` keeps paint
 * containment even on screen (it does not degrade to `visible`), so the
 * wrapper clipped everything past its box: the hover label above a swatch,
 * the in-cart ring and the corner badges. That form is one wrapper per
 * attribute near the top of the page, where deferring gains nothing. */
form.variations_form .om-variations-wrapper {
  content-visibility: visible;
  contain-intrinsic-size: none;
}

.om-variation-swatch-image {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: 100%;
  height: 100%;
  inset-inline-start: 0;
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: 300ms;
  transition: 300ms;
}
.om-variation-swatch-image.active {
  opacity: 1;
  visibility: visible;
}
.om-variation-swatch-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Base flex layout for all swatch type containers */
.om-variation-type-color,
.om-variation-type-button,
.om-variation-type-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* A colour swatch's shade is on its inner span (the server sets it inline): the span fills the ring, so the
   swatch is never drawn as an empty circle. */
.om-variations-wrapper .om-variation-type-color > a {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  box-sizing: border-box;
}
.om-variations-wrapper .om-variation-type-color > a > .om-variation-text {
  display: block;
  flex: 1 1 auto;
  border-radius: inherit;
}

/* Thumbs on the product page: each colour swatch a 44 px target (the cards keep their own size). */
@media (pointer: coarse) {
  .om-variations-wrapper:not(.om-product-swatches--archive *) .om-variation-type-color > a {
    width: 44px;
    height: 44px;
  }
}

.om-variations-wrapper[data-type="image"] .om-variation-type-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  /* Without an explicit max-width the flex container uses `width: max-content`
   * (= sum of all swatches in one row), which makes its bounding box exceed
   * the parent column. `flex-wrap: wrap` only kicks in when the container's
   * width is actually constrained — without this max-width, the container
   * grows to fit content and never wraps. The wrapper sits inside WC's
   * variations form which itself doesn't always constrain children, so we
   * pin it to 100% of whatever parent we end up in. */
  max-width: 100%;
}

/* Same constraint on the wrapper level — defends against any ancestor that
 * doesn't constrain it. WC's `<table class="variations">` plus the form
 * rendered by `single-product` block layout don't always cap inner widths. */
.om-variations-wrapper {
  max-width: 100%;
}

.om-product-swatches--archive {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.om-product-swatches--archive form.variations_form {
  width: auto;
  margin: 0;
}

.om-product-swatches--archive .variations,
.om-product-swatches--archive .variations tbody,
.om-product-swatches--archive .variations tr {
  width: auto;
  border: 0;
  margin: 0;
  padding: 0;
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.om-product-swatches--archive .variations tr {
  flex-direction: column;
  gap: 8px;
}

.om-product-swatches--archive .variations .label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.om-product-swatches--archive .variations .value {
  display: flex;
  justify-content: center;
  align-items: center;
}

.om-product-swatches--archive .om-variation-type-image {
  gap: 6px;
  justify-content: center;
}

.om-product-swatches--archive .om-more-variations {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 4px 8px;
  background-color: #f5f5f5;
  color: #333;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--aieo-shape-button, 4px);
  border: 1px solid #ddd;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.om-product-swatches--archive .om-more-variations:hover {
  background-color: #e8e8e8;
  border-color: #ccc;
  text-decoration: none;
  color: #333;
}

.om-product-swatches--archive .om-add-to-cart-button {
  align-self: center;
}

.om-product-swatches--archive .single_variation_wrap,
.om-product-swatches--archive .reset_variations_alert {
  display: none !important;
}

/* Archive page cart summary - compact version */
.om-product-swatches--archive .om-cart-summary {
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 12px;
}

.om-product-swatches--archive .om-cart-summary-icon {
  width: 16px;
  height: 16px;
  font-size: 10px;
}

.om-product-swatches--archive .om-cart-summary-content {
  gap: 6px;
}

.om-product-swatches--archive .om-cart-summary-text {
  font-size: 12px;
}

.om-product-swatches--archive .om-cart-summary-toggle {
  font-size: 11px;
}

.om-product-swatches--archive .om-cart-summary-details {
  margin-top: 6px;
  padding-top: 6px;
}

.om-product-swatches--archive .om-cart-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.om-product-swatches--archive .om-cart-summary-list li,
.om-product-swatches--archive .om-cart-summary-list li.om-cart-summary-item,
.products .om-product-swatches--archive .om-cart-summary-list li,
.products.columns-3 .om-product-swatches--archive .om-cart-summary-list li {
  padding: 2px 0 !important;
  padding-inline-start: 0 !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  font-size: 11px;
  border-bottom: none;
  display: block;
}

/* Hide subtotal on archive pages - not needed */
.om-product-swatches--archive .om-cart-summary-subtotal {
  display: none;
}

.om-variation-select--archive {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ========================================
   VARIATION DESCRIPTION AND PRICE LAYOUT
   ======================================== */

/* Hide single_variation container until variation is selected */
.woocommerce-variation.single_variation:empty {
  display: none !important;
}

/* HIDE variation description - it is already shown under product title */
.woocommerce-variation.single_variation .woocommerce-variation-description,
.single_variation .woocommerce-variation-description {
  display: none !important;
}

/* Container: clean layout with no extra spacing */
.woocommerce-variation.single_variation {
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

/* Price: display as block at 16px font size */
.woocommerce-variation.single_variation .woocommerce-variation-price,
.single_variation .woocommerce-variation-price {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

/* Price amount: 16px font size */
.woocommerce-variation.single_variation .woocommerce-variation-price .woocommerce-Price-amount,
.single_variation .woocommerce-variation-price .woocommerce-Price-amount {
  font-size: 16px !important;
  font-weight: normal !important;
}

/* Availability: display below price */
.woocommerce-variation.single_variation .woocommerce-variation-availability,
.single_variation .woocommerce-variation-availability {
  display: block !important;
  margin-top: 8px !important;
}

/* ========================================
   OUT-OF-STOCK VARIATION STYLES
   ======================================== */

/* CRITICAL OVERRIDE: Enable hover on disabled variations for tooltips
   Must use high specificity to override existing pointer-events:none */
.single-product .om-variations-wrapper .om-variation-type-image > a.disabled,
.single-product .om-variations-wrapper .om-variation-type-image > a.permanent-disabled,
.single-product .om-variations-wrapper .om-variation-type-button > a.disabled,
.single-product .om-variations-wrapper .om-variation-type-button > a.permanent-disabled,
.single-product .om-variations-wrapper .om-variation-type-color > a.disabled,
.single-product .om-variations-wrapper .om-variation-type-color > a.permanent-disabled,
.om-variations-wrapper .om-variation-type-image > a.disabled,
.om-variations-wrapper .om-variation-type-image > a.permanent-disabled,
.om-variations-wrapper .om-variation-type-button > a.disabled,
.om-variations-wrapper .om-variation-type-button > a.permanent-disabled,
.om-variations-wrapper .om-variation-type-color > a.disabled,
.om-variations-wrapper .om-variation-type-color > a.permanent-disabled {
  pointer-events: auto !important; /* MUST allow hover for tooltips */
  cursor: not-allowed !important; /* Show disabled state */
}

/* ========================================
   OUT-OF-STOCK X OVERLAY - Always Visible
   ======================================== */

/* Base styling for disabled/out-of-stock swatches */
.om-variations-wrapper .om-variation-item.disabled,
.om-variations-wrapper .om-variation-item.permanent-disabled {
  position: relative;
  opacity: 0.6;
}

/* X overlay using ::before pseudo-element - diagonal line 1 */
.om-variations-wrapper .om-variation-item.disabled::before,
.om-variations-wrapper .om-variation-item.permanent-disabled::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 2px;
  background-color: rgba(180, 50, 50, 0.85);
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 10;
  pointer-events: none;
  border-radius: var(--aieo-shape-control, 1px);
}

/* X overlay using ::after pseudo-element - diagonal line 2 */
.om-variations-wrapper .om-variation-item.disabled::after,
.om-variations-wrapper .om-variation-item.permanent-disabled::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 2px;
  background-color: rgba(180, 50, 50, 0.85);
  transform: translate(-50%, -50%) rotate(-45deg);
  z-index: 10;
  pointer-events: none;
  border-radius: var(--aieo-shape-control, 1px);
}

/* A shade sold as a back-order: a dashed ring from the first paint, tickable; its name says so (title,
   aria-label). A sold-out shade is the X above (owner, 28 Oct 2026, R3; FB8). */
.om-variations-wrapper .om-variation-item.is-backorder {
  border-style: dashed;
  border-width: 2px;
}
.om-variations-wrapper .om-variation-item.is-backorder:not(.active):not(.om-multi-selected):not(:hover) {
  border-color: var(--wp--preset--color--muted, #6b6b6b);
}

/* For image swatches - make sure X appears over the image */
.om-variations-wrapper .om-variation-type-image > a.disabled,
.om-variations-wrapper .om-variation-type-image > a.permanent-disabled {
  overflow: visible;
}

/* For color swatches - make sure X appears over the color */
.om-variations-wrapper .om-variation-type-color > a.disabled .om-variation-text,
.om-variations-wrapper .om-variation-type-color > a.permanent-disabled .om-variation-text {
  position: relative;
}

/* Button swatches - add strikethrough text effect too */
.om-variations-wrapper .om-variation-type-button > a.disabled,
.om-variations-wrapper .om-variation-type-button > a.permanent-disabled {
  text-decoration: line-through;
  text-decoration-color: rgba(180, 50, 50, 0.85);
}

/* Position context for tooltips */
.om-variation-item {
  position: relative;
}

/* Ensure wrappers allow tooltip overflow */
.om-variations-wrapper,
.om-variation-type-image,
.om-variation-type-color,
.om-variation-type-button {
  overflow: visible !important;
}

/* Override old tooltip positioning - NEW tooltip system uses ::after pseudo-element */
.om-variations-wrapper .om-variation-tooltip {
  display: inline-block !important;
  position: static !important; /* Changed from relative - let parent handle positioning */
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  transform: none !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  top: auto !important;
  bottom: auto !important;
}

/* Visually hide empty tooltip spans (color/image swatches) without affecting button text */
.om-variation-type-color .om-variation-tooltip:empty,
.om-variation-type-image .om-variation-tooltip:empty {
  display: block !important;
  height: 0;
  overflow: visible !important; /* MUST be visible so ::after pseudo-element can show above */
}

/* ========================================
   TOOLTIP POSITIONING - FIXED TO TOP
   Position tooltip relative to the .om-variation-item parent (the <a> tag)
   Uses data-tooltip attribute which is only added when tooltip setting is enabled
   ======================================== */

/* The parent link must be the positioning context for tooltips */
.om-variation-item:not(.disabled):not(.permanent-disabled) {
  position: relative;
}

/* Tooltip content - creates tooltip above the swatch element */
/* Uses data-tooltip attribute which is only present when tooltips are enabled */
.om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  background-color: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--aieo-shape-control, 4px);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  z-index: 999999;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);
  min-width: max-content;
}

/* Tooltip arrow pointing down */
.om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  border: 6px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  z-index: 999999;
}

/* Show tooltip on hover - trigger from parent link element */
.om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]:hover::after,
.om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
}

/* On touch / no-hover devices the tooltip pseudo-elements never get shown
 * (there's no `:hover` state) but they still take layout space — their
 * `position: absolute; min-width: max-content; white-space: nowrap` boxes
 * extend past the swatch on every side, and on swatches near the viewport
 * edge that pushes `document.scrollWidth` past the visible viewport. The
 * net effect was a ~73px right-side overflow on every product page with
 * image swatches on mobile. Strip the pseudo-elements entirely when hover
 * isn't available — tooltips are pointless without hover anyway. */
@media (hover: none) {
  .om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]::after,
  .om-variation-item:not(.disabled):not(.permanent-disabled)[data-tooltip]::before {
    display: none;
  }
}

/* On-selection variation caption: the "<description> - <attribute>" label
 * (e.g. "No100 Fair - Ανοιχτόχρωμο") written by aieo-swatches.js
 * (applyVariationToProduct) into .om-variation-description when a variation is
 * chosen. Kept compact so it sits cleanly under the swatch row / title. */
.om-variation-description {
  margin: 4px 0 6px;
  font-size: 12px;
  line-height: 1.35;
  color: #4b5563;
}
.om-variation-description p { margin: 0; }

/* Tooltip for disabled swatches - use title attribute instead (browser native) */
/* The X overlay uses ::before/::after so we can't use pseudo-elements for tooltips */

/* Slight hover effect for disabled items to show they're interactive for viewing */
.single-product .om-variations-wrapper .om-variation-type-image > a.disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-image > a.permanent-disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-button > a.disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-button > a.permanent-disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-color > a.disabled:hover,
.single-product .om-variations-wrapper .om-variation-type-color > a.permanent-disabled:hover {
  opacity: 0.6; /* Slightly brighten on hover to show it's responsive */
}

/* Stop making the left column a flex container - allows description to be block element underneath */
.product-equal-height ul.products li.product .loop-button-wrap {
  display: block !important;   /* was flex/-ms-flexbox */
  -ms-flex: none !important;   /* undo flex:1 in old IE rules */
  flex: none !important;       /* in case it's set elsewhere */
  align-items: unset !important;
}

.product-equal-height ul.wc-block-grid__products li.wc-block-grid__product .loop-button-wrap {
  display: block !important;
  -ms-flex: none !important;
  flex: none !important;
  align-items: unset !important;
}

/* Override Botiga theme margin on variations_form in product archives */
.product-equal-height ul.wc-block-grid__products li.wc-block-grid__product .variations_form,
.product-equal-height ul.wc-block-grid__products li.product .variations_form,
.product-equal-height ul.products li.wc-block-grid__product .variations_form,
.product-equal-height ul.products li.product .variations_form {
  margin-bottom: 0;
}

/* ========================================
   MULTI-SELECT MODE STYLES
   ======================================== */

/* Multi-select container - positioned ABOVE dropdown/swatches for visibility */
.om-multi-select-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e5e5;
  min-height: 90px; /* Reserved space to prevent UI shifting when selections change */
  transition: background-color 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}

/* Summary section - always visible with reserved space */
.om-multi-select-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-height: 50px; /* Reserve space for summary content */
}

/* Selected count display */
.om-multi-select-count {
  font-size: 14px;
  color: #666;
  font-weight: 600;
}

/* Selected names list */
.om-multi-select-names {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  max-height: 80px;
  min-height: 20px; /* Reserve minimum space */
  overflow-y: auto;
  padding-inline-end: 10px;
}

/* Empty placeholder state - visible but subtle */
.om-multi-select-names.om-empty-placeholder {
  color: #999;
  font-style: italic;
}

/* Prompt message - shown when no selections made */
.om-multi-select-prompt {
  font-size: 15px;
  color: #666;
  line-height: 1.5;
  padding: 10px 0;
}

/* Success state styling */
.om-multi-select-success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
}

.om-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #4CAF50;
  color: white;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50%;
  flex-shrink: 0;
}

.om-success-message {
  font-size: 16px;
  color: var(--aieo-color-success, #15803d);
  font-weight: 500;
  line-height: 1.4;
}

/* Success state container styling */
.om-multi-select-container.om-success-state {
  background-color: #f0f7f0;
  border-color: #c8e6c9;
  border-radius: var(--aieo-shape-control, 6px);
  padding: 15px;
  margin-bottom: 20px;
}

/* Button position "below" mode - separate containers */
.om-multi-select-container.om-multi-select-message-container {
  min-height: auto;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: none;
}

.om-multi-select-container.om-multi-select-button-container {
  min-height: auto;
  padding-top: 15px;
  padding-bottom: 0;
  margin-top: 15px;
  margin-bottom: 10px;
  border-bottom: none;
  border-top: 1px solid #e5e5e5;
}

.om-multi-select-container.om-success-state .om-multi-select-add-to-cart {
  opacity: 0.5;
  pointer-events: none;
}

/* Subtotal display */
.om-multi-select-subtotal {
  font-size: 15px;
  color: #333;
  margin-top: 4px;
}

.om-multi-select-subtotal strong {
  font-size: 16px;
  color: #111;
}

/* "Already in cart" indicator in summary */
.om-multi-select-in-cart {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #46b450;
  font-weight: 500;
  margin-top: 6px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #f0fdf0 0%, #e8f8e8 100%);
  border-radius: var(--aieo-shape-control, 4px);
  border-inline-start: 3px solid #46b450;
}

.om-multi-select-in-cart .om-cart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #46b450;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
}

/* Multi-select add to cart button */
.om-multi-select-add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--aieo-shape-button, 4px);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.om-multi-select-add-to-cart.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.om-multi-select-add-to-cart.loading {
  position: relative;
  pointer-events: none;
}

.om-multi-select-add-to-cart.loading::after {
  content: "";
  position: absolute;
  inset-inline-end: 12px;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: om-spin 0.8s linear infinite;
}

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

/* Multi-selected swatch state - checkbox-like appearance */
.om-multi-select-mode .om-variation-item.om-multi-selected {
  position: relative;
}

/* MULTI-SELECT MODE: Hide default add-to-cart immediately via CSS (no CLS) */
/* Uses body class added by PHP for maximum browser compatibility */
/* MULTI-SELECT MODE: Hide default add to cart elements */
.variations_form.om-multi-select-enabled .single_add_to_cart_button,
.variations_form.om-multi-select-enabled .woocommerce-variation-add-to-cart,
.variations_form.om-multi-select-enabled > .quantity,
.variations_form.om-multi-select-enabled .woocommerce-variation-add-to-cart .quantity {
  display: none !important;
}

/* MULTI-SELECT MODE: Hide variation price below swatches - not needed */
.variations_form.om-multi-select-enabled .woocommerce-variation.single_variation,
.variations_form.om-multi-select-enabled .woocommerce-variation-price,
.variations_form.om-multi-select-enabled .single_variation_wrap .woocommerce-variation {
  display: none !important;
}

/* MULTI-SELECT MODE: Hide original reset link position - we move it to button area */
.variations_form.om-multi-select-enabled .reset_variations {
  display: none !important;
  visibility: hidden !important;
}

/* Until the multi-select's script has built its boxes (at the visitor's first sign of life: the owner keeps them
 * script-built, 28 Oct 2026), the form already looks as they will leave it: WooCommerce's Clear link hidden, and the
 * boxes' places kept by the form's ::before and ::after at the boxes' own heights, so building them moves nothing
 * (rooster-admin-ca, 30 Oct 2026: 0.0087 of layout shift on a computer's first mouse move). The grid only: the
 * drop-down puts its list in the grid's place, the owner's declared exception. */
.variations_form:has(.om-variations-wrapper[data-multi-select="1"]) .reset_variations {
  display: none !important;
}

.variations_form {
  --aieo-ms-message-h: 60px; /* the message box over the swatches (the Add box below them) */
  --aieo-ms-button-h: 60px;  /* the Add / Clear box under them */
  --aieo-ms-main-h: 122px;   /* the one box over them (the Add box above them) */
}

/* A phone's column: a prompt or an Add label that wraps (the Greek ones do) still fits its box. */
@media (max-width: 599px) {
  .variations_form {
    --aieo-ms-message-h: 75px;
    --aieo-ms-button-h: 84px;
    --aieo-ms-main-h: 161px;
  }
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]) .om-multi-select-container {
  box-sizing: border-box;
  min-height: var(--aieo-ms-main-h);
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]) .om-multi-select-container.om-multi-select-message-container {
  min-height: var(--aieo-ms-message-h);
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]) .om-multi-select-container.om-multi-select-button-container {
  min-height: var(--aieo-ms-button-h);
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"]):not(.om-multi-select-enabled)::before {
  content: "";
  display: block;
  grid-column: 1 / -1; /* a theme's form that is a grid (Rooster Zero's): across it, as the boxes are */
  height: var(--aieo-ms-main-h);
  margin-bottom: 20px;
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"][data-ms-place="below"]):not(.om-multi-select-enabled)::before {
  height: var(--aieo-ms-message-h);
  margin-bottom: 10px;
}

.variations_form:has(.om-variations-wrapper[data-multi-select="1"][data-display-style="grid"][data-ms-place="below"]):not(.om-multi-select-enabled)::after {
  content: "";
  display: block;
  grid-column: 1 / -1;
  height: var(--aieo-ms-button-h);
  margin-top: 15px;
  margin-bottom: 10px;
}

/* Reset link styling when moved beside Add to Cart button */
.om-multi-select-reset {
  font-size: 14px;
  color: #666;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.om-multi-select-reset:hover {
  color: #333;
  text-decoration: underline;
}

/* Button row - Add to Cart and Reset side by side */
.om-multi-select-button-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* DROPDOWN MODE: Hide swatch grid immediately via CSS (no JS flicker) */
.om-multi-select-dropdown-mode .om-variation-type-image,
.om-multi-select-dropdown-mode .om-variation-type-color,
.om-multi-select-dropdown-mode .om-variation-type-button {
  display: none !important;
}

/* Checkmark badge element for selected swatches (uses real DOM element, not pseudo) */
.om-multi-select-checkmark {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  width: 18px;
  height: 18px;
  background-color: #4CAF50;
  color: white;
  font-size: 11px;
  font-weight: bold;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* For image swatches - different positioning */
.om-multi-select-mode .om-variation-type-image .om-multi-select-checkmark {
  top: -8px;
  inset-inline-end: -8px;
}

/* For color swatches - smaller checkmark */
.om-multi-select-mode .om-variation-type-color .om-multi-select-checkmark {
  width: 14px;
  height: 14px;
  font-size: 9px;
  line-height: 14px;
  top: -4px;
  inset-inline-end: -4px;
}

/* For button swatches - position inside */
.om-multi-select-mode .om-variation-type-button .om-multi-select-checkmark {
  top: -5px;
  inset-inline-end: -5px;
}

/* Multi-select notices: below the Add button (FB7), its result and what a partial add left out. */
.om-multi-select-notice,
.om-multi-select-left-out {
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: var(--aieo-shape-control, 4px);
}

/* Enhanced hover state for multi-select mode */
.om-multi-select-mode .om-variation-item:not(.disabled):not(.permanent-disabled) {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.om-multi-select-mode .om-variation-item:not(.disabled):not(.permanent-disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Make sure multi-select swatches have proper overflow for checkmark */
.om-multi-select-mode .om-variation-type-image,
.om-multi-select-mode .om-variation-type-color,
.om-multi-select-mode .om-variation-type-button {
  overflow: visible;
}

.om-multi-select-mode .om-variation-item {
  overflow: visible;
}

/* ========================================
   MULTI-SELECT DROPDOWN MODE
   Mobile-friendly dropdown list with checkboxes
   ======================================== */

.om-multi-select-dropdown {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* Dropdown Header (toggle button) */
.om-multi-select-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 12px 16px;
  font: inherit;
  text-align: start;
  color: var(--rc-color-text, inherit);
  appearance: none;
  background-color: var(--rc-color-background, #fff);
  border: 1px solid var(--rc-color-control-line, #ddd);
  border-radius: var(--aieo-shape-control, 4px);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}
.om-multi-select-dropdown-header:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
html[data-rooster-design="theme"] .om-multi-select-dropdown-header:focus-visible {
  outline: none;
  box-shadow: var(--wp--custom--rooster--focus-ring);
}

.om-multi-select-dropdown-header:hover {
  border-color: var(--rc-color-text, #999);
}

.om-multi-select-dropdown.open .om-multi-select-dropdown-header {
  border-color: var(--rc-color-text, #333);
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}

.om-multi-select-dropdown-title {
  font-weight: 500;
}

.om-multi-select-dropdown-toggle {
  display: inline-flex;
  font-size: 10px;
  color: var(--rc-color-text-muted, #666);
  transition: transform 0.2s ease;
}

.om-multi-select-dropdown.open .om-multi-select-dropdown-toggle {
  transform: rotate(180deg);
}

/* Dropdown List */
.om-multi-select-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  inset-inline-end: 0;
  max-height: 300px;
  overflow-y: auto;
  color: var(--rc-color-text, inherit);
  background-color: var(--rc-color-background, #fff);
  border: 1px solid var(--rc-color-text, #333);
  border-top: none;
  border-end-start-radius: var(--aieo-shape-control, 4px);
  border-end-end-radius: var(--aieo-shape-control, 4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.om-multi-select-dropdown.open .om-multi-select-dropdown-list {
  display: block;
}

/* The rows are the card list's (aieo-card.css); the list's own edges are the panel's, so no second rule under the
 * header nor over the footer. */
.om-multi-select-dropdown-list .rc-vlist {
  border-block: 0;
}

/* The open list's own "Add to cart", pinned to its foot: the list lies over the row's Add button (rooster-admin-ca,
 * 29 Oct 2026). It scrolls with nothing; the items scroll under it. */
.om-multi-select-dropdown-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding: 12px 16px;
  background-color: var(--rc-color-background, #fff);
  border-top: 1px solid var(--rc-color-border, #eee);
}
.om-multi-select-dropdown-footer .om-multi-select-panel-add {
  display: block;
  width: 100%;
  margin: 0;
}
/* The selection over the Add, as the shop's options list says it (aieo-card.css, .rc-panel__sum). */
.om-multi-select-dropdown-footer .rc-panel__sum {
  margin-bottom: 8px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .om-multi-select-dropdown {
    max-width: 100%;
  }

  .om-multi-select-dropdown-list {
    max-height: 50vh;
  }

  /* Larger touch targets */
  .om-multi-select-dropdown-header {
    padding: 14px 16px;
    min-height: 48px;
  }
}

/* Scrollbar styling for dropdown list */
.om-multi-select-dropdown-list::-webkit-scrollbar {
  width: 6px;
}

.om-multi-select-dropdown-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.om-multi-select-dropdown-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.om-multi-select-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* ========================================
   DROPDOWN OUT-OF-STOCK STYLES
   ======================================== */

/* Out of stock text styling */
.om-out-of-stock-text {
  color: #b43232;
  font-weight: 500;
  font-size: 12px;
}

/* ========================================
   QUANTITY SELECTOR STYLES
   ======================================== */

/* Multi-select add-to-cart button - Pink style */
/* Base styles - exclude disabled buttons to allow disabled styles to take precedence */
.om-multi-select-container .om-add-to-cart-button:not(:disabled):not(.disabled),
.om-multi-select-container button.om-add-to-cart-button:not(:disabled):not(.disabled),
.om-multi-select-container .om-multi-select-add-to-cart:not(:disabled):not(.disabled) {
  background: rgba(255, 182, 193, 0.6) !important;
  background-color: rgba(255, 182, 193, 0.6) !important;
  border: 1px solid rgba(255, 105, 180, 0.5) !important;
  border-radius: var(--aieo-shape-button, 10px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.4), rgba(255, 105, 180, 0.3)) !important;
  text-transform: none !important;
  padding: 10px 20px !important;
  font-size: 16px !important;
  text-align: center !important;
  text-decoration: none !important;
  display: inline-block !important;
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  transition: all 0.2s ease !important;
}

/* Non-background properties for ALL button states (including disabled) */
.om-multi-select-container .om-add-to-cart-button,
.om-multi-select-container button.om-add-to-cart-button,
.om-multi-select-container .om-multi-select-add-to-cart {
  border-radius: var(--aieo-shape-button, 10px) !important;
  text-transform: none !important;
  padding: 10px 20px !important;
  font-size: 16px !important;
  text-align: center !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: all 0.2s ease !important;
}

.om-multi-select-container .om-add-to-cart-button:hover,
.om-multi-select-container button.om-add-to-cart-button:hover,
.om-multi-select-container .om-multi-select-add-to-cart:hover {
  background: rgba(255, 105, 180, 0.5) !important;
  background-color: rgba(255, 105, 180, 0.5) !important;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Disabled state - Pink style faded, override browser/theme defaults */
.om-multi-select-container .om-add-to-cart-button:disabled,
.om-multi-select-container .om-add-to-cart-button.disabled,
.om-multi-select-container button.om-add-to-cart-button:disabled,
.om-multi-select-container button.om-add-to-cart-button.disabled,
.om-multi-select-container .om-multi-select-add-to-cart:disabled,
.om-multi-select-container .om-multi-select-add-to-cart.disabled,
button.om-multi-select-add-to-cart:disabled,
button.om-multi-select-add-to-cart.disabled,
.om-multi-select-button-container button.om-multi-select-add-to-cart:disabled,
.om-multi-select-button-container button.om-multi-select-add-to-cart.disabled,
.om-multi-select-button-row button.om-multi-select-add-to-cart:disabled,
.om-multi-select-button-row button.om-multi-select-add-to-cart.disabled,
button[type="button"].om-multi-select-add-to-cart:disabled,
button[type="button"].om-multi-select-add-to-cart.disabled,
button.om-multi-select-add-to-cart.button.alt:disabled,
button.om-multi-select-add-to-cart.button.alt.disabled,
/* Override theme button styles with maximum specificity */
.single-product button.om-multi-select-add-to-cart.button.alt:disabled,
.single-product button.om-multi-select-add-to-cart.button.alt.disabled,
.single-product .om-multi-select-container button.om-multi-select-add-to-cart:disabled,
.single-product .om-multi-select-container button.om-multi-select-add-to-cart.disabled,
.woocommerce button.om-multi-select-add-to-cart.button.alt:disabled,
.woocommerce button.om-multi-select-add-to-cart.button.alt.disabled,
.woocommerce .om-multi-select-container button:disabled,
.woocommerce .om-multi-select-container button.disabled,
.woocommerce-page button.om-multi-select-add-to-cart:disabled,
.woocommerce-page button.om-multi-select-add-to-cart.disabled,
body button.om-multi-select-add-to-cart.button.alt:disabled,
body button.om-multi-select-add-to-cart.button.alt.disabled,
body .om-multi-select-container button.om-multi-select-add-to-cart:disabled,
body .om-multi-select-container button.om-multi-select-add-to-cart.disabled {
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  background: rgba(255, 182, 193, 0.4) !important;
  background-color: rgba(255, 182, 193, 0.4) !important;
  border: 1px solid rgba(255, 105, 180, 0.3) !important;
  border-radius: var(--aieo-shape-button, 10px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.3), rgba(255, 105, 180, 0.2)) !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* CRITICAL: Override theme's :not(.has-background) selectors for disabled button */
button.om-multi-select-add-to-cart:not(.has-background):disabled,
button.om-multi-select-add-to-cart:not(.has-background).disabled,
button.om-multi-select-add-to-cart.button:not(.has-background):disabled,
button.om-multi-select-add-to-cart.button:not(.has-background).disabled,
button.om-multi-select-add-to-cart.button.alt:not(.has-background):disabled,
button.om-multi-select-add-to-cart.button.alt:not(.has-background).disabled,
.om-multi-select-add-to-cart:not(.has-background):disabled,
.om-multi-select-add-to-cart:not(.has-background).disabled {
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  background: rgba(255, 182, 193, 0.4) !important;
  background-color: rgba(255, 182, 193, 0.4) !important;
  border: 1px solid rgba(255, 105, 180, 0.3) !important;
  border-radius: var(--aieo-shape-button, 10px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.3), rgba(255, 105, 180, 0.2)) !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Update mode - slightly different tint */
.om-multi-select-container .om-add-to-cart-button.om-update-mode,
.om-multi-select-container button.om-add-to-cart-button.om-update-mode,
.om-multi-select-container .om-multi-select-add-to-cart.om-update-mode {
  background: rgba(245, 40, 145, 0.1) !important;
  background-color: rgba(245, 40, 145, 0.1) !important;
  background-image: linear-gradient(to right, rgba(245, 40, 145, 0.05), rgba(245, 40, 145, 0.15)) !important;
}

.om-multi-select-container .om-add-to-cart-button.om-update-mode:hover,
.om-multi-select-container button.om-add-to-cart-button.om-update-mode:hover,
.om-multi-select-container .om-multi-select-add-to-cart.om-update-mode:hover {
  background: rgba(245, 40, 145, 0.2) !important;
  background-color: rgba(245, 40, 145, 0.2) !important;
}

/* ========================================
   VARIATION NAME IN PRODUCT TITLE
   ======================================== */

/* The chosen variation's name under the product title, on its own line (aieo-swatches.js fills
 * it; the one rule, there were two). Empty, it takes no space: the script appends it once it runs,
 * and the title grew 8px then (theme brief, 28 Oct 2026). */
.om-ptitle-variation-name {
  display: block;
  margin-top: 8px;
  font-size: var(--om-variation-name-font-size, 16px);
  color: var(--om-variation-name-color, #666);
  font-weight: normal;
  line-height: 1.4;
}
.om-ptitle-variation-name:empty {
  display: none;
}
html[data-rooster-design="theme"] .om-ptitle-variation-name {
  color: var(--om-variation-name-color, var(--wp--preset--color--muted, #666));
}

/* ========================================
   RECOMMENDATION/RELATED PRODUCTS CONTEXT
   Apply archive-style swatch styling when swatches
   appear in related products, cross-sells, up-sells,
   or other recommendation sections on single product pages.
   ======================================== */

/* Target swatches inside common WooCommerce recommendation containers */
.related.products .om-product-swatches,
.cross-sells .om-product-swatches,
.up-sells .om-product-swatches,
section.related .om-product-swatches,
section.cross-sells .om-product-swatches,
section.up-sells .om-product-swatches,
.woocommerce-related-products .om-product-swatches,
.products.related .om-product-swatches,
.om-ppe-recently-viewed-section .om-product-swatches,
.merchant-recently-viewed-products .om-product-swatches {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.related.products .om-product-swatches form.variations_form,
.cross-sells .om-product-swatches form.variations_form,
.up-sells .om-product-swatches form.variations_form,
section.related .om-product-swatches form.variations_form,
section.cross-sells .om-product-swatches form.variations_form,
section.up-sells .om-product-swatches form.variations_form,
.woocommerce-related-products .om-product-swatches form.variations_form,
.products.related .om-product-swatches form.variations_form,
.om-ppe-recently-viewed-section .om-product-swatches form.variations_form,
.merchant-recently-viewed-products .om-product-swatches form.variations_form {
  width: auto;
  margin: 0;
}

.related.products .om-product-swatches .variations,
.related.products .om-product-swatches .variations tbody,
.related.products .om-product-swatches .variations tr,
.cross-sells .om-product-swatches .variations,
.cross-sells .om-product-swatches .variations tbody,
.cross-sells .om-product-swatches .variations tr,
.up-sells .om-product-swatches .variations,
.up-sells .om-product-swatches .variations tbody,
.up-sells .om-product-swatches .variations tr,
section.related .om-product-swatches .variations,
section.related .om-product-swatches .variations tbody,
section.related .om-product-swatches .variations tr,
section.cross-sells .om-product-swatches .variations,
section.cross-sells .om-product-swatches .variations tbody,
section.cross-sells .om-product-swatches .variations tr,
section.up-sells .om-product-swatches .variations,
section.up-sells .om-product-swatches .variations tbody,
section.up-sells .om-product-swatches .variations tr,
.woocommerce-related-products .om-product-swatches .variations,
.woocommerce-related-products .om-product-swatches .variations tbody,
.woocommerce-related-products .om-product-swatches .variations tr,
.products.related .om-product-swatches .variations,
.products.related .om-product-swatches .variations tbody,
.products.related .om-product-swatches .variations tr,
.om-ppe-recently-viewed-section .om-product-swatches .variations,
.om-ppe-recently-viewed-section .om-product-swatches .variations tbody,
.om-ppe-recently-viewed-section .om-product-swatches .variations tr,
.merchant-recently-viewed-products .om-product-swatches .variations,
.merchant-recently-viewed-products .om-product-swatches .variations tbody,
.merchant-recently-viewed-products .om-product-swatches .variations tr {
  width: auto;
  border: 0;
  margin: 0;
  padding: 0;
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.related.products .om-product-swatches .variations tr,
.cross-sells .om-product-swatches .variations tr,
.up-sells .om-product-swatches .variations tr,
section.related .om-product-swatches .variations tr,
section.cross-sells .om-product-swatches .variations tr,
section.up-sells .om-product-swatches .variations tr,
.woocommerce-related-products .om-product-swatches .variations tr,
.products.related .om-product-swatches .variations tr,
.om-ppe-recently-viewed-section .om-product-swatches .variations tr,
.merchant-recently-viewed-products .om-product-swatches .variations tr {
  flex-direction: column;
  gap: 8px;
}

.related.products .om-product-swatches .variations .label,
.cross-sells .om-product-swatches .variations .label,
.up-sells .om-product-swatches .variations .label,
section.related .om-product-swatches .variations .label,
section.cross-sells .om-product-swatches .variations .label,
section.up-sells .om-product-swatches .variations .label,
.woocommerce-related-products .om-product-swatches .variations .label,
.products.related .om-product-swatches .variations .label,
.om-ppe-recently-viewed-section .om-product-swatches .variations .label,
.merchant-recently-viewed-products .om-product-swatches .variations .label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.related.products .om-product-swatches .variations .value,
.cross-sells .om-product-swatches .variations .value,
.up-sells .om-product-swatches .variations .value,
section.related .om-product-swatches .variations .value,
section.cross-sells .om-product-swatches .variations .value,
section.up-sells .om-product-swatches .variations .value,
.woocommerce-related-products .om-product-swatches .variations .value,
.products.related .om-product-swatches .variations .value,
.om-ppe-recently-viewed-section .om-product-swatches .variations .value,
.merchant-recently-viewed-products .om-product-swatches .variations .value {
  display: flex;
  justify-content: center;
  align-items: center;
}

.related.products .om-product-swatches .om-variation-type-image,
.cross-sells .om-product-swatches .om-variation-type-image,
.up-sells .om-product-swatches .om-variation-type-image,
section.related .om-product-swatches .om-variation-type-image,
section.cross-sells .om-product-swatches .om-variation-type-image,
section.up-sells .om-product-swatches .om-variation-type-image,
.woocommerce-related-products .om-product-swatches .om-variation-type-image,
.products.related .om-product-swatches .om-variation-type-image,
.om-ppe-recently-viewed-section .om-product-swatches .om-variation-type-image,
.merchant-recently-viewed-products .om-product-swatches .om-variation-type-image {
  gap: 6px;
  justify-content: center;
}

.related.products .om-product-swatches .single_variation_wrap,
.related.products .om-product-swatches .reset_variations_alert,
.cross-sells .om-product-swatches .single_variation_wrap,
.cross-sells .om-product-swatches .reset_variations_alert,
.up-sells .om-product-swatches .single_variation_wrap,
.up-sells .om-product-swatches .reset_variations_alert,
section.related .om-product-swatches .single_variation_wrap,
section.related .om-product-swatches .reset_variations_alert,
section.cross-sells .om-product-swatches .single_variation_wrap,
section.cross-sells .om-product-swatches .reset_variations_alert,
section.up-sells .om-product-swatches .single_variation_wrap,
section.up-sells .om-product-swatches .reset_variations_alert,
.woocommerce-related-products .om-product-swatches .single_variation_wrap,
.woocommerce-related-products .om-product-swatches .reset_variations_alert,
.products.related .om-product-swatches .single_variation_wrap,
.products.related .om-product-swatches .reset_variations_alert,
.om-ppe-recently-viewed-section .om-product-swatches .single_variation_wrap,
.om-ppe-recently-viewed-section .om-product-swatches .reset_variations_alert,
.merchant-recently-viewed-products .om-product-swatches .single_variation_wrap,
.merchant-recently-viewed-products .om-product-swatches .reset_variations_alert {
  display: none !important;
}

/* Add to cart button styling in recommendations */
.related.products .om-product-swatches .om-add-to-cart-button,
.cross-sells .om-product-swatches .om-add-to-cart-button,
.up-sells .om-product-swatches .om-add-to-cart-button,
section.related .om-product-swatches .om-add-to-cart-button,
section.cross-sells .om-product-swatches .om-add-to-cart-button,
section.up-sells .om-product-swatches .om-add-to-cart-button,
.woocommerce-related-products .om-product-swatches .om-add-to-cart-button,
.products.related .om-product-swatches .om-add-to-cart-button,
.om-ppe-recently-viewed-section .om-product-swatches .om-add-to-cart-button,
.merchant-recently-viewed-products .om-product-swatches .om-add-to-cart-button {
  align-self: center;
}

/* More variations badge styling in recommendations */
.related.products .om-product-swatches .om-more-variations,
.cross-sells .om-product-swatches .om-more-variations,
.up-sells .om-product-swatches .om-more-variations,
section.related .om-product-swatches .om-more-variations,
section.cross-sells .om-product-swatches .om-more-variations,
section.up-sells .om-product-swatches .om-more-variations,
.woocommerce-related-products .om-product-swatches .om-more-variations,
.products.related .om-product-swatches .om-more-variations,
.om-ppe-recently-viewed-section .om-product-swatches .om-more-variations,
.merchant-recently-viewed-products .om-product-swatches .om-more-variations {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 4px 8px;
  background-color: #f5f5f5;
  color: #333;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--aieo-shape-button, 4px);
  border: 1px solid #ddd;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.related.products .om-product-swatches .om-more-variations:hover,
.cross-sells .om-product-swatches .om-more-variations:hover,
.up-sells .om-product-swatches .om-more-variations:hover,
section.related .om-product-swatches .om-more-variations:hover,
section.cross-sells .om-product-swatches .om-more-variations:hover,
section.up-sells .om-product-swatches .om-more-variations:hover,
.woocommerce-related-products .om-product-swatches .om-more-variations:hover,
.products.related .om-product-swatches .om-more-variations:hover,
.om-ppe-recently-viewed-section .om-product-swatches .om-more-variations:hover,
.merchant-recently-viewed-products .om-product-swatches .om-more-variations:hover {
  background-color: #e8e8e8;
  border-color: #ccc;
  text-decoration: none;
  color: #333;
}

/* ========================================================================
   SEE ALL VARIATIONS - Text Link
   ======================================================================== */

.om-see-all-variations-link {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
  text-align: center;
}

.om-see-all-variations-link:hover {
  color: #333;
  text-decoration: underline;
}

/* Mobile styles for See All Variations link */
@media (max-width: 768px) {
  .om-see-all-variations-link {
    font-size: 12px;
  }
}

/* ========================================================================
   SEE ALL VARIATIONS - Modal
   ======================================================================== */

/* Body class when modal is open */
body.om-modal-open {
  overflow: hidden;
}

/* Modal container */
.om-modal {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal overlay */
.om-modal-overlay {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Modal container */
.om-modal-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  background-color: #fff;
  border-radius: var(--aieo-shape-panel, 8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Modal header */
.om-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.om-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.om-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--aieo-shape-button, 4px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.om-modal-close:hover {
  background-color: #f5f5f5;
  color: #333;
}

/* Modal body */
.om-modal-body {
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0; /* Required for flex children to allow scrolling */
}

/* Product info in modal */
.om-modal-product-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

/* Image wrapper for skeleton loading */
.om-modal-image-wrapper {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--aieo-shape-media, 4px);
  overflow: hidden;
}

/* Loading skeleton animation for product info */
.om-modal-product-info.om-loading-skeleton .om-modal-product-title,
.om-modal-product-info.om-loading-skeleton .om-modal-view-product {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: om-skeleton-loading 1.5s infinite;
  color: transparent !important;
  border-radius: var(--aieo-shape-panel, 4px);
}

/* Hide the image completely during loading to prevent broken image icon */
.om-modal-product-info.om-loading-skeleton .om-modal-product-image {
  display: none;
}

/* Show skeleton on the image wrapper during loading */
.om-modal-product-info.om-loading-skeleton .om-modal-image-wrapper {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: om-skeleton-loading 1.5s infinite;
}

.om-modal-product-info.om-loading-skeleton .om-modal-product-title {
  min-width: 150px;
  min-height: 20px;
}

.om-modal-product-info.om-loading-skeleton .om-modal-view-product {
  min-width: 100px;
  min-height: 16px;
  display: inline-block;
}

@keyframes om-skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.om-modal-product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--aieo-shape-media, 4px);
  border: 1px solid #eee;
  flex-shrink: 0;
  background-color: #f5f5f5;
}

/* Hide broken image icon when src is empty or not set */
.om-modal-product-image:not([src]),
.om-modal-product-image[src=""] {
  visibility: hidden;
  border: none;
}

.om-modal-product-details {
  flex: 1;
  min-width: 0;
}

.om-modal-product-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.om-modal-view-product {
  font-size: 13px;
  color: #666;
  text-decoration: underline;
}

.om-modal-view-product:hover {
  color: #333;
}

/* Loading state */
.om-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
}

.om-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: om-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

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

/* Error state */
.om-modal-error {
  text-align: center;
  padding: 40px 20px;
  color: #d63638;
  font-size: 14px;
}

/* Form wrapper in modal */
.om-modal-form-wrapper {
  width: 100%;
}

/* Reset some form styles in modal context */
.om-modal-form-wrapper .variations_form {
  margin: 0;
  padding: 0;
}

/* Show quantity selector in modal with proper styling */
.om-modal-form-wrapper .quantity {
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  border: 2px solid var(--bt-color-body-text, #212121);
  height: 50px;
  max-width: 200px;
  margin-inline-start: auto;
  margin-inline-end: auto;
}

/* Show quantity plus/minus buttons in modal */
.om-modal-form-wrapper .quantity .botiga-quantity-plus,
.om-modal-form-wrapper .quantity .botiga-quantity-minus {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 16px;
  color: var(--bt-color-body-text, #212121);
  border: none;
  background: transparent;
  text-align: center;
  text-decoration: none;
  outline: none;
  cursor: pointer;
  height: 100%;
  min-width: 40px;
  transition: color 0.2s ease;
}

.om-modal-form-wrapper .quantity .botiga-quantity-plus:hover,
.om-modal-form-wrapper .quantity .botiga-quantity-minus:hover {
  color: var(--bt-color-link-hover, #757575);
}

/* Style the quantity input in modal */
.om-modal-form-wrapper .quantity .qty {
  text-align: center;
  padding: 0;
  border: none;
  width: 60px;
  min-height: 0;
  background: transparent !important;
  font-size: 16px;
  font-weight: 500;
  -moz-appearance: textfield;
}

/* Hide spinner arrows on number input (use custom buttons instead) */
.om-modal-form-wrapper .quantity .qty::-webkit-outer-spin-button,
.om-modal-form-wrapper .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.om-modal-form-wrapper .quantity .qty:focus {
  box-shadow: none;
  outline: none;
}

.om-modal-form-wrapper .botiga-single-addtocart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.om-modal-form-wrapper .botiga-single-addtocart-wrapper .quantity {
  margin: 0;
}

/* Style the swatches container in modal */
.om-modal-form-wrapper .om-variations-wrapper {
  margin-bottom: 20px;
}

/* Make swatches wrap properly in modal */
.om-modal-form-wrapper .om-variation-type-image,
.om-modal-form-wrapper .om-variation-type-color,
.om-modal-form-wrapper .om-variation-type-button {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Style individual swatches in modal - use product page sizes */
.om-modal-form-wrapper .om-variation-item {
  cursor: pointer;
}

/* Hide the "See All Variations" link inside modal */
.om-modal-form-wrapper .om-see-all-variations-link,
.om-modal-form-wrapper .om-more-variations {
  display: none !important;
}

/* Style the price display in modal */
.om-modal-form-wrapper .woocommerce-variation-price {
  text-align: center;
  margin: 16px 0;
  font-size: 18px;
  font-weight: 600;
}

.om-modal-form-wrapper .woocommerce-variation-price .price {
  color: #333;
}

.om-modal-form-wrapper .woocommerce-variation-price del {
  opacity: 0.6;
  margin-inline-end: 8px;
}

.om-modal-form-wrapper .woocommerce-variation-price ins {
  text-decoration: none;
  color: #d63638;
}

/* Style the add to cart button in modal - Pink theme */
.om-modal-form-wrapper .single_add_to_cart_button {
  width: 100%;
  padding: 14px 24px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  background: rgba(255, 182, 193, 0.6) !important;
  background-color: rgba(255, 182, 193, 0.6) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.4), rgba(255, 105, 180, 0.3)) !important;
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  border: 1px solid rgba(255, 105, 180, 0.5) !important;
  border-radius: 10px !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  margin-top: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  /* Disable any animations from animated-add-to-cart module */
  animation: none !important;
  transform: none !important;
}

.om-modal-form-wrapper .single_add_to_cart_button:hover:not(.disabled) {
  background: rgba(255, 105, 180, 0.5) !important;
  background-color: rgba(255, 105, 180, 0.5) !important;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15) !important;
  animation: none !important;
  transform: none !important;
}

.om-modal-form-wrapper .single_add_to_cart_button.disabled {
  background: rgba(255, 182, 193, 0.4) !important;
  background-color: rgba(255, 182, 193, 0.4) !important;
  background-image: linear-gradient(to right, rgba(255, 182, 193, 0.3), rgba(255, 105, 180, 0.2)) !important;
  color: var(--primary-theme-blue-colour, var(--bt-color-button, #212121)) !important;
  opacity: 0.5 !important;
  cursor: not-allowed;
}

.om-modal-form-wrapper .single_add_to_cart_button.om-adding {
  opacity: 0.7;
  cursor: wait;
}

.om-modal-form-wrapper .single_add_to_cart_button.om-added,
.om-modal-form-wrapper .single_add_to_cart_button.added {
  background: #46b450 !important;
  background-color: #46b450 !important;
  background-image: none !important;
  color: #fff !important;
}

/* View Product Page button in modal */
.om-modal-view-product-btn {
  display: block;
  width: 100%;
  padding: 12px 24px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  color: #666;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: var(--aieo-shape-button, 10px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.om-modal-view-product-btn:hover {
  color: #333;
  border-color: #999;
  background: #f5f5f5;
  text-decoration: none;
}

/* Hide reset link in modal */
.om-modal-form-wrapper .reset_variations {
  display: none !important;
}

/* Style variation description/availability in modal */
.om-modal-form-wrapper .woocommerce-variation-description,
.om-modal-form-wrapper .woocommerce-variation-availability {
  text-align: center;
  margin: 8px 0;
  font-size: 13px;
  color: #666;
}

/* Style the attribute labels in modal */
.om-modal-form-wrapper .variations td.label {
  display: none;
}

.om-modal-form-wrapper .variations td.value {
  padding: 8px 0;
}

/* Center variations table in modal */
.om-modal-form-wrapper .variations {
  width: 100%;
  margin: 0 auto;
}

.om-modal-form-wrapper .variations tr {
  display: block;
  margin-bottom: 12px;
}

.om-modal-form-wrapper .variations td {
  display: block;
  width: 100%;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .om-modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .om-modal-header {
    padding: 12px 16px;
  }

  .om-modal-title {
    font-size: 16px;
  }

  .om-modal-body {
    padding: 16px;
  }

  .om-modal-product-info {
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .om-modal-product-image {
    width: 50px;
    height: 50px;
  }

  .om-modal-product-title {
    font-size: 14px;
  }

  .om-modal-variation-item {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .om-modal-variation-image img {
    width: 40px;
    height: 40px;
  }

  .om-modal-variation-info {
    flex: 1;
    min-width: calc(100% - 60px);
  }

  .om-modal-variation-name {
    font-size: 13px;
  }

  .om-modal-variation-add-btn {
    width: 100%;
    padding: 10px 16px;
    margin-top: 4px;
  }
}

/* ========================================
   CART SYNC - IN CART INDICATORS
   ======================================== */

/* Base in-cart indicator for swatches (image/color/button types) */
.om-variation-item.om-in-cart {
  position: relative;
  box-shadow: 0 0 0 3px #46b450 !important;
  border-color: #46b450 !important;
}

/* Only on a swatch without a hover label: the label is this same ::after, and the tick's place, size and
 * image leaked into it (a label stretched to the corner, a tick printed in it). The count says "in cart". */
.om-variation-item.om-in-cart:not([data-tooltip])::after {
  content: '';
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  width: 14px;
  height: 14px;
  background: #46b450 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/10px no-repeat;
  border-radius: 50%;
  z-index: 2;
}

/* Cart badge showing quantity */
.om-cart-badge {
  position: absolute;
  bottom: -6px;
  inset-inline-end: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #46b450;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  border-radius: var(--aieo-shape-chip, 9px);
  z-index: 3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Link-style swatches (image type) adjustment */
a.om-variation-item.om-in-cart {
  outline: 3px solid #46b450;
  outline-offset: 1px;
  box-shadow: none !important;
}

/* Multi-select grid mode - in cart */
.om-multi-select-grid .om-variation-grid-item.om-in-cart {
  border-color: #46b450;
  background-color: #f0fdf0;
}

.om-multi-select-grid .om-variation-grid-item.om-in-cart .om-grid-item-image {
  box-shadow: 0 0 0 2px #46b450;
}

/* Selected variation in sticky list that's also in cart */
.om-selected-variation-item.om-in-cart::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 6px;
  background: #46b450;
  border-radius: 50%;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .om-cart-badge {
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    line-height: 16px;
    bottom: -4px;
    inset-inline-end: -4px;
  }

  .om-variation-item.om-in-cart:not([data-tooltip])::after {
    width: 12px;
    height: 12px;
    top: -3px;
    inset-inline-end: -3px;
    background-size: 8px;
  }
}

/* ========================================
   CART SUMMARY - Shows items in cart
   ======================================== */

.om-cart-summary {
  background: linear-gradient(135deg, #f0fdf0 0%, #e8f8e8 100%);
  border: 1px solid #46b450;
  border-radius: var(--aieo-shape-card, 6px);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.om-cart-summary-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.om-cart-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #46b450;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.om-cart-summary-text {
  font-weight: 600;
  color: #1e4620;
  font-size: 14px;
}

.om-cart-summary-toggle {
  color: #46b450;
  text-decoration: underline;
  font-size: 13px;
  margin-inline-start: auto;
  cursor: pointer;
}

.om-cart-summary-toggle:hover {
  color: var(--aieo-color-success, #15803d);
}

.om-cart-summary-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(70, 180, 80, 0.3);
}

.om-cart-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.om-cart-summary-list li,
.om-cart-summary-list li.om-cart-summary-item {
  padding: 6px 0;
  margin: 0;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid rgba(70, 180, 80, 0.15);
  display: block;
}

.om-cart-summary-list li:last-child {
  border-bottom: none;
}

.om-cart-summary-subtotal {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid rgba(70, 180, 80, 0.5);
  font-size: 14px;
  color: #1e4620;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.om-cart-summary-subtotal strong {
  font-size: 15px;
  color: #1a5d1f;
}

/* Responsive */
@media screen and (max-width: 480px) {
  .om-cart-summary {
    padding: 10px 12px;
  }

  .om-cart-summary-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .om-cart-summary-toggle {
    margin-inline-start: 0;
    margin-top: 4px;
  }
}

/* ------------------------------------------------------------------------
 * Lean archive cards (contract C7 rule 11). The first HTML carries the chips
 * and the CTA; WooCommerce's variation form waits in a <template> and is
 * swapped in on the card's first pointer, touch or focus. Once in, the form
 * must never run past the card (it measured 444 px on a 390 px phone), and
 * on a coarse pointer every chip is at least a 24 px target.
 * --------------------------------------------------------------------- */
.om-product-swatches--archive > template { display: none; }
.om-product-swatches--archive { max-width: 100%; min-width: 0; box-sizing: border-box; }
.om-product-swatches--archive form.variations_form,
.om-product-swatches--archive .om-variations-wrapper,
.om-product-swatches--archive .om-variation-type-select,
.om-product-swatches--archive .om-variation-type-select select {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.om-product-swatches--archive .om-variation-type-select select { width: 100%; }
@media (pointer: coarse) {
  .om-product-swatches--archive .om-variation-item {
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
/* RTL and Arabic-script locales (brief 11.3): mirrored slide-ins and arrows, no letter-spacing on connected scripts. Dual copy where the sheet is shared. */
[dir="rtl"] .om-modal-close { transform: scaleX(-1); }

/* Under the theme's design authority (contract C2@2) the multi-select's add
 * button is the theme's own button, in the light and the dark scheme; the pink
 * above stays the stand-alone default. The repeated class (0,6,3) beats the
 * disabled and update-mode overrides above (up to 0,5,1). */
html[data-rooster-design="theme"] body button.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart,
html[data-rooster-design="theme"] body .om-multi-select-container .om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button {
  background: var(--wp--custom--rooster--button--background, var(--wp--preset--color--accent)) !important;
  background-image: none !important;
  color: var(--wp--custom--rooster--button--text, var(--wp--preset--color--on-accent, var(--wp--preset--color--bg))) !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-radius: var(--wp--custom--rooster--shape--button, var(--aieo-shape-button, 10px)) !important;
}
html[data-rooster-design="theme"] body button.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart:not(:disabled):not(.disabled):hover,
html[data-rooster-design="theme"] body .om-multi-select-container .om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button:not(:disabled):not(.disabled):hover {
  background: color-mix(in srgb, var(--wp--custom--rooster--button--background, var(--wp--preset--color--accent)) 85%, var(--wp--custom--rooster--button--away)) !important;
}
html[data-rooster-design="theme"] body button.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart.om-multi-select-add-to-cart:is(:disabled, .disabled),
html[data-rooster-design="theme"] body .om-multi-select-container .om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button.om-add-to-cart-button:is(:disabled, .disabled) {
  /* The same button, dimmed: the accent with its own text (theme brief, 28 Oct 2026). */
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

html[data-rooster-design="theme"] .om-multi-select-reset {
  color: var(--wp--preset--color--muted);
}
html[data-rooster-design="theme"] .om-multi-select-reset:hover {
  color: var(--wp--preset--color--accent-text, var(--wp--preset--color--fg));
}

/* Under the theme's design authority the whole drop-down and its summary follow the scheme: the
 * panel on bg with the border, fg text and muted prices, the rows' hover and the ticked tint mixed
 * from the same bg (so the text stays readable in dark), the stepper in the theme's field look
 * (theme brief, 28 Oct 2026: in dark the panel stayed white and a ticked row's text vanished). */
html[data-rooster-design="theme"] .om-multi-select-dropdown-header,
html[data-rooster-design="theme"] .om-multi-select-dropdown-list {
  background-color: var(--wp--preset--color--bg);
  border-color: var(--wp--preset--color--border);
  color: var(--wp--preset--color--fg);
}
html[data-rooster-design="theme"] .om-multi-select-dropdown-header:hover,
html[data-rooster-design="theme"] .om-multi-select-dropdown.open .om-multi-select-dropdown-header,
html[data-rooster-design="theme"] .om-multi-select-dropdown.open .om-multi-select-dropdown-list {
  border-color: var(--wp--preset--color--fg);
}
html[data-rooster-design="theme"] .om-multi-select-dropdown-title {
  color: var(--wp--preset--color--fg);
}
html[data-rooster-design="theme"] .om-multi-select-dropdown-toggle {
  color: var(--wp--preset--color--muted);
}

html[data-rooster-design="theme"] .om-multi-select-count,
html[data-rooster-design="theme"] .om-multi-select-subtotal strong {
  color: var(--wp--preset--color--fg);
}
html[data-rooster-design="theme"] .om-multi-select-names,
html[data-rooster-design="theme"] .om-multi-select-names.om-empty-placeholder,
html[data-rooster-design="theme"] .om-multi-select-prompt,
html[data-rooster-design="theme"] .om-multi-select-subtotal {
  color: var(--wp--preset--color--muted);
}
html[data-rooster-design="theme"] .om-multi-select-container.om-multi-select-button-container {
  border-top-color: var(--wp--preset--color--border);
}

/* Under the theme's design authority (contract C2@2), the multi-select's image swatches: one ring says "in the
 * cart" (the success colour, just outside the swatch, with no green frame under it); the count sits inside the
 * bottom corner in the colours of the floating cart's own count (aieo-side-cart.css), and the
 * pick's tick inside the top one in green (the owner's choice); nothing hangs over a neighbour or the row below. */
html[data-rooster-design="theme"] .om-variations-wrapper a.om-variation-item.om-in-cart {
  border-color: transparent !important;
  outline: 2px solid var(--wp--preset--color--success, #46b450);
  outline-offset: 1px;
  box-shadow: none !important;
}
/* Its keyboard focus: the theme's focus ring against the swatch, the cart's ring moved out past it (inside the
 * row's 12 px gap), so both show (census 5, FE-F1: the ring's `none` above had hidden the focus). */
html[data-rooster-design="theme"] .om-variations-wrapper a.om-variation-item.om-in-cart:focus-visible {
  outline-offset: 4px;
  box-shadow: var(--wp--custom--rooster--focus-ring) !important;
}
html[data-rooster-design="theme"] .om-variations-wrapper .om-variation-type-image .om-cart-badge {
  bottom: 3px;
  inset-inline-end: 3px;
  background: var(--wp--preset--color--bg, #fff);
  color: var(--wp--preset--color--contrast, #111);
  box-shadow: 0 0 0 2px var(--wp--preset--color--contrast, #111);
}
html[data-rooster-design="theme"] .om-multi-select-mode .om-variation-type-image .om-multi-select-checkmark {
  top: 3px;
  inset-inline-end: 3px;
  background-color: var(--wp--preset--color--success, #46b450);
  color: var(--wp--preset--color--bg, #fff);
  box-shadow: 0 0 0 2px var(--wp--preset--color--bg, #fff);
}

/* The product page under the theme's design authority (UI review, 28 Oct 2026): the swatches start at the
 * info column's edge and fill rows from the start (a short last row is not centred), and on the phone the
 * attribute's name sits above its swatches, the grid at the column's full width, in both modes. */
html[data-rooster-design="theme"] .rooster-product__info .om-variations-wrapper :is(.om-variation-type-image, .om-variation-type-color, .om-variation-type-button) {
  justify-content: flex-start;
}
@media (max-width: 720px) {
  html[data-rooster-design="theme"] .rooster-product__info table.variations,
  html[data-rooster-design="theme"] .rooster-product__info table.variations > tbody,
  html[data-rooster-design="theme"] .rooster-product__info table.variations > tbody > tr,
  html[data-rooster-design="theme"] .rooster-product__info table.variations > tbody > tr > :is(th, td) {
    display: block;
    width: 100%;
    padding-inline: 0;
  }
  html[data-rooster-design="theme"] .rooster-product__info table.variations > tbody > tr > .label {
    padding-block: 0 8px;
  }
  /* The multi-select's grid keeps its name too (the settings CSS hides it on every device). */
  html[data-rooster-design="theme"] body.om-multi-select-enabled .rooster-product__info .variations_form table.variations th.label {
    display: block;
  }
}

.om-multi-select-reset {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
