/* =====================================================================
   WSF EPOS — Terminal / Ledger design system
   ---------------------------------------------------------------------
   A working till, not a consumer store. Warm off-white workspace, receipt
   ink text, grocer's green primary, amber reserved for delivery/closure
   messaging. Numbers speak in mono (Space Mono); UI in Inter. The order rail
   is the signature: a live receipt that grows as the ticket builds.
   ===================================================================== */

:root {
    /* Brand primary set dynamically in functions.php; these are fallbacks. */
    --wsf-primary: #2c5530;
    --wsf-secondary: #1e3d22;
    --wsf-accent: #2f8f46;
    --wsf-btn: #2c5530;
    --wsf-btn-text: #ffffff;

    /* Workspace palette */
    --ink: #14180f;          /* receipt ink — near-black, warm */
    --ink-2: #3a4034;        /* secondary text */
    --ink-3: #6b7264;        /* muted / captions */
    --paper: #f6f4ee;        /* workspace background */
    --paper-2: #efece3;      /* recessed surfaces */
    --card: #ffffff;         /* raised surfaces */
    --line: #e2ded3;         /* hairlines */
    --line-2: #d3cdbf;       /* stronger hairlines */

    /* Reserved signal tones */
    --amber: #b8791b;        /* delivery / cutoff / closure — never decoration */
    --amber-bg: #fdf6e7;
    --amber-line: #f0dcae;
    --terra: #b4432b;        /* destructive / remove only */
    --terra-bg: #fbefec;

    --ok: var(--accent, #2f8f46);

    /* Type */
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-num: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    /* Rhythm */
    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --header-h: 66px;
    --rail-w: 380px;

    --shadow-sm: 0 1px 2px rgba(20, 24, 15, 0.06), 0 1px 1px rgba(20, 24, 15, 0.04);
    --shadow-md: 0 4px 16px rgba(20, 24, 15, 0.08);
    --shadow-lg: 0 12px 40px rgba(20, 24, 15, 0.16);

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.wsf-epos-body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* leave room for the fixed header */
    padding-top: var(--header-h);
}

img { max-width: 100%; height: auto; display: block; }

/* The native `hidden` attribute must always win, even over component classes
   that set their own display (e.g. the checkout drawer / modals use flex). */
[hidden] { display: none !important; }

a { color: var(--wsf-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--wsf-accent);
    outline-offset: 2px;
    border-radius: 3px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
.wsf-skip-link:focus {
    position: fixed; top: 8px; left: 8px; z-index: 1000;
    width: auto; height: auto; clip: auto;
    padding: 10px 16px; background: var(--ink); color: #fff;
    border-radius: var(--r-sm);
}

/* ---------- header ---------- */
.wsf-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(246, 244, 238, 0.86);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
    z-index: 200;
}
.wsf-header__inner {
    height: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.wsf-header__brand { display: flex; align-items: center; min-width: 0; }
.wsf-brand { display: inline-flex; align-items: center; gap: 10px; }
.wsf-brand:hover { text-decoration: none; }
.wsf-brand__logo { max-height: 42px; width: auto; }
.wsf-brand__text {
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.wsf-header__actions { display: flex; align-items: center; gap: 10px; }

/* cart button */
.wsf-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 12px;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 999px;
    line-height: 1;
    transition: transform 0.14s var(--ease), background 0.2s var(--ease);
}
.wsf-cart-btn:hover { background: #000; transform: translateY(-1px); }
.wsf-cart-btn:active { transform: translateY(0); }
.wsf-cart-btn__icon { position: relative; display: inline-flex; }
.wsf-cart-btn__count {
    position: absolute;
    top: -7px; right: -9px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--wsf-accent);
    color: #fff;
    font-family: var(--font-num);
    font-size: 11px; font-weight: 700;
    border-radius: 999px;
    border: 2px solid var(--ink);
    transition: transform 0.2s var(--ease-out);
}
.wsf-cart-btn__count.wsf-bump { animation: wsf-bump 0.4s var(--ease-out); }
@keyframes wsf-bump { 0%{transform:scale(1);} 35%{transform:scale(1.4);} 100%{transform:scale(1);} }
.wsf-cart-btn__total {
    font-family: var(--font-num);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* account */
.wsf-account { position: relative; }

/* ---------- main / footer ---------- */
.wsf-main { min-height: calc(100vh - var(--header-h)); }

.wsf-footer {
    border-top: 1px solid var(--line);
    background: var(--paper-2);
    margin-top: 40px;
}
.wsf-footer__inner {
    max-width: 1680px; margin: 0 auto;
    padding: 20px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    font-size: 13px; color: var(--ink-3);
}
.wsf-footer__brand { font-weight: 600; color: var(--ink-2); }

/* ---------- generic pages ---------- */
.wsf-page { padding: 40px 20px; }
.wsf-page--center { display: flex; align-items: center; min-height: 70vh; }
.wsf-page__inner { max-width: 760px; margin: 0 auto; width: 100%; }
.wsf-page__title { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 20px; }
.wsf-page__content { line-height: 1.65; }

.wsf-404 { text-align: center; }
.wsf-404__code { font-family: var(--font-num); font-size: 72px; font-weight: 700; color: var(--line-2); display: block; }
.wsf-404__title { font-size: 26px; margin: 8px 0; }
.wsf-404__text { color: var(--ink-3); margin-bottom: 24px; }

/* ---------- buttons ---------- */
.wsf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px;
    font-weight: 600; font-size: 15px;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    transition: transform 0.14s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.wsf-btn--solid { background: var(--wsf-btn); color: var(--wsf-btn-text); }
.wsf-btn--solid:hover { background: var(--wsf-secondary); text-decoration: none; transform: translateY(-1px); }
.wsf-btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.wsf-btn--ghost:hover { background: var(--paper-2); text-decoration: none; }

/* ---------- notices ---------- */
.wsf-notice { padding: 16px 18px; border-radius: var(--r-md); margin: 16px 0; }
.wsf-notice--error { background: var(--terra-bg); border: 1px solid #f0cabf; color: #7d2a19; }

/* =====================================================================
   TERMINAL LAYOUT — board (left) + order rail (right)
   ===================================================================== */
.wsf-terminal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--rail-w);
    align-items: start;
    max-width: 1680px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-h));
}
.wsf-terminal__board {
    padding: 24px 24px 48px;
    min-width: 0;
}

