/* KSEC Backorder Manager — Public Restock List (v0.16.10)
   Used by [ksec_restock_status] shortcode. Inherits theme typography
   except where Inter is loaded by the theme already; falls back to
   system stack. */

.ksec-bo-restock {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: inherit;
    margin: 0 0 32px;
}

/* v0.9.2 — explicit type scale per design spec.
   Titles (top heading + per-brand) at 20px, body text at 16px.
   Column-header labels stay smaller as they're labels, not content. */

.ksec-bo-restock__heading {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 16px;
    font-weight: 600;
}

.ksec-bo-restock__brand {
    margin: 24px 0 8px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
    color: inherit;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 4px;
}

.ksec-bo-restock__table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
    background: transparent;
}
.ksec-bo-restock__table th,
.ksec-bo-restock__table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    vertical-align: top;
}
.ksec-bo-restock__table td {
    font-size: 16px;
    line-height: 1.4;
}
.ksec-bo-restock__table th {
    font-weight: 600;
    color: rgba(0,0,0,0.55);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ksec-bo-restock__col-dot { width: 28px; padding-right: 4px; }
.ksec-bo-restock__col-sku { width: 140px; color: rgba(0,0,0,0.55); font-family: 'SF Mono', 'Monaco', 'Consolas', monospace; font-size: 13px; }
.ksec-bo-restock__col-eta { width: 38%; }

.ksec-bo-restock__row strong { font-weight: 500; }
.ksec-bo-restock__note { font-size: 14px; color: rgba(0,0,0,0.55); margin-top: 2px; line-height: 1.4; }

/* v0.24.1: admin-only marker for a row the public list drops because the
   product is excluded from the shop catalog. Without it the Preview tab and
   the live FAQ disagree with nothing on screen to explain why. */
.ksec-bo-restock__hidden-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 3px;
    background: rgba(0,0,0,0.04);
    color: rgba(0,0,0,0.55);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

/* Status dots — mirror the admin palette */
.ksec-bo-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    vertical-align: middle;
}
.ksec-bo-dot--green { background: #2bb673; }
.ksec-bo-dot--blue  { background: #3884d6; }
.ksec-bo-dot--amber { background: #e6a000; }
.ksec-bo-dot--grey  { background: #aaa; }
.ksec-bo-dot--red   { background: #cc1818; }

/* v0.9.0: animation scoped per context.
   Admin Preview tab + product pages → animated red.
   Public FAQ shortcode → static red dot (less attention-grabbing in a list). */
.ksec-bo-restock--admin .ksec-bo-dot--red,
.ksec-bo-restock--product-page .ksec-bo-dot--red {
    animation: ksec-bo-pulse 2s ease-in-out infinite;
}

/* When site-wide setting opts the public list back into animation. */
.ksec-bo-restock--public.ksec-bo-restock--animate-red .ksec-bo-dot--red {
    animation: ksec-bo-pulse 2s ease-in-out infinite;
}

@keyframes ksec-bo-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(204, 24, 24, 0.5); }
    50%      { box-shadow: 0 0 0 6px rgba(204, 24, 24, 0); }
}

.ksec-bo-restock__empty {
    color: rgba(0,0,0,0.55);
    font-style: italic;
    padding: 16px 0;
}

/* v0.9.0: row tints removed by default on the public shortcode.
   Admin Preview keeps them. Public surface opts in via the site-wide
   setting which adds the --tinted modifier class. */
.ksec-bo-restock--admin .ksec-bo-restock__row--red,
.ksec-bo-restock--public.ksec-bo-restock--tinted .ksec-bo-restock__row--red {
    background: rgba(204, 24, 24, 0.04);
}
.ksec-bo-restock--admin .ksec-bo-restock__row--amber,
.ksec-bo-restock--public.ksec-bo-restock--tinted .ksec-bo-restock__row--amber {
    background: rgba(230, 160, 0, 0.04);
}

@media (max-width: 600px) {
    .ksec-bo-restock__col-sku { display: none; }
    .ksec-bo-restock__table th,
    .ksec-bo-restock__table td { padding: 6px 6px; }
}

/* ──────────────────────────────────────────────────────────────────
   v0.19.6 Public restock cards (Option B)

   Each brand group renders as a card with its logo in the header and
   a coloured date pill per row (replacing the bare status dot). Scoped
   to `.ksec-bo-restock--public` so the admin Preview tab keeps its
   dots, row tints and animated-red exactly as before.

   Logos come from the `product_brand` term `thumbnail_id` (falling back
   to `ksec_brand_banner_logo_id`); groups with no brand term degrade to
   a text-only heading. Pill tints reuse the status palette.
   ────────────────────────────────────────────────────────────────── */

.ksec-bo-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ksec-bo-restock--public .ksec-bo-restock__card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 20px;
    break-inside: avoid;
}

/* Brand cards in two columns on a wide page, one on a phone (UX Batch FQ6,
   2026-10-10). CSS columns rather than a grid, so a short card does not leave
   a gap beside a long one, and the brands still read top to bottom in the
   order they are in the markup. 380px is the narrowest a card can go before
   the longest status chip has to wrap, so below about 780px of content this
   is one column without needing a breakpoint. */
.ksec-bo-restock--public .ksec-bo-restock__cards {
    columns: 2 380px;
    column-gap: 20px;
}

.ksec-bo-restock--public .ksec-bo-restock__card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 6px;
}

.ksec-bo-restock--public .ksec-bo-restock__logo {
    flex-shrink: 0;
    display: inline-flex;
    line-height: 0;
}
.ksec-bo-restock--public .ksec-bo-restock__logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 3px;
    display: block;
}

