/* BUK Support – componenten uit het designsysteem (Claude Design), ongewijzigd. Niet met de hand aanpassen: tools/sync-design-system.py */
/* BUK Support — component classes. Plain CSS, no build step.
   Load order: tokens.css → bundle.css → per shop /theme.css (sets --accent). */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 24px; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.muted { color: var(--ink-muted); }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }

/* Shop accent: theme.css only has to set --accent; the rest follows.
   Server-side theme.css should ALSO write the computed hex values for old browsers. */
.accent-auto {
  --accent-dark: color-mix(in oklab, var(--accent) 78%, black);
  --accent-soft: color-mix(in oklab, var(--accent) 10%, white);
}

/* ---------- Button ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control); padding: 0 var(--space-5); border-radius: var(--radius-pill); border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: 16px; line-height: 20px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn-quiet { background: transparent; color: var(--accent); padding: 0 var(--space-3); }
.btn-quiet:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in oklab, var(--danger) 80%, black); color: #fff; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: color-mix(in oklab, var(--whatsapp) 80%, black); color: #fff; }
.btn-big { min-height: 56px; padding: 0 var(--space-6); font-size: 17px; width: 100%; }
.btn-small { min-height: var(--control-sm); padding: 0 var(--space-4); font-size: 14px; }
.btn-icon { width: var(--tap); min-height: var(--tap); padding: 0; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--sunken); color: var(--ink-muted); border-color: var(--line); cursor: not-allowed; }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }

/* ---------- Panel ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: var(--space-4); }
@media (min-width: 720px) { .panel { padding: var(--space-5); } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 0 0 var(--space-4); }
.panel-title { margin: 0; font-size: 20px; line-height: 26px; font-weight: 700; }
.panel-sub { margin: 4px 0 0; color: var(--ink-muted); font-size: 14px; line-height: 20px; }

/* ---------- Field ---------- */
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-weight: 600; font-size: 15px; line-height: 20px; }
.field-opt { font-weight: 400; color: var(--ink-muted); }
.input, .field input, .field select, .field textarea { width: 100%; min-height: var(--control); padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field input:disabled, .field input[readonly] { background: var(--sunken); color: var(--ink-muted); }
.field-help { display: flex; justify-content: space-between; gap: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.field.is-error input, .field.is-error textarea, .field.is-error select { border-color: var(--danger); }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: var(--danger); font-size: 14px; line-height: 20px; font-weight: 600; }
.field-prefix { position: relative; }
.field-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); font-weight: 600; }
.field-prefix > input { padding-left: 34px; }

/* ---------- Notice ---------- */
.notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--sunken); color: var(--ink); font-size: 15px; line-height: 22px; }
.notice strong { display: block; }
.notice .icon { margin-top: 1px; }
.notice-info { background: var(--platform-soft); } .notice-info .icon { color: var(--platform-dark); }
.notice-success { background: var(--success-soft); } .notice-success .icon { color: var(--success); }
.notice-warning { background: var(--warning-soft); } .notice-warning .icon { color: var(--warning); }
.notice-danger { background: var(--danger-soft); } .notice-danger .icon { color: var(--danger); }

/* ---------- Status badge (never accent-coloured) ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: var(--radius-pill); font-size: 13px; line-height: 16px; font-weight: 700; white-space: nowrap; background: var(--neutral-soft); color: var(--neutral); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-success { background: var(--success-soft); color: var(--success); }
.status-warning { background: var(--warning-soft); color: var(--warning); }
.status-warning::before { border-radius: 1px; transform: rotate(45deg); }
.status-danger { background: var(--danger-soft); color: var(--danger); }
.status-danger::before { border-radius: 0; width: 8px; height: 2px; }
.status-neutral::before { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.status-archived { background: transparent; color: var(--neutral); box-shadow: inset 0 0 0 1.5px var(--line-strong); }

/* ---------- Chip (filters) ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.chip:hover { background: var(--sunken); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-count { font-variant-numeric: tabular-nums; opacity: .8; }

/* ---------- Stat tile ---------- */
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); display: grid; gap: 2px; }
.stat-label { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.stat-value { font-size: 28px; line-height: 34px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* ---------- Segmented ---------- */
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--sunken); border-radius: var(--radius-pill); }
.segmented button { min-height: 40px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-card); }