/* The plugin renders [wsf_suppliers_page] inside the board. Reset its own
   max-width so it fills the board column. */
.wsf-terminal__board .wsf-suppliers-page {
    max-width: none;
    padding: 0;
}

/* ---------- filters bar ---------- */
.wsf-terminal__board .wsf-suppliers-filters {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px;
    margin-bottom: 24px;
    position: sticky;
    top: calc(var(--header-h) + 12px);
    z-index: 50;
}
.wsf-terminal__board .wsf-filter-group label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-3);
    font-weight: 600;
}
.wsf-terminal__board .wsf-filter-select,
.wsf-terminal__board .wsf-filter-input {
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    color: var(--ink);
    background: var(--paper);
}
.wsf-terminal__board .wsf-filter-select:focus,
.wsf-terminal__board .wsf-filter-input:focus {
    border-color: var(--wsf-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wsf-primary) 18%, transparent);
    outline: none;
}
.wsf-terminal__board .wsf-filter-apply,
.wsf-terminal__board .wsf-filter-btn.wsf-filter-apply {
    background: var(--wsf-btn);
    color: var(--wsf-btn-text);
    border: none;
    border-radius: var(--r-sm);
    font-weight: 600;
}
.wsf-terminal__board .wsf-filter-clear {
    color: var(--ink-3);
    border-radius: var(--r-sm);
}
.wsf-terminal__board .wsf-active-filter-tag {
    background: var(--paper-2);
    border: 1px solid var(--line);
    color: var(--ink-2);
    border-radius: 999px;
}

/* ---------- supplier sections ---------- */
.wsf-terminal__board .wsf-supplier-section {
    background: transparent;
    margin-bottom: 34px;
}
.wsf-terminal__board .wsf-supplier-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 14px;
    margin-bottom: 18px;
    border-bottom: 2px solid var(--ink);
    position: relative;
}
.wsf-terminal__board .wsf-supplier-info {
    display: flex; align-items: center; gap: 14px; min-width: 0;
}
.wsf-terminal__board .wsf-supplier-logo,
.wsf-terminal__board .wsf-supplier-logo-placeholder {
    width: 52px; height: 52px;
    border-radius: var(--r-md);
    object-fit: contain;
    background: var(--card);
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-num); font-weight: 700; color: var(--wsf-primary);
    flex-shrink: 0;
}
.wsf-terminal__board .wsf-supplier-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 3px;
    color: var(--ink);
}
.wsf-terminal__board .wsf-supplier-meta {
    display: flex; flex-wrap: wrap; gap: 6px 14px;
    font-family: var(--font-num);
    font-size: 12px;
    color: var(--ink-3);
}
.wsf-terminal__board .wsf-supplier-min-order { color: var(--amber); font-weight: 700; }
.wsf-terminal__board .wsf-view-all-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 600; color: var(--wsf-primary);
    white-space: nowrap;
}

/* ---------- product grid ---------- */
.wsf-terminal__board .wsf-supplier-products ul.products,
.wsf-terminal__board ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}
.wsf-terminal__board ul.products::before,
.wsf-terminal__board ul.products::after { content: none !important; display: none !important; }

.wsf-terminal__board ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    padding: 14px !important;
    float: none !important;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.16s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.wsf-terminal__board ul.products li.product:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-2);
}
.wsf-terminal__board ul.products li.product img {
    border-radius: var(--r-md);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--paper-2);
}
.wsf-terminal__board ul.products li.product .woocommerce-loop-product__title,
.wsf-terminal__board ul.products li.product h2 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--ink) !important;
    line-height: 1.35 !important;
}
.wsf-terminal__board ul.products li.product .price {
    font-family: var(--font-num) !important;
    font-weight: 700 !important;
    color: var(--wsf-primary) !important;
    font-size: 15px !important;
}
.wsf-terminal__board ul.products li.product .price del { color: var(--ink-3) !important; font-weight: 400 !important; }

/* quantity + add-to-basket (plugin markup) */
.wsf-terminal__board .wsf-quantity-selector {
    display: inline-flex; align-items: center;
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--paper);
}
.wsf-terminal__board .wsf-qty-btn {
    width: 32px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--ink-2);
}
.wsf-terminal__board .wsf-qty-btn:hover { background: var(--paper-2); }
.wsf-terminal__board .wsf-qty-input {
    width: 40px; height: 34px;
    text-align: center; border: none; background: transparent;
    font-family: var(--font-num); font-weight: 700; font-size: 14px; color: var(--ink);
    -moz-appearance: textfield;
}
.wsf-terminal__board .wsf-qty-input::-webkit-outer-spin-button,
.wsf-terminal__board .wsf-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.wsf-terminal__board .wsf-add-to-cart-btn {
    width: 100%;
    padding: 10px 12px !important;
    background: var(--wsf-btn) !important;
    color: var(--wsf-btn-text) !important;
    border: none !important;
    border-radius: var(--r-sm) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.01em;
    transition: background 0.2s var(--ease), transform 0.12s var(--ease) !important;
}
.wsf-terminal__board .wsf-add-to-cart-btn:hover { background: var(--wsf-secondary) !important; transform: translateY(-1px); }
.wsf-terminal__board .wsf-add-to-cart-btn.loading { opacity: 0.7; pointer-events: none; }
.wsf-terminal__board .wsf-add-to-cart-btn.added { background: var(--wsf-accent) !important; }
.wsf-terminal__board .wsf-moq-badge {
    background: var(--amber-bg); color: var(--amber);
    border: 1px solid var(--amber-line);
    font-family: var(--font-num); font-weight: 700;
    border-radius: var(--r-xs);
}