.ksec-bo-restock--public .ksec-bo-restock__card-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
/* Override the default heading (20px + bottom border) inside a card. */
.ksec-bo-restock--public .ksec-bo-restock__card-head .ksec-bo-restock__brand {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 600;
}
.ksec-bo-restock--public .ksec-bo-restock__card-meta {
    font-size: 12px;
    /* 6.1:1 on white. rgba(0,0,0,.5) measured 3.95:1 on the card, under the
       4.5:1 that 12px text needs (UX Batch FQ7). */
    color: #5b6270;
    margin-top: 2px;
}

/* The public card rows are a flex LIST, not a table.

   A table sized the ETA column to the pill's min-content width (the pill is
   `white-space: nowrap`), so on a phone the pill ran past the card edge and
   was clipped mid sentence: "Requested from manufacturer · expected 20th
   September" arrived cut off rather than wrapped. Measured on a 375px
   viewport before the change: card inner width 279px against a 348px pill,
   so roughly 150px of every Pro Pick and Hak5 row was unreachable.

   Since UX Batch FQ6 (2026-10-10) the pill always sits under the name, at
   every width. Beside the name it was about 300px from it on desktop, so the
   eye had to cross the card to pair a date with a product. Stacked, nothing
   can be clipped either: the pill wraps its own text inside the card.

   The list reset is deliberately specific: the card sits in post content, so
   the theme would otherwise give it discs and a left indent. */
.ksec-bo-restock--public .ksec-bo-restock__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ksec-bo-restock--public .ksec-bo-restock__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 2px;
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.ksec-bo-restock--public .ksec-bo-restock__item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.ksec-bo-restock--public .ksec-bo-restock__item-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 500;
}

/* The title links to the product, or on a brand row to the brand archive.
   The card sits in post content, where the theme paints links a loud blue and
   would turn a 13 row card into a wall of it. Since UX Batch FQ6 the link is
   the theme's dark cyan with no underline until hover or keyboard focus: each
   name is a line of its own with a chip under it, so it reads as a link by
   colour and position without one. #02738a is the theme's own fallback and
   is 5.3:1 on white. Element plus class beats the theme's content link rules
   without reaching for !important. */