/* ---------- Radio card ---------- */
.radio-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px var(--space-3); align-items: start; padding: var(--space-4); background: var(--card); border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); cursor: pointer; }
.radio-card input { appearance: none; margin: 2px 0 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--card); grid-row: span 2; }
.radio-card input:checked { border: 7px solid var(--accent); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.radio-card:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.radio-card-title { font-weight: 700; }
.radio-card-text { font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* ---------- Choice: pill / swatch / photo tile ---------- */
.choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 var(--space-4); border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.choice:hover { border-color: var(--ink-muted); }
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:disabled { color: var(--ink-muted); background: var(--sunken); border-style: dashed; cursor: not-allowed; text-decoration: line-through; }
.choice-extra { font-weight: 500; color: var(--ink-muted); font-size: 13px; }
.choice-swatch { width: var(--tap); height: var(--tap); padding: 0; border-radius: var(--radius-sm); }
.choice-swatch > i { width: 32px; height: 32px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(11,27,51,.18); }
.choice-swatch[aria-checked="true"] { background: var(--card); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.choice-photo { width: 88px; height: 88px; padding: 0; border-radius: var(--radius-sm); overflow: hidden; }
.choice-photo img { width: 100%; height: 100%; object-fit: cover; }
.choice-photo[aria-checked="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.choice-check { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: none; align-items: center; justify-content: center; }
[aria-checked="true"] > .choice-check { display: inline-flex; }

/* ---------- Stepper ---------- */
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--card); }
.stepper button { width: var(--tap); height: var(--tap); border: 0; background: transparent; color: var(--ink); border-radius: var(--radius-pill); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.stepper button:hover { background: var(--sunken); }
.stepper button:disabled { color: var(--line-strong); cursor: not-allowed; background: transparent; }
.stepper output { min-width: 32px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Goal bar ---------- */
.goal { display: grid; gap: 6px; }
.goal-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); font-size: 14px; line-height: 20px; }
.goal-head b { font-weight: 700; }
.goal-bar { height: 10px; border-radius: var(--radius-pill); background: var(--accent-soft); overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 20%, transparent); }
.goal-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); min-width: 10px; }
.goal-on-navy .goal-bar { background: rgba(255,255,255,.16); box-shadow: none; }
.goal-on-navy .goal-bar > span { background: var(--mint); }

/* ---------- Monogram / logo ---------- */
.mark { width: 48px; height: 48px; flex: none; border-radius: var(--radius-sm); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: -.02em; text-transform: uppercase; }
.mark img { width: 100%; height: 100%; object-fit: contain; background: var(--card); }
.mark-has-logo { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.mark-sm { width: 32px; height: 32px; font-size: 15px; border-radius: 8px; }
.mark-lg { width: 72px; height: 72px; font-size: 32px; border-radius: var(--radius-md); }

/* ---------- Shop card (etalage) ---------- */
.shop-card { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: var(--shadow-card); transition: box-shadow .2s, transform .2s; }
.shop-card:hover { box-shadow: var(--shadow-raised); transform: translateY(-2px); color: var(--ink); }
.shop-card-media { aspect-ratio: 4 / 3; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.shop-card-media img { width: 100%; height: 100%; object-fit: cover; }
.shop-card-media .mark { width: 88px; height: 88px; font-size: 40px; border-radius: var(--radius-md); }
.shop-card-body { padding: var(--space-4); display: grid; gap: var(--space-3); }
.shop-card-name { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; }
.shop-card-sub { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* ---------- Product card ---------- */
.product-card { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.product-card-media { aspect-ratio: 1; background: var(--sunken); }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card-body { padding: var(--space-4); display: grid; gap: var(--space-2); }
.product-card-name { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; }
.product-card-text { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.product-card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); }
.price { font-variant-numeric: tabular-nums; }
.price-from { font-size: 13px; font-weight: 600; color: var(--ink-muted); margin-right: 4px; }

/* ---------- Shop header ---------- */
.shop-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); background: var(--card); border-bottom: 1px solid var(--line); }
.shop-head-name { margin: 0; font-size: 20px; line-height: 24px; font-weight: 800; color: var(--accent); letter-spacing: -.01em; overflow-wrap: anywhere; }
.shop-head-sub { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* ---------- Cart bar ---------- */
.cart-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom)); background: var(--card); box-shadow: var(--shadow-bar); }
.cart-bar-count { position: relative; width: var(--tap); height: var(--tap); border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: inline-flex; align-items: center; justify-content: center; }
.cart-bar-count b { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 12px; line-height: 20px; text-align: center; }
.cart-bar-total { display: grid; line-height: 1.2; margin-right: auto; }

/* ---------- Pay box (3 states) ---------- */
.pay-box { display: grid; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--accent-soft); border: 1.5px solid color-mix(in oklab, var(--accent) 30%, transparent); }
.pay-box-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; }
.pay-box.is-paid { background: var(--success-soft); border-color: color-mix(in oklab, var(--success) 30%, transparent); }

/* ---------- Gift (extra bijdrage) ---------- */
.gift { display: grid; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--gift-soft); }
.gift-label { display: flex; gap: var(--space-2); align-items: center; color: var(--gift); font-weight: 700; }
.gift .choice[aria-pressed="true"] { border-color: var(--gift); background: var(--card); color: var(--gift); box-shadow: inset 0 0 0 1px var(--gift); }

/* ---------- Share link ---------- */
.share-link { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--card); }
.share-link-url { display: flex; align-items: center; gap: var(--space-2); min-height: var(--control); padding: 0 6px 0 14px; border-radius: var(--radius-sm); background: var(--sunken); font-family: var(--font-mono); font-size: 14px; overflow: hidden; }
.share-link-url span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-link-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Toast ---------- */
.toast { display: inline-flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-pill); background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-raised); }
.toast .icon { color: var(--mint); }
.toast-action { background: none; border: 0; color: #fff; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0 0 0 var(--space-2); }

/* ---------- Order card (beheer) ---------- */
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); display: grid; gap: var(--space-3); }
.order-card-head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: flex-start; }
.order-card-no { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }
.toggles { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Table (beheer / platform) ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.table th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); background: var(--sunken); font-weight: 700; padding: 10px var(--space-4); }
.table td { padding: 12px var(--space-4); border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: color-mix(in oklab, var(--sunken) 50%, white); }
.table .num { text-align: right; }

/* ---------- Layout helpers ---------- */
.stack { display: grid; gap: var(--space-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.grid-cards { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.ds-pad { padding: var(--space-5); }