/* loading shimmer for board while first paint settles */
.wsf-board-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.wsf-board-skeleton__card {
    height: 260px; border-radius: var(--r-lg);
    background: linear-gradient(100deg, var(--paper-2) 30%, #f4f1e8 50%, var(--paper-2) 70%);
    background-size: 200% 100%;
    animation: wsf-shimmer 1.3s infinite;
}
@keyframes wsf-shimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

/* =====================================================================
   ORDER RAIL — the signature live receipt
   ===================================================================== */
.wsf-rail {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    padding: 16px 16px 16px 0;
}
.wsf-rail__sheet {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}

/* perforated receipt top edge */
.wsf-rail__perf {
    display: block;
    height: 8px;
    background:
        radial-gradient(circle at 6px 8px, transparent 5px, var(--card) 5px) repeat-x;
    background-size: 12px 8px;
    background-position: 0 -4px;
    border-bottom: 1px dashed var(--line-2);
    margin: 0 -1px;
}
.wsf-rail__head {
    padding: 4px 18px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
.wsf-rail__title-row { display: flex; align-items: center; justify-content: space-between; }
.wsf-rail__title {
    font-family: var(--font-num);
    font-size: 15px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    margin: 8px 0 0; color: var(--ink);
}
.wsf-rail__close {
    display: none; /* only shown as sheet on mobile */
    width: 34px; height: 34px; border-radius: var(--r-sm);
    background: transparent; border: none; color: var(--ink-2);
    align-items: center; justify-content: center;
}
.wsf-rail__count {
    font-family: var(--font-num);
    font-size: 12px; color: var(--ink-3);
    margin: 4px 0 0;
}

.wsf-rail__body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 0; }
.wsf-rail__body::-webkit-scrollbar { width: 8px; }
.wsf-rail__body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

/* empty state */
.wsf-rail__empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; height: 100%;
    padding: 40px 24px; color: var(--ink-3);
}
.wsf-rail__empty-mark { color: var(--line-2); margin-bottom: 14px; }
.wsf-rail__empty-title { font-weight: 600; color: var(--ink-2); margin: 0 0 4px; }
.wsf-rail__empty-hint { font-size: 13px; margin: 0; max-width: 220px; }

/* supplier group inside the receipt */
.wsf-rail-supplier { border-bottom: 1px dashed var(--line-2); padding: 14px 18px; }
.wsf-rail-supplier:last-child { border-bottom: none; }
.wsf-rail-supplier__head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.wsf-rail-supplier__logo {
    width: 22px; height: 22px; border-radius: 5px; object-fit: contain;
    background: var(--paper-2); border: 1px solid var(--line);
}
.wsf-rail-supplier__name {
    font-family: var(--font-num); font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2);
    flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wsf-rail-supplier__flag {
    font-family: var(--font-num); font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 999px;
    background: var(--terra-bg); color: var(--terra);
    white-space: nowrap;
}
.wsf-rail-supplier__flag--ok { background: color-mix(in srgb, var(--wsf-accent) 14%, transparent); color: var(--wsf-primary); }

/* line item */
.wsf-line {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px; align-items: center;
    padding: 7px 0;
    animation: wsf-line-in 0.28s var(--ease-out);
}
@keyframes wsf-line-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.wsf-line.wsf-line--leaving { animation: wsf-line-out 0.24s var(--ease) forwards; }
@keyframes wsf-line-out { to { opacity: 0; transform: translateX(12px); height: 0; padding: 0; margin: 0; } }

.wsf-line__thumb {
    width: 34px; height: 34px; border-radius: var(--r-sm);
    object-fit: cover; background: var(--paper-2); border: 1px solid var(--line);
}
.wsf-line__main { min-width: 0; }
.wsf-line__name {
    font-size: 13px; font-weight: 500; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.3;
}
.wsf-line__qtyctl {
    display: inline-flex; align-items: center; gap: 2px; margin-top: 4px;
}
.wsf-line__qbtn {
    width: 22px; height: 22px; border-radius: 5px;
    border: 1px solid var(--line-2); background: var(--paper);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-2); font-family: var(--font-num); line-height: 1;
    transition: background 0.15s var(--ease);
}
.wsf-line__qbtn:hover { background: var(--paper-2); }
.wsf-line__qty {
    min-width: 26px; text-align: center;
    font-family: var(--font-num); font-weight: 700; font-size: 13px;
}
.wsf-line__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.wsf-line__total { font-family: var(--font-num); font-weight: 700; font-size: 13px; color: var(--ink); }
.wsf-line__remove {
    background: transparent; border: none; color: var(--ink-3); padding: 2px;
    display: inline-flex; border-radius: 4px;
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.wsf-line__remove:hover { color: var(--terra); background: var(--terra-bg); }

/* supplier subtotal line */
.wsf-rail-supplier__sub {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-top: 8px; padding-top: 8px; border-top: 1px dotted var(--line-2);
    font-family: var(--font-num); font-size: 12px;
}
.wsf-rail-supplier__sub span:first-child { color: var(--ink-3); }
.wsf-rail-supplier__sub strong { color: var(--ink); }

/* delivery date on the supplier in the checkout (dates block) */
.wsf-date-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.wsf-date-row:last-child { border-bottom: none; }
.wsf-date-row__label {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
    font-weight: 600; font-size: 14px;
}
.wsf-date-row__label img { width: 22px; height: 22px; border-radius: 5px; object-fit: contain; border: 1px solid var(--line); }
.wsf-date-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.wsf-date-chip {
    flex: 0 0 auto;
    padding: 8px 12px; border-radius: var(--r-sm);
    border: 1px solid var(--line-2); background: var(--paper);
    font-family: var(--font-num); font-size: 12px; color: var(--ink-2);
    display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 58px;
    transition: all 0.15s var(--ease);
}
.wsf-date-chip__dow { font-size: 10px; text-transform: uppercase; color: var(--ink-3); }
.wsf-date-chip__day { font-size: 16px; font-weight: 700; }
.wsf-date-chip__mon { font-size: 10px; text-transform: uppercase; }
.wsf-date-chip:hover { border-color: var(--wsf-primary); }
.wsf-date-chip.is-selected {
    background: var(--wsf-primary); color: #fff; border-color: var(--wsf-primary);
}
.wsf-date-chip.is-selected .wsf-date-chip__dow,
.wsf-date-chip.is-selected .wsf-date-chip__mon { color: rgba(255,255,255,0.8); }
.wsf-date-row.is-missing .wsf-date-row__label { color: var(--terra); }

/* ---------- rail footer / pay ---------- */
.wsf-rail__foot {
    border-top: 1px solid var(--line);
    background: var(--paper);
    padding: 14px 18px 16px;
}
.wsf-rail__totals { margin: 0 0 12px; }
.wsf-rail__total-row {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--font-num); font-size: 13px; padding: 3px 0;
    color: var(--ink-2);
}
.wsf-rail__total-row--grand {
    margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--ink);
    font-size: 17px; font-weight: 700; color: var(--ink);
}
.wsf-rail__total-row--grand dd { font-weight: 700; }
.wsf-rail__total-row dt, .wsf-rail__total-row dd { margin: 0; }
.wsf-rail__min-note {
    font-size: 12px; color: var(--terra); background: var(--terra-bg);
    border: 1px solid #f0cabf; border-radius: var(--r-sm);
    padding: 8px 10px; margin: 0 0 12px;
    font-family: var(--font-num);
}
.wsf-rail__pay {
    width: 100%;
    padding: 15px;
    background: var(--wsf-btn); color: var(--wsf-btn-text);
    border: none; border-radius: var(--r-md);
    font-weight: 700; font-size: 15px; letter-spacing: 0.01em;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.2s var(--ease), transform 0.12s var(--ease);
}
.wsf-rail__pay:hover:not(:disabled) { background: var(--wsf-secondary); transform: translateY(-1px); }
.wsf-rail__pay:disabled { background: var(--line-2); color: var(--ink-3); cursor: not-allowed; }