.ksec-bo-restock--public a.ksec-bo-restock__item-name,
.ksec-bo-restock--public a.ksec-bo-restock__item-name:visited {
    color: var(--ksec-cyan-dk, #02738a);
    text-decoration: none;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.ksec-bo-restock--public a.ksec-bo-restock__item-name:hover,
.ksec-bo-restock--public a.ksec-bo-restock__item-name:focus-visible {
    text-decoration: underline;
}
.ksec-bo-restock--public a.ksec-bo-restock__item-name:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}
.ksec-bo-restock--public .ksec-bo-restock__item .ksec-bo-restock__pill {
    flex: 0 1 auto;
    /* 13px from 12px (UX Batch FQ6). The pill may now be wider than a
       narrow card, so it wraps its own text at any width. A 12px radius is
       fully round on one line (the pill is about 24px tall) and a plain
       rounded box on two, where 999px would turn it into a lozenge. */
    font-size: 13px;
    white-space: normal;
    border-radius: 12px;
}

/* "Updated <date>", shortcode updated="1" (UX Batch FQ4). A plain line of
   page text; only the spacing is set. */
.ksec-bo-restock--public .ksec-bo-restock__updated {
    margin: 0 0 12px;
}

/* Colour key, shortcode key="1" (UX Batch FQ3). Four across, two on a
   phone. The pills here wrap like the row pills: "Significantly delayed"
   ran past the right edge of a 375px screen in the approved render. The
   list reset matches .ksec-bo-restock__list's specificity, for the same
   reason (post content would add discs and an indent). */
.ksec-bo-restock--public .ksec-bo-restock__key {
    list-style: none;
    margin: 14px 0 18px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 18px;
}
.ksec-bo-restock--public .ksec-bo-restock__key li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #475569;
}
.ksec-bo-restock--public .ksec-bo-restock__key .ksec-bo-restock__pill {
    font-size: 13px;
    white-space: normal;
    border-radius: 12px;
}
@media (max-width: 760px) {
    .ksec-bo-restock--public .ksec-bo-restock__key {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Brand jump links, shortcode jump="1" (UX Batch FQ5). The theme's
   html scroll-padding-top already clears the sticky header on a jump. */
.ksec-bo-restock--public .ksec-bo-restock__jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}
.ksec-bo-restock--public .ksec-bo-restock__jump a {
    display: inline-flex;
    align-items: center;
    /* So the 44px touch minimum below includes the padding and border. */
    box-sizing: border-box;
    padding: 6px 14px;
    border: 1px solid rgba(15, 20, 25, 0.16);
    border-radius: 999px;
    background: #fff;
    color: var(--ksec-navy, #0f1419);
    font-size: 14px;
    line-height: 1.3;
    text-decoration: none;
}
.ksec-bo-restock--public .ksec-bo-restock__jump a:hover {
    border-color: currentColor;
}
.ksec-bo-restock--public .ksec-bo-restock__jump a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* 44px touch targets on a touch screen (UX Batch FQ12). A one-line product
   name was 20 to 22px tall on a phone. */
@media (pointer: coarse) {
    .ksec-bo-restock--public a.ksec-bo-restock__item-name {
        display: flex;
        align-items: center;
        min-height: 44px;
    }
    .ksec-bo-restock--public .ksec-bo-restock__jump a {
        min-height: 44px;
    }
}

.ksec-bo-restock__pill {
    display: inline-block;
    max-width: 100%;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.35;
    white-space: nowrap;
}
.ksec-bo-restock__pill--green { background: #e1f5ee; color: #0f6e56; }
.ksec-bo-restock__pill--amber { background: #faeeda; color: #854f0b; }
.ksec-bo-restock__pill--red   { background: #fcebeb; color: #8a0f0f; }
.ksec-bo-restock__pill--blue  { background: #e6f1fb; color: #185fa5; }
.ksec-bo-restock__pill--grey  { background: #f1efe8; color: #5f5e5a; }

@media (max-width: 600px) {
    .ksec-bo-restock--public .ksec-bo-restock__card { padding: 12px 12px; }
    .ksec-bo-restock--public .ksec-bo-restock__logo-img { width: 38px; height: 38px; }

    /* A little more room inside the pill on a phone, where it is more likely
       to run to two lines. */
    .ksec-bo-restock--public .ksec-bo-restock__item .ksec-bo-restock__pill {
        border-radius: 10px;
        padding: 5px 10px;
    }
}

/* ──────────────────────────────────────────────────────────────────
   v0.9.3 — Archive card (legacy .stock-status-cat style)

   Coloured bar under product images on shop / category archives.
   `position: relative` + `top: -12px` slides it up to overlap the
   image's bottom edge, mirroring the original out-of-snippet CSS.

   Theme rules targeting `.stock-status-cat` still apply — these
   plugin rules are layered underneath, providing sane defaults.
   ────────────────────────────────────────────────────────────────── */

/* v0.11.11: bar renders inside `.shoptimizer-plp-image-wrapper` via
   `woocommerce_before_shop_loop_item_title` priority 15. Taken out of
   layout flow with `position: absolute; top: 100%` so the wrapper's
   height stays equal to the image height — Shoptimizer's hover swap
   relies on a `:has(.gallery-image)` selector and on the two `<img>`
   children stacking correctly inside a fixed-aspect wrapper, both of
   which are preserved when the bar is out of flow.

   The bar sits flush below the image edge (not over it), and the
   carousel container reserves 18px below itself so the title doesn't
   slide up into the bar. */
.stock-status-cat {
    margin: 0;
    padding: 0 8px;
    border-radius: 0 0 7px 7px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
    letter-spacing: 0.015em;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.08);
}

.shoptimizer-plp-image-wrapper {
    position: relative;
    /* !important: CommerceKit's carousel layout (.shoptimizer-plp-carousel-container)
       sets overflow:hidden on the inner image wrapper in compact carousel rows
       (Pro Pick, Sparrows etc). Without this, the bar's bottom rounded corners
       (border-radius 0 0 7px 7px) get clipped at the wrapper edge in those rows. */
    overflow: visible !important;
}

.shoptimizer-plp-image-wrapper > .stock-status-cat.ksec-bo-archive-card {
    position: absolute;
    /* v0.16.8: bar anchored to image BOTTOM (bottom:0) instead of below
       the wrapper (top:100%). The parent `.shoptimizer-plp-carousel-container`
       has `overflow-x: scroll` for the touch-swipe carousel, which per CSS
       spec forces `overflow-y: auto`, clipping anything that sits below
       the container box. With `top:100%` the bar landed exactly on that
       clipping edge — invisible on desktop, half-off-card on mobile (the
       wrapper goes width:calc(200%) below 992px).

       `bottom:0` keeps the bar inside the wrapper, overlapping the bottom
       strip of the image — matches the legacy `.stock-status-cat` look
       from the pre-v0.11 Customizer Additional CSS. The image area below
       still shows behind the bar (the bar is semi-translucent? no, opaque
       coloured — acceptable since the bottom 5% of product photos rarely
       carries information). */
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

/* v0.22.1: banner sits BELOW the photo, not over it.
   Reserve space at the wrapper's bottom equal to the bar height so the
   `bottom:0` bar lands under the image instead of overlapping its bottom
   strip (the old look covered product detail on full-bleed photos — see
   eu.ksec.co.uk category cards). :has() scopes the reserve to wrappers that
   actually carry a bar, so in-stock cards with no bar keep a flush image and
   no empty gap. The bar stays INSIDE the wrapper box, so it is still immune to
   the carousel container's overflow-y clip (the constraint that made v0.16.8
   abandon top:100%). The wrapper height is theme-fixed, so the image shrinks by
   the reserve (object-fit:contain adds a little whitespace) with no card reflow.
   Graceful degradation: browsers without :has() fall back to the overlap look. */
.shoptimizer-plp-image-wrapper:has(> .stock-status-cat.ksec-bo-archive-card) {
    padding-bottom: 22px;
}

.shoptimizer-plp-carousel-container {
    margin-bottom: 18px;
}

/* v0.16.10: the v0.16.8 mobile `right: 50%` clamp removed.
   Shoptimizer no longer widens `.shoptimizer-plp-image-wrapper` to
   `width: calc(200%)` on mobile (verified via live DOM measurement —
   wrapper measures 1× card width on both single- and multi-image
   carousels), so the compensation was over-clipping every bar to half
   the image width on mobile. If a future Shoptimizer release brings back
   the 200% wrapper for multi-image carousels, scope a clamp to the
   carousel state class rather than the viewport. */

/* Contrast (UX audit C2, 2026-10-07): every badge text pair at 4.5:1 or
   better at 14px. In Stock #1e7e34 (5.14:1), Out of Stock #cc1818 (5.66:1).
   C2b (2026-10-07): Low Stock is blue #2563eb (5.17:1) and On Backorder
   purple #581c87 (10.88:1), all with white text. Not an amber: every amber
   dark enough for white text reads as the #b25e00 delayed tier below. The
   purple is dark and the blue mid so the pair still differs in lightness
   for red-green colour-blind shoppers, who see purple as blue. */
.out-of-stock-cat {
    background: #cc1818;
    color: #fff;
    border-color: #cc1818;
}
.in-stock-cat {
    background-color: #1e7e34;
    color: #fff;
    border-color: #1e7e34;
}
.low-stock-cat {
    background-color: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.on-backorder-cat {
    background-color: #581c87;
    color: #fff;
    border-color: #581c87;
}

/* Significantly-delayed override, pushes the card to red regardless
   of underlying stock status, matching the schedule row colour.
   v0.31.0: the TOP tier only.
   Both delay overrides set white text too, so the text stays readable
   whatever the base state's own text colour is. */
.ksec-bo-archive-card--overdue {
    background-color: #cc1818 !important;
    border-color: #cc1818 !important;
    color: #fff !important;
}

/* v0.31.0: a confirmed purchase order inside its 10-day grace. Amber, so a
   shipment running a few days late stops wearing the same solid red as a line
   stuck for a year. Dark enough to carry white text at 4.7:1. Low Stock
   was an amber too until C2b moved it to blue, so the two no longer share a
   hue on the same grid. */
.ksec-bo-archive-card--delayed {
    background-color: #b25e00 !important;
    border-color: #b25e00 !important;
    color: #fff !important;
}

/* v0.11.8: no longer needs a per-viewport offset — the bar is in-flow,
   so its position scales naturally with the image. Mobile media block
   retained for future tweaks. */

/* ──────────────────────────────────────────────────────────────────
   v0.9.9 — Status-aware design system via CSS custom properties.

   The legacy customizer CSS used fixed-green styling for backorder
   notices. Now status-aware: each modifier class redefines the colour
   variables; everything else (stock line, notice box, links, etc.)
   reads from the variables. One variable change applies everywhere.

   Default values (--green) live on the shared parent class so any
   element under `.ksec-bo-restock--product-page` without a colour
   modifier still renders correctly.
   ────────────────────────────────────────────────────────────────── */

.ksec-bo-restock--product-page,
.ksec-bo-stock-line,
.ksec-bo-product-notice {
    --ksec-bo-bg: #F2FFF7;
    --ksec-bo-border: #C8EEDA;
    --ksec-bo-text: #444444;
    --ksec-bo-link: #007A30;
    --ksec-bo-link-decoration: #BBEDCC;
    --ksec-bo-icon-bg: rgba(0, 168, 68, .09);
    --ksec-bo-icon-bg-strong: rgba(0, 168, 68, .12);
    --ksec-bo-icon-border: rgba(0, 168, 68, .25);
    --ksec-bo-eyebrow: #00A844;
    --ksec-bo-decorative: rgba(0, 168, 68, .06);
    --ksec-bo-link-bg-hover: #E8FFF0;
}
.ksec-bo-stock-line--blue,
.ksec-bo-product-notice--blue {
    --ksec-bo-bg: #F4F8FD;
    --ksec-bo-border: #C2DBF2;
    --ksec-bo-link: #1c4f8c;
    --ksec-bo-link-decoration: #C2DBF2;
    --ksec-bo-icon-bg: rgba(56, 132, 214, .09);
    --ksec-bo-icon-bg-strong: rgba(56, 132, 214, .12);
    --ksec-bo-icon-border: rgba(56, 132, 214, .25);
    --ksec-bo-eyebrow: #1c4f8c;
    --ksec-bo-decorative: rgba(56, 132, 214, .06);
    --ksec-bo-link-bg-hover: #E8F1FD;
}
.ksec-bo-stock-line--amber,
.ksec-bo-product-notice--amber {
    --ksec-bo-bg: #FFFAEB;
    --ksec-bo-border: #EAD38C;
    --ksec-bo-link: #b07000;
    --ksec-bo-link-decoration: #EAD38C;
    --ksec-bo-icon-bg: rgba(230, 160, 0, .09);
    --ksec-bo-icon-bg-strong: rgba(230, 160, 0, .12);
    --ksec-bo-icon-border: rgba(230, 160, 0, .25);
    --ksec-bo-eyebrow: #b07000;
    --ksec-bo-decorative: rgba(230, 160, 0, .06);
    --ksec-bo-link-bg-hover: #FFF3D2;
}
.ksec-bo-stock-line--red,
.ksec-bo-product-notice--red {
    --ksec-bo-bg: #FFF5F5;
    --ksec-bo-border: #F4C4C4;
    --ksec-bo-link: #8a0f0f;
    --ksec-bo-link-decoration: #F4C4C4;
    --ksec-bo-icon-bg: rgba(204, 24, 24, .09);
    --ksec-bo-icon-bg-strong: rgba(204, 24, 24, .12);
    --ksec-bo-icon-border: rgba(204, 24, 24, .25);
    --ksec-bo-eyebrow: #cc1818;
    --ksec-bo-decorative: rgba(204, 24, 24, .06);
    --ksec-bo-link-bg-hover: #FFE9E9;
}
.ksec-bo-stock-line--grey,
.ksec-bo-product-notice--grey {
    --ksec-bo-bg: #F5F5F5;
    --ksec-bo-border: #DDDDDD;
    --ksec-bo-link: #555555;
    --ksec-bo-link-decoration: #CCCCCC;
    --ksec-bo-icon-bg: rgba(0, 0, 0, .06);
    --ksec-bo-icon-bg-strong: rgba(0, 0, 0, .08);
    --ksec-bo-icon-border: rgba(0, 0, 0, .15);
    --ksec-bo-eyebrow: #555555;
    --ksec-bo-decorative: rgba(0, 0, 0, .04);
    --ksec-bo-link-bg-hover: #ECECEC;
}

/* ────────── Inline stock status line (replaces snippet 25 cmpt 1) ────────── */

p.stock.available-on-backorder.ksec-bo-stock-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--ksec-bo-text);
    background: var(--ksec-bo-bg);
    border: 1px solid var(--ksec-bo-border);
    border-radius: 8px;
    padding: 9px 12px;
    margin: 0 0 12px;
    line-height: 1.45;
}

.ksec-bo-stock-line__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--ksec-bo-icon-bg-strong);
    border: 1px solid var(--ksec-bo-icon-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

p.stock.available-on-backorder.ksec-bo-stock-line a {
    color: var(--ksec-bo-link);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--ksec-bo-link-decoration);
}
p.stock.available-on-backorder.ksec-bo-stock-line a:hover {
    text-decoration-color: var(--ksec-bo-link);
}

/* v0.9.4 — body-class scoped rule that hides the inline stock notice on
   single product pages when the corresponding setting is enabled. The
   class is added via body_class filter only when the setting is on, so
   this rule is inert otherwise. Kept here (not inline) so it benefits
   from the same caching / minification path as the rest of the public CSS. */
body.ksec-bo-hide-inline-stock.single-product p.stock.available-on-backorder {
    display: none;
}

/* UX L2.1: a backorder VARIATION of an in-stock parent gets no notice box,
   so its own line is the only stock message and must show. The body class
   is added only when the parent is neither on backorder nor a pre-order. */
body.ksec-bo-hide-inline-stock.ksec-bo-variation-stock.single-product .woocommerce-variation-availability p.stock.available-on-backorder {
    display: block;
}

/* ──────────────────────────────────────────────────────────────────
   v0.13.0 — ETA badge

   Concise restock-date pill that sits inline with Commerce Gurus'
   .ckit-badge span elements inside their .ckit-badge_wrapper. Colours
   are direct hex values from the palette defined above — no new CSS
   variables introduced.

   blue  (#1c4f8c) — concrete date types (exact_date, month, part_month, range)
   amber (#b07000) — pending_manufacture, being_manufactured, pending_redesign
   green (#007A30) — en_route
   grey  (#555555) — on_request

   C2b (2026-10-07): the --blue badge is filled purple #581c87, to match the
   On Backorder card and not read as the blue Low Stock card.
   ────────────────────────────────────────────────────────────────── */

.ksec-bo-badge {
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.01em;
    line-height: 1.3;
    white-space: nowrap;
    display: inline-block;
}
/* v0.13.2: bumped specificity to beat CG's default `.ckit-badge` rule
   (which sets `background: #e24ad3` — a pink — for any unstyled badge).
   `.ckit-badge.ksec-bo-badge--X` is two-class specificity vs CG's one.
   Also opacity reset because CG sets `.ckit-badge { opacity: 0.8 }` and
   we want full saturation on our status colours. */
.ckit-badge.ksec-bo-badge--blue  { background: #581c87; color: #fff; opacity: 1; }
.ckit-badge.ksec-bo-badge--amber { background: #FF9900; color: #1a1300; opacity: 1; }
.ckit-badge.ksec-bo-badge--green { background: #1e7e34; color: #fff; opacity: 1; }
.ckit-badge.ksec-bo-badge--grey  { background: #555555; color: #fff; opacity: 1; }

/* v0.13.2: when CG renders its own merchandise-badge wrapper alongside
   ours, offset our wrapper down so they don't overlap in the corner.
   CG already does this for its own `+ .ckit-badge_wrapper` after a
   .onsale element; we extend the rule to our wrapper specifically. */
.ckit-badge_wrapper + .ksec-bo-badge_wrapper { top: 36px; }

/* Order-level backorder notice on My Account > View order. Amber to match
   the per-line "Back-ordered" text (#b07000) it sits above. */
.ksec-bo-order-notice {
    background: #fff8eb;
    border: 1px solid #f0d9a8;
    border-left: 4px solid #b07000;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #3d2a00;
}
.ksec-bo-order-notice p { margin: 0 0 6px; }
.ksec-bo-order-notice p:last-child { margin-bottom: 0; }
.ksec-bo-order-notice__title { font-weight: 700; }
/* Colour comes from the account link rule (cyan); only the weight is ours. */
.ksec-bo-order-notice a { font-weight: 600; }

/* ──────────────────────────────────────────────────────────────────
   Restock change alerts (DEV-260, specs/restock-notify-business.md).
   The approved review page: _local/ux-restock-notify/ux-review-restock-notify.html.

   The row becomes a two column grid only when it carries the follow
   button (the --follow modifier), so the list renders exactly as before while the switch is off:
   name and pill on the left as now, the button on the right, centred on
   the two lines. On a phone the button is the bell alone at 44px, because
   the words pushed the date onto two lines. */
.ksec-bo-restock--public .ksec-bo-restock__item--follow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
}
.ksec-bo-restock--public .ksec-bo-restock__item--follow > .ksec-bo-restock__item-name { grid-column: 1; grid-row: 1; }
.ksec-bo-restock--public .ksec-bo-restock__item--follow > .ksec-bo-restock__pill { grid-column: 1; grid-row: 2; justify-self: start; }
.ksec-bo-restock--public .ksec-bo-follow {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: 34px;
    margin: 0;
    padding: 5px 11px;
    border: 1px solid rgba(15, 20, 25, 0.16);
    border-radius: 999px;
    background-color: #fff;
    color: var(--ksec-navy, #0f1419);
    font-family: inherit;
    font-size: 15px; /* as on the approved review render */
    font-weight: 500;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
}
.ksec-bo-restock--public .ksec-bo-follow:hover { border-color: #02738a; color: #02738a; background-color: #fff; }
.ksec-bo-restock--public .ksec-bo-follow:focus-visible { outline: 2px solid #02738a; outline-offset: 2px; }
.ksec-bo-restock--public .ksec-bo-follow[aria-busy="true"] { opacity: .6; cursor: progress; }
.ksec-bo-restock--public .ksec-bo-follow svg { width: 16px; height: 16px; flex: 0 0 16px; }
.ksec-bo-restock--public .ksec-bo-follow .ksec-bo-follow__on { display: none; }
.ksec-bo-restock--public .ksec-bo-follow[aria-pressed="true"] { background-color: #e6f4f6; border-color: #02738a; color: #02595f; }
.ksec-bo-restock--public .ksec-bo-follow[aria-pressed="true"] .ksec-bo-follow__on { display: block; }
.ksec-bo-restock--public .ksec-bo-follow[aria-pressed="true"] .ksec-bo-follow__off { display: none; }
.ksec-bo-restock--public .ksec-bo-follow-note {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 2px 0 0;
    padding: 10px 12px;
    border-left: 3px solid #02738a;
    border-radius: 4px;
    background: #f4f8f9;
    color: #22323a;
    font-size: 14px;
    line-height: 1.45;
}
.ksec-bo-restock--public .ksec-bo-follow-note a { color: #02738a; font-weight: 600; text-decoration: underline; }
@media (max-width: 600px) {
    .ksec-bo-restock--public .ksec-bo-follow .ksec-bo-follow__text { display: none; }
    .ksec-bo-restock--public .ksec-bo-follow { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; }
    .ksec-bo-restock--public .ksec-bo-follow svg { width: 20px; height: 20px; flex-basis: 20px; }
}
@media (pointer: coarse) {
    .ksec-bo-restock--public .ksec-bo-follow { min-height: 44px; min-width: 44px; justify-content: center; }
}

/* The "Restock alerts" section on the Business account tab. */
.ksec-bo-alerts { margin-top: 28px; }
.ksec-bo-alerts .ksec-bo-restock__pill { white-space: normal; }
.ksec-bo-alerts .ksec-bo-fl a { color: #02738a; text-decoration: none; font-weight: 500; }
.ksec-bo-alerts .ksec-bo-fl form { margin: 0; }
.ksec-bo-alerts .ksec-bo-stop {
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid rgba(15, 20, 25, 0.2);
    border-radius: 4px;
    background-color: #fff;
    color: #0f1419;
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
}
.ksec-bo-alerts .ksec-bo-stop:focus-visible { outline: 2px solid #02738a; outline-offset: 2px; }
.ksec-bo-alerts .ksec-bo-paused { margin: 0; padding: 10px 14px; border: 1px solid #e8d9a8; border-radius: 6px; background: #fdf6e2; color: #4a3a05; font-size: .9rem; }
@media (pointer: coarse) {
    .ksec-bo-alerts .ksec-bo-stop { min-height: 44px; }
}