/* =====================================================================
   CHECKOUT DRAWER
   ===================================================================== */
.wsf-checkout {
    position: fixed; inset: 0;
    z-index: 1200;
    display: flex; justify-content: flex-end;
    background: rgba(20, 24, 15, 0.42);
    animation: wsf-fade 0.2s var(--ease);
}
@keyframes wsf-fade { from { opacity: 0; } to { opacity: 1; } }
.wsf-checkout__panel {
    width: min(460px, 100%);
    height: 100%;
    background: var(--paper);
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: wsf-slide-in 0.32s var(--ease-out);
}
@keyframes wsf-slide-in { from { transform: translateX(100%); } to { transform: none; } }
.wsf-checkout__head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
}
.wsf-checkout__back {
    width: 38px; height: 38px; border-radius: var(--r-sm);
    background: var(--paper-2); border: none; color: var(--ink-2);
    display: inline-flex; align-items: center; justify-content: center;
}
.wsf-checkout__title { font-size: 18px; font-weight: 700; margin: 0; }
.wsf-checkout__scroll { flex: 1; overflow-y: auto; padding: 8px 18px 18px; }

.wsf-co-block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px;
    margin-top: 14px;
}
.wsf-co-block__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wsf-co-block__title {
    font-family: var(--font-num); font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); margin: 0;
}
.wsf-co-link { background: none; border: none; color: var(--wsf-primary); font-weight: 600; font-size: 13px; padding: 0; }
.wsf-co-link:hover { text-decoration: underline; }

.wsf-co-address {
    font-size: 14px; line-height: 1.5; color: var(--ink-2);
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--r-sm); padding: 12px;
}
.wsf-co-address--empty { color: var(--ink-3); font-style: italic; }
.wsf-co-check {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--ink-2); margin-bottom: 10px; cursor: pointer;
}

/* payment cards */
.wsf-co-cards { display: flex; flex-direction: column; gap: 8px; }
.wsf-card-opt {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line-2); border-radius: var(--r-md);
    background: var(--paper); cursor: pointer;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.wsf-card-opt:hover { border-color: var(--ink-3); }
.wsf-card-opt.is-selected { border-color: var(--wsf-primary); background: color-mix(in srgb, var(--wsf-primary) 6%, var(--card)); box-shadow: 0 0 0 1px var(--wsf-primary) inset; }
.wsf-card-opt input { accent-color: var(--wsf-primary); }
.wsf-card-opt__brand {
    font-family: var(--font-num); font-weight: 700; font-size: 12px;
    text-transform: uppercase; color: var(--ink-2);
    min-width: 46px;
}
.wsf-card-opt__num { font-family: var(--font-num); font-size: 14px; letter-spacing: 0.06em; color: var(--ink); }
.wsf-card-opt__exp { font-family: var(--font-num); font-size: 12px; color: var(--ink-3); margin-left: auto; }
.wsf-card-opt__del { margin-left: 8px; color: var(--ink-3); background: none; border: none; padding: 4px; border-radius: 4px; }
.wsf-card-opt__del:hover { color: var(--terra); background: var(--terra-bg); }
.wsf-co-cards__empty { font-size: 13px; color: var(--ink-3); padding: 10px 0; }

.wsf-gateway-opt {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border: 1px solid var(--line-2);
    border-radius: var(--r-md); background: var(--paper); cursor: pointer; margin-top: 8px;
}
.wsf-gateway-opt.is-selected { border-color: var(--wsf-primary); box-shadow: 0 0 0 1px var(--wsf-primary) inset; }
.wsf-gateway-opt input { accent-color: var(--wsf-primary); }

.wsf-checkout__foot {
    border-top: 1px solid var(--line);
    background: var(--card);
    padding: 14px 18px 18px;
}
.wsf-checkout__total {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 12px; font-family: var(--font-num);
}
.wsf-checkout__total strong { font-size: 20px; }
.wsf-checkout__pay {
    width: 100%; padding: 15px;
    background: var(--wsf-btn); color: var(--wsf-btn-text);
    border: none; border-radius: var(--r-md);
    font-weight: 700; font-size: 15px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.2s var(--ease), transform 0.12s var(--ease);
}
.wsf-checkout__pay:hover:not(:disabled) { background: var(--wsf-secondary); transform: translateY(-1px); }
.wsf-checkout__pay:disabled { background: var(--line-2); color: var(--ink-3); cursor: not-allowed; }
.wsf-checkout__pay.is-loading { pointer-events: none; opacity: 0.8; }
.wsf-checkout__error {
    margin: 12px 0 0; font-size: 13px; color: var(--terra);
    background: var(--terra-bg); border: 1px solid #f0cabf;
    border-radius: var(--r-sm); padding: 10px 12px;
}

/* ---------- address modal ---------- */
.wsf-modal {
    position: fixed; inset: 0; z-index: 1300;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(20, 24, 15, 0.5);
    animation: wsf-fade 0.2s var(--ease);
}
.wsf-modal__panel {
    width: min(560px, 100%); max-height: 90vh; overflow: hidden;
    background: var(--paper); border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
    animation: wsf-pop 0.24s var(--ease-out);
}
@keyframes wsf-pop { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.wsf-modal__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--card);
}
.wsf-modal__head h3 { margin: 0; font-size: 17px; }
.wsf-modal__close { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--paper-2); border: none; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.wsf-addr-form { padding: 18px; overflow-y: auto; }
.wsf-addr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wsf-field { display: flex; flex-direction: column; gap: 5px; }
.wsf-field--wide { grid-column: 1 / -1; }
.wsf-field > span { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; }
.wsf-field input, .wsf-field select {
    padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
    font-family: var(--font-ui); font-size: 14px; background: var(--card); color: var(--ink);
}
.wsf-field input:focus, .wsf-field select:focus {
    outline: none; border-color: var(--wsf-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wsf-primary) 16%, transparent);
}
.wsf-addr-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- success ---------- */
.wsf-success {
    position: fixed; inset: 0; z-index: 1400;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(20, 24, 15, 0.55);
    animation: wsf-fade 0.25s var(--ease);
}
.wsf-success__panel {
    width: min(420px, 100%); background: var(--card);
    border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
    padding: 36px 28px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    animation: wsf-pop 0.3s var(--ease-out);
}
.wsf-success__mark { color: var(--wsf-accent); animation: wsf-pop 0.5s var(--ease-out) 0.05s both; }
.wsf-success__title { font-size: 24px; margin: 6px 0 0; }
.wsf-success__sub { color: var(--ink-3); font-family: var(--font-num); font-size: 13px; margin: 0 0 14px; }
.wsf-success__panel .wsf-btn { width: 100%; }

/* ---------- toasts ---------- */
.wsf-toasts {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
    z-index: 1500; display: flex; flex-direction: column; gap: 8px; align-items: center;
    pointer-events: none;
}
.wsf-toast {
    pointer-events: auto;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px; border-radius: 999px;
    background: var(--ink); color: #fff;
    font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: wsf-toast-in 0.28s var(--ease-out);
    max-width: min(90vw, 460px);
}
.wsf-toast--success { background: var(--wsf-primary); }
.wsf-toast--error { background: var(--terra); }
.wsf-toast.is-out { animation: wsf-toast-out 0.24s var(--ease) forwards; }
@keyframes wsf-toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wsf-toast-out { to { opacity: 0; transform: translateY(10px); } }

/* small spinner */
.wsf-spin {
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
    animation: wsf-rotate 0.7s linear infinite;
}
@keyframes wsf-rotate { to { transform: rotate(360deg); } }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1180px) {
    :root { --rail-w: 340px; }
}

/* Tablet & mobile: rail becomes a bottom sheet toggled from the header cart */
@media (max-width: 960px) {
    .wsf-terminal { grid-template-columns: 1fr; }
    .wsf-terminal__board { padding: 18px 16px 40px; }

    .wsf-rail {
        position: fixed; inset: 0; top: auto;
        height: auto; max-height: 88vh; padding: 0;
        z-index: 400;
        transform: translateY(calc(100% + 20px));
        transition: transform 0.34s var(--ease-out);
        pointer-events: none;
    }
    .wsf-rail.is-open { transform: none; pointer-events: auto; }
    .wsf-rail__sheet {
        border-radius: var(--r-lg) var(--r-lg) 0 0;
        max-height: 88vh;
        box-shadow: 0 -12px 40px rgba(20,24,15,0.22);
    }
    .wsf-rail__close { display: inline-flex; }

    /* dim backdrop when the sheet is open */
    .wsf-rail::before {
        content: ''; position: fixed; inset: 0; top: 0;
        background: rgba(20,24,15,0.4); opacity: 0;
        transition: opacity 0.3s var(--ease); pointer-events: none; z-index: -1;
    }
    .wsf-rail.is-open::before { opacity: 1; pointer-events: auto; }

    .wsf-checkout__panel { width: 100%; }
}

@media (max-width: 560px) {
    :root { --header-h: 58px; }
    .wsf-header__inner { padding: 0 14px; }
    .wsf-cart-btn__total { display: none; }
    .wsf-cart-btn { padding: 9px; }
    .wsf-terminal__board ul.products,
    .wsf-terminal__board .wsf-supplier-products ul.products {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .wsf-addr-grid { grid-template-columns: 1fr; }
    .wsf-terminal__board .wsf-suppliers-filters { position: static; }
}

/* =====================================================================
   MOTION & CONTRAST PREFERENCES
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Keep the plugin's closure/delivery banners visible above the terminal.
   These are driven by the plugin; we only ensure they sit correctly. */
.wsf-shop-closed-banner { z-index: 900 !important; }
.wsf-countdown-banner { margin-bottom: 20px; }

/* =====================================================================
   HEADER ACCOUNT DROPDOWN (username → My account / Logout)
   ===================================================================== */
.wsf-account__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 10px 0 6px;
    background: var(--card);
    border: 1px solid var(--line-2);
    border-radius: 999px;
    color: var(--ink);
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.wsf-account__trigger:hover { border-color: var(--ink-3); background: var(--paper); }
.wsf-account__trigger[aria-expanded="true"] { border-color: var(--wsf-primary); }
.wsf-account__avatar {
    width: 28px; height: 28px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--wsf-primary); color: #fff;
    border-radius: 999px; font-weight: 700; font-size: 13px;
}
.wsf-account__label {
    font-weight: 600; font-size: 14px; max-width: 140px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wsf-account__caret { display: inline-flex; color: var(--ink-3); transition: transform 0.18s var(--ease); }
.wsf-account__trigger[aria-expanded="true"] .wsf-account__caret { transform: rotate(180deg); }

.wsf-account__menu {
    position: absolute;
    top: calc(100% + 8px); right: 0;
    min-width: 220px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    padding: 8px;
    z-index: 210;
    animation: wsf-menu-in 0.16s var(--ease-out);
}
@keyframes wsf-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.wsf-account__head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.wsf-account__name { display: block; font-weight: 700; font-size: 14px; }
.wsf-account__shop { display: block; font-size: 12px; color: var(--ink-3); font-family: var(--font-num); margin-top: 2px; }
.wsf-account__item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: var(--r-sm);
    color: var(--ink-2); font-weight: 500; font-size: 14px;
    transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.wsf-account__item:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.wsf-account__item svg { color: var(--ink-3); }
.wsf-account__logout { color: var(--terra); }
.wsf-account__logout:hover { background: var(--terra-bg); color: var(--terra); }
.wsf-account__logout svg { color: var(--terra); }

@media (max-width: 560px) {
    .wsf-account__label { display: none; }
    .wsf-account__caret { display: none; }
    .wsf-account__trigger { padding: 0; width: 40px; justify-content: center; }
}

/* =====================================================================
   ORDER RECEIVED / VIEW ORDER (thank-you page + order details)
   Scoped to the WooCommerce order body classes and the .wsf-woo-page
   wrapper. !important is used on the few structural/colour properties
   where WooCommerce's after-loaded stylesheet would otherwise win.
   ===================================================================== */
body.woocommerce-order-received .wsf-page__inner,
body.woocommerce-view-order .wsf-page__inner { max-width: 820px; }

/* Thank-you intro */
body.woocommerce-order-received .woocommerce-notice--success,
body.woocommerce-order-received p.woocommerce-thankyou-order-received {
    background: linear-gradient(135deg, var(--wsf-primary), var(--wsf-secondary));
    color: #fff !important; border: none !important;
    border-radius: var(--r-lg); padding: 22px 26px; margin: 0 0 22px;
    font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
    position: relative; overflow: hidden;
}
body.woocommerce-order-received p.woocommerce-thankyou-order-received::before {
    content: "✓"; display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; margin-right: 10px; vertical-align: middle;
    background: rgba(255,255,255,0.2); border-radius: 50%; font-size: 15px;
}

/* Order overview strip (order no / date / email / total / payment) */
body.woocommerce-order-received ul.woocommerce-order-overview,
body.woocommerce-view-order ul.woocommerce-order-overview {
    display: flex !important; flex-wrap: wrap; gap: 0; list-style: none;
    margin: 0 0 26px !important; padding: 0;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
body.woocommerce-order-received ul.woocommerce-order-overview li,
body.woocommerce-view-order ul.woocommerce-order-overview li {
    flex: 1 1 auto; min-width: 140px; margin: 0 !important;
    padding: 16px 20px !important; border: none !important;
    border-right: 1px solid var(--line) !important;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--ink-3); font-family: var(--font-num); font-weight: 700;
}
body.woocommerce-order-received ul.woocommerce-order-overview li:last-child,
body.woocommerce-view-order ul.woocommerce-order-overview li:last-child { border-right: none !important; }
body.woocommerce-order-received ul.woocommerce-order-overview li strong,
body.woocommerce-view-order ul.woocommerce-order-overview li strong {
    display: block; margin-top: 6px; font-size: 16px; font-family: var(--font-ui);
    text-transform: none; letter-spacing: -0.01em; color: var(--ink); font-weight: 700;
}

/* Section headings */
body.woocommerce-order-received .woocommerce-order-details h2,
body.woocommerce-order-received .woocommerce-customer-details h2,
body.woocommerce-view-order .woocommerce-order-details h2,
body.wsf-woo-page .wsf-order-suppliers-frontend h2,
body.woocommerce-order-received .wsf-order-suppliers-frontend h2 {
    font-size: 22px; letter-spacing: -0.01em; margin: 0 0 16px; color: var(--ink);
}

/* Order details table as a card */
body.woocommerce-order-received table.woocommerce-table--order-details,
body.woocommerce-view-order table.woocommerce-table--order-details,
body.woocommerce-order-received table.shop_table,
body.woocommerce-view-order table.shop_table {
    width: 100%; border-collapse: separate !important; border-spacing: 0;
    background: var(--card); border: 1px solid var(--line) !important;
    border-radius: var(--r-lg); overflow: hidden; margin: 0 0 30px;
    box-shadow: var(--shadow-sm);
}
body.woocommerce-order-received table.woocommerce-table--order-details thead th,
body.woocommerce-view-order table.woocommerce-table--order-details thead th {
    background: var(--paper-2) !important; color: var(--ink-3);
    font-family: var(--font-num); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 14px 18px !important; text-align: left; border: none !important;
}
body.woocommerce-order-received table.woocommerce-table--order-details td,
body.woocommerce-view-order table.woocommerce-table--order-details td,
body.woocommerce-order-received table.woocommerce-table--order-details th,
body.woocommerce-view-order table.woocommerce-table--order-details th {
    padding: 14px 18px !important; border: none !important;
    border-top: 1px solid var(--line) !important; font-size: 14px; vertical-align: middle;
}
body.woocommerce-order-received table.woocommerce-table--order-details tbody a,
body.woocommerce-view-order table.woocommerce-table--order-details tbody a {
    color: var(--wsf-primary) !important; font-weight: 600;
}
body.woocommerce-order-received table.woocommerce-table--order-details tfoot th,
body.woocommerce-order-received table.woocommerce-table--order-details tfoot td,
body.woocommerce-view-order table.woocommerce-table--order-details tfoot th,
body.woocommerce-view-order table.woocommerce-table--order-details tfoot td {
    font-family: var(--font-num);
}
body.woocommerce-order-received .woocommerce-table--order-details .amount,
body.woocommerce-view-order .woocommerce-table--order-details .amount { font-family: var(--font-num); }

/* Invoice / action buttons */
body.woocommerce-order-received .woocommerce-table--order-details .button,
body.woocommerce-view-order .button,
body.woocommerce-order-received .woocommerce-order-details .button {
    background: var(--wsf-btn) !important; color: var(--wsf-btn-text) !important;
    border: none !important; border-radius: var(--r-md) !important;
    font-weight: 600 !important; padding: 9px 18px !important;
}

/* =====================================================================
   ORDER BY SUPPLIERS (plugin section)
   ===================================================================== */
.wsf-order-suppliers-frontend { margin-top: 8px; }
.wsf-supplier-order-section {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
    overflow: hidden; margin-bottom: 18px;
}
.wsf-supplier-order-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    flex-wrap: wrap; padding: 18px 22px;
    background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.wsf-supplier-info-order { display: flex; align-items: center; gap: 12px; }
.wsf-supplier-logo-order { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; }
.wsf-supplier-info-order h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.wsf-supplier-order-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wsf-delivery-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--amber-bg); border: 1px solid var(--amber-line);
    color: #7a5312; border-radius: 999px; padding: 5px 12px;
    font-size: 13px; font-family: var(--font-num);
}
.wsf-delivery-badge strong { font-weight: 700; }
.wsf-status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 999px; padding: 5px 12px;
    font-size: 12px; font-weight: 700; font-family: var(--font-num);
    text-transform: uppercase; letter-spacing: 0.03em;
}
.wsf-status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.wsf-status-pending { background: var(--amber-bg); color: var(--amber); }
.wsf-status-accepted { background: color-mix(in srgb, var(--wsf-primary) 14%, transparent); color: var(--wsf-primary); }
.wsf-status-rejected { background: var(--terra-bg); color: var(--terra); }

.wsf-supplier-items-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.wsf-supplier-items-table thead th {
    background: transparent; color: var(--ink-3);
    font-family: var(--font-num); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    text-align: left; padding: 12px 22px; border-bottom: 1px solid var(--line);
}
.wsf-supplier-items-table tbody td {
    padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle;
}
.wsf-supplier-items-table td.product-cell { display: flex; align-items: center; gap: 12px; }
.wsf-supplier-items-table td.product-cell img { width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; border: 1px solid var(--line); }
.wsf-supplier-items-table .product-name { font-weight: 500; color: var(--ink); }
.wsf-supplier-items-table td:nth-child(2), .wsf-supplier-items-table th:nth-child(2) { font-family: var(--font-num); }
.wsf-supplier-items-table td:nth-child(3), .wsf-supplier-items-table th:nth-child(3) { font-family: var(--font-num); }
.wsf-supplier-items-table tfoot td {
    padding: 14px 22px; font-family: var(--font-num); font-weight: 700; color: var(--ink);
    background: var(--paper-2); border-top: 1px solid var(--line);
}

/* Fulfilment choice (Delivery / Collection) in the checkout drawer */
.wsf-date-row__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

/* Prominent two-card chooser */
.wsf-fulfil-choose {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;
}
.wsf-fulfil-card {
    position: relative; text-align: left; cursor: pointer;
    display: flex; flex-direction: column; gap: 2px;
    padding: 14px 16px; border-radius: var(--r-md);
    background: var(--card); border: 2px solid var(--line-2);
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.1s var(--ease);
}
.wsf-fulfil-card:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.wsf-fulfil-card__icon {
    width: 34px; height: 34px; margin-bottom: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--paper-2); color: var(--ink-2); border-radius: var(--r-sm);
}
.wsf-fulfil-card__icon svg { width: 20px; height: 20px; }
.wsf-fulfil-card__label { font-weight: 700; font-size: 15px; color: var(--ink); letter-spacing: -0.01em; }
.wsf-fulfil-card__sub { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.wsf-fulfil-card__check {
    position: absolute; top: 12px; right: 12px;
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--wsf-primary); color: #fff;
    opacity: 0; transform: scale(0.6); transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.wsf-fulfil-card__check svg { width: 13px; height: 13px; }
.wsf-fulfil-card.is-active {
    border-color: var(--wsf-primary);
    background: color-mix(in srgb, var(--wsf-primary) 6%, var(--card));
    box-shadow: 0 0 0 1px var(--wsf-primary) inset;
}
.wsf-fulfil-card.is-active .wsf-fulfil-card__icon { background: var(--wsf-primary); color: #fff; }
.wsf-fulfil-card.is-active .wsf-fulfil-card__check { opacity: 1; transform: scale(1); }

/* Single-mode tag (no choice to make) */
.wsf-fulfil-tag {
    font-family: var(--font-num); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--wsf-primary); background: color-mix(in srgb, var(--wsf-primary) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--wsf-primary) 24%, transparent); border-radius: 999px; padding: 5px 12px;
}

/* Detail area (dates / address / prompt) */
.wsf-fulfil-detail { margin-top: 2px; }
.wsf-fulfil-prompt {
    margin: 0; padding: 12px 14px; font-size: 13px; color: var(--ink-3);
    background: var(--paper-2); border: 1px dashed var(--line-2); border-radius: var(--r-md);
}
.wsf-collect-addr {
    background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.wsf-collect-addr__label {
    font-family: var(--font-num); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3);
}
.wsf-collect-addr__body { font-style: normal; font-size: 14px; line-height: 1.6; color: var(--ink); }

@media (max-width: 480px) {
    .wsf-fulfil-choose { grid-template-columns: 1fr; }
}

/* Collection badge on the order-received / order views */
.wsf-collection-badge {
    background: color-mix(in srgb, var(--wsf-primary) 10%, transparent) !important;
    border-color: color-mix(in srgb, var(--wsf-primary) 30%, transparent) !important;
    color: var(--wsf-primary) !important;
}

/* Invoice action buttons on the order-received / view-order pages */
.wsf-invoice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.wsf-invoice-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: var(--r-md);
    font-family: var(--font-ui); font-size: 14px; font-weight: 600;
    border: 1px solid var(--line-2); background: var(--card); color: var(--ink) !important;
    text-decoration: none; transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease);
}
.wsf-invoice-btn:hover { background: var(--paper-2); border-color: var(--ink-3); transform: translateY(-1px); text-decoration: none; }
.wsf-invoice-btn--primary {
    background: var(--wsf-primary); border-color: var(--wsf-primary); color: #fff !important;
}
.wsf-invoice-btn--primary:hover { background: var(--wsf-secondary); border-color: var(--wsf-secondary); }

/* =====================================================================
   WC Vendor Pro board compatibility
   The production plugin renders [wcmvo_suppliers_page] with .wcmvo-* classes.
   These rules give that markup the same EPOS treatment as the .wsf-* board.
   ===================================================================== */
.wsf-terminal__board .wcmvo-suppliers-page { max-width: none; padding: 0; }
.wsf-terminal__board .wcmvo-filters {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm); padding: 18px 20px; margin-bottom: 24px;
    position: sticky; top: calc(var(--header-h) + 12px); z-index: 50;
    display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
}
.wsf-terminal__board .wcmvo-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); font-weight: 600; min-width: 160px; }
.wsf-terminal__board .wcmvo-filters__search { flex: 1 1 200px; }
.wsf-terminal__board .wcmvo-filters select,
.wsf-terminal__board .wcmvo-filters input { min-height: 40px; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--ink); background: var(--paper); padding: 0 10px; font: inherit; text-transform: none; letter-spacing: 0; font-weight: 500; }
.wsf-terminal__board .wcmvo-filters select:focus,
.wsf-terminal__board .wcmvo-filters input:focus { border-color: var(--wsf-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wsf-primary) 18%, transparent); outline: none; }
.wsf-terminal__board .wcmvo-filters__actions { display: flex; gap: 8px; }
.wsf-terminal__board .wcmvo-filters .button { min-height: 40px; border-radius: var(--r-sm); font-weight: 600; padding: 0 16px; }
.wsf-terminal__board .wcmvo-filters .button.wcmvo-btn { background: var(--wsf-btn); color: var(--wsf-btn-text) !important; border: 0; }

.wsf-terminal__board .wcmvo-supplier-section { background: transparent; margin: 0 0 34px; padding: 0; border: 0; }
.wsf-terminal__board .wcmvo-supplier-section__head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 0 14px; margin: 0 0 18px; border-bottom: 2px solid var(--ink);
}
.wsf-terminal__board .wcmvo-supplier-section__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.wsf-terminal__board .wcmvo-supplier-section__id img,
.wsf-terminal__board .wcmvo-supplier-section__id .wcmvo-avatar {
    width: 52px; height: 52px; border-radius: var(--r-md); object-fit: contain; padding: 0;
    background: var(--card); border: 1px solid var(--line); color: var(--wsf-primary);
    font-family: var(--font-num); font-weight: 700; flex-shrink: 0;
}
.wsf-terminal__board .wcmvo-supplier-section__id h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 3px; color: var(--ink); }
.wsf-terminal__board .wcmvo-supplier-section__id p { margin: 0; font-family: var(--font-num); font-size: 12px; color: var(--ink-3); }
.wsf-terminal__board .wcmvo-supplier-section__all { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--wsf-primary); white-space: nowrap; text-decoration: none; }

/* product cards (WC Vendor Pro enhanced cards) */
.wsf-terminal__board ul.products li.product.wcmvo-product-card,
.wsf-terminal__board .wcmvo-product-card { display: flex; flex-direction: column; height: 100%; box-shadow: var(--shadow-sm); }
.wsf-terminal__board .wcmvo-product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.wsf-terminal__board .wcmvo-qty-cart { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.wsf-terminal__board .wcmvo-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--paper); }
.wsf-terminal__board .wcmvo-qty__btn { width: 32px; border: 0; background: transparent; color: var(--ink-2); font-size: 16px; cursor: pointer; }
.wsf-terminal__board .wcmvo-qty__btn:hover { background: var(--paper-2); }
.wsf-terminal__board .wcmvo-qty__input { width: 44px; min-height: 34px; padding: 0; border: 0; background: transparent; text-align: center; font-family: var(--font-num); font-weight: 700; font-size: 14px; color: var(--ink); -moz-appearance: textfield; }
.wsf-terminal__board .wcmvo-add-to-cart.button {
    width: 100%; padding: 10px 12px !important; background: var(--wsf-btn) !important; color: var(--wsf-btn-text) !important;
    border: none !important; border-radius: var(--r-sm) !important; font-weight: 600 !important; font-size: 13px !important; letter-spacing: 0.01em;
    transition: background 0.2s var(--ease), transform 0.12s var(--ease) !important;
}
.wsf-terminal__board .wcmvo-add-to-cart.button:hover { background: var(--wsf-secondary) !important; transform: translateY(-1px); }
.wsf-terminal__board .wcmvo-add-to-cart.loading,
.wsf-terminal__board .wcmvo-add-to-cart.is-loading { opacity: 0.7; pointer-events: none; }
.wsf-terminal__board .wcmvo-add-to-cart.added,
.wsf-terminal__board .wcmvo-add-to-cart.is-added { background: var(--wsf-accent) !important; }
.wsf-terminal__board .wcmvo-moq-badge { align-self: flex-start; background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-line); font-family: var(--font-num); font-weight: 700; border-radius: var(--r-xs); font-size: 11px; padding: 2px 7px; }
.wsf-terminal__board .wcmvo-closed-notice { padding: 8px 12px; border-radius: var(--r-sm); background: var(--paper-2); color: var(--ink-3); font-size: 13px; text-align: center; }
.wsf-terminal__board .wcmvo-empty { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink-3); }

/* banners / countdown (plugin-rendered) */
.wcmvo-closed-banner { z-index: 900 !important; }
.wcmvo-countdown { margin-bottom: 20px; }
.wsf-terminal__board .wcmvo-countdown--banner { border-radius: var(--r-lg); background: var(--ink); }

/* order pages (thank-you / my account) */
.wsf-woo-page .wcmvo-order-suppliers { margin: 28px 0; }
.wsf-woo-page .wcmvo-order-supplier { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); margin: 0 0 14px; overflow: hidden; }
.wsf-woo-page .wcmvo-order-supplier__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.wsf-woo-page .wcmvo-order-supplier__name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.wsf-woo-page .wcmvo-order-supplier__name img { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: contain; background: var(--card); border: 1px solid var(--line); }
.wsf-woo-page .wcmvo-order-supplier__name h3 { margin: 0; font-size: 17px; }
.wsf-woo-page .wcmvo-order-supplier__items { width: 100%; border-collapse: collapse; margin: 0; }
.wsf-woo-page .wcmvo-order-supplier__items th,
.wsf-woo-page .wcmvo-order-supplier__items td { padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.wsf-woo-page .wcmvo-chip,
.wsf-woo-page .wcmvo-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--paper-2); border: 1px solid var(--line); }
.wsf-woo-page .wcmvo-status--accepted { background: #dcf5e7; color: #0f6b3a; border-color: #bfe7d0; }
.wsf-woo-page .wcmvo-status--rejected { background: #fde2e1; color: #8f1d1d; border-color: #f5b5b2; }
.wsf-woo-page .wcmvo-status--pending { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.wsf-woo-page .wcmvo-invoice-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 24px; }
.wsf-woo-page .wcmvo-invoice-btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: var(--r-sm); background: var(--wsf-btn); color: var(--wsf-btn-text) !important; font-weight: 600; text-decoration: none; }
.wsf-woo-page .wcmvo-invoice-btn.wcmvo-btn--ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line-2); }
.wsf-woo-page .wcmvo-status-page { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.wsf-woo-page .wcmvo-login { min-height: 60vh; }

@media (max-width: 900px) {
    .wsf-terminal__board .wcmvo-filters { position: static; }
}
