/* Fix round 1, group fxe: the cart drawer in the dark look (Claude, 14 Nov 2026; PLAN 2.1). PHP: inc/v2/v2-fix1-fxe.php.
   The drawer (footer.php #minicart) is on every page; its body (inc/minicart.php) is replaced by AJAX after every cart change,
   so every rule here goes by the drawer's own classes, under body.chvf1 (the round's switch). Same words, same order, same
   controls. Colours are the site's own: ink #0E0E10, white, the greys of the dark pages, the one green (#34C28A) only on FREE,
   discounts and the free-delivery bar.
   The colour mark in the markup (data-tone="white", footer.php) stays as it is: part 1 sets every colour that mark sets, on
   the same element, so no template is edited and the page's HTML does not change. The empty cart needs no rule of its own.
   1 panel   2 phone: bottom sheet and its slide   3 head   4 lines   5 offers   6 totals and buttons   7 the message */

/* ---------- 1. The panel: the dark family, whatever its colour mark says ---------- */
.chvf1 #minicart .cl-drawer__panel{
  --bg:#0E0E10;--fg:#fff;--fg-2:#B3B4BB;--fg-3:#8A8C93;
  --rule:rgba(255,255,255,.12);--rule-2:rgba(255,255,255,.30);--line-ui:rgba(255,255,255,.44);
  --tint:rgba(255,255,255,.06);--wipe:#D9DADC;--focus:#fff;--logo-w:1;--logo-b:0;
  --k-surface:rgba(255,255,255,.06);--k-surface-2:rgba(255,255,255,.10);--k-ring:transparent;--k-tile-bg:#15161A;
  --k-on-fg:#fff;--k-on-fg-2:#B3B4BB;--k-on-fg-3:#8A8C93;
  --k-on-rule:rgba(255,255,255,.12);--k-on-rule-2:rgba(255,255,255,.30);--k-on-line-ui:rgba(255,255,255,.44);
  --k-on-tint:rgba(255,255,255,.06);--k-on-wipe:#D9DADC;--k-on-focus:#fff;
  --cl-acc-ink:#34C28A;--cl-acc-l:#34C28A;--cl-stock-green:#88B298;
  background-color:#0E0E10;color:#fff;color-scheme:dark}
/* a dark panel on a dark page: the page steps further back, and the panel gets a hairline edge */
.chvf1 #minicart .cl-drawer__scrim{background:rgba(0,0,0,.62)}
@media (min-width:600px){
  .chvf1 #minicart .cl-drawer__panel{box-shadow:0 0 0 1px rgba(255,255,255,.10),0 40px 80px -32px rgba(0,0,0,.9)}
}

/* ---------- 2. Phone: a bottom sheet, as tall as its content, never more than 86 % of the screen ----------
   Also never closer than 56 px to the top of what is on screen now (the iPhone's bars come and go; the drawer's own box
   is fixed to the visible screen), so the page always shows above it and a tap there closes it.
   The two buttons share one row, CHECKOUT (white) on the right like the cart page's bar: 58 px more for the items. */
@media (max-width:599.98px){
  .chvf1 #minicart .cl-drawer__panel{top:auto;right:0;bottom:0;left:0;width:auto;max-height:86%;max-height:min(86vh,calc(100% - 56px));
    border-radius:24px 24px 0 0;box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 -24px 60px -24px rgba(0,0,0,.85);
    opacity:1;transform:translateY(100%);transition:transform .36s cubic-bezier(.32,.72,0,1)}
  .chvf1 #minicart[data-open] .cl-drawer__panel{transform:none}
  .chvf1 #minicart:not([data-open]) .cl-drawer__panel{transition:transform .22s cubic-bezier(.4,0,1,1)}
  .chvf1 #minicart .cm-mini__foot{padding-top:12px;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
  .chvf1 #minicart .cm-mini__foot .k-sum__row{padding-top:6px;padding-bottom:6px}
  .chvf1 #minicart .cm-mini__foot .k-sum__row--total{padding-top:10px}
  .chvf1 #minicart .cm-mini__foot .k-progress{margin-top:10px}
  .chvf1 #minicart .cm-mini__note{margin-top:10px}
  .chvf1 #minicart .cm-mini__cta{margin-top:14px;display:flex;flex-direction:row-reverse;gap:10px}
  .chvf1 #minicart .cm-mini__cta .btn{width:auto;min-width:0;padding:0 16px;flex:1 1 0}
  .chvf1 #minicart .cm-mini__cta .btn--black{flex-grow:1.35}
  .chvf1 #minicart .cm-mini--empty{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
  /* no white lines (Alik, 19 Nov 2026: "the cart shows without these white lines"): no hairline under "Cart", and the top
     edge is a faint glint instead of a line; the sheet stands out from the page by its own shadow */
  .chvf1 #minicart .cl-drawer__head{border-bottom-color:transparent}
  .chvf1 #minicart .cl-drawer__panel{box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 -24px 60px -24px rgba(0,0,0,.85)}
}
/* iPhone Safari showed the panel's keyboard ring (2 px white all round, foundation.css) after a TAP opened the cart. On touch
   screens the panel itself shows no ring; every button and link inside keeps its own. */
@media (hover:none) and (pointer:coarse){
  .chvf1 #minicart .cl-drawer__panel:focus-visible{outline:none}
}
/* a very short screen (a phone on its side): head, items, totals and buttons scroll as one, so nothing is squeezed to nothing */
@media (max-height:520px){
  .chvf1 #minicart .cm-mini{flex:none}
  .chvf1 #minicart .cm-mini__scroll{flex:none;overflow:visible}
}

/* ---------- 3. Head ---------- */
.chvf1 #minicart .cl-drawer__close{background:rgba(255,255,255,.04)}

/* ---------- 4. Lines: 64 px picture tiles (PLAN 2.1), the pictures the cart page shows ---------- */
.chvf1 #minicart .cm-mini .k-line{grid-template-columns:64px minmax(0,1fr)}
.chvf1 #minicart .cm-mini .k-line__img{width:64px;height:64px;background:#15161A;outline:1px solid rgba(255,255,255,.06);outline-offset:-1px}
/* the silver vial's cut-out fills its tile (same rule as the cart page, assets/v4/v2-dark.css part 9) */
.chvf1 #minicart img.k-line__img.chv2-c{padding:0;object-fit:cover;object-position:50% 50%}
.chvf1 #minicart .cm-mini__scroll{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.22) transparent}
/* small links, full-size touch areas (44 px): the name grows into the line's own top padding, "Edit stack" downwards */
.chvf1 #minicart .k-line__name a,.chvf1 #minicart .sx-tag__a{position:relative}
.chvf1 #minicart .k-line__name a::after{content:"";position:absolute;left:0;right:-8px;top:-14px;bottom:-10px}
.chvf1 #minicart .sx-tag__a::after{content:"";position:absolute;left:-8px;right:-12px;top:-8px;bottom:-18px}

/* ---------- 5. Offers: the free line, the "+1 FREE" line, the stack tag ---------- */
.chvf1 #minicart .sx-b2g1 .clb-ico,.chvf1 #minicart .sx-b2g1.is-near .clb-ico{background:#10241b!important;outline:0}   /* its own rule is !important (inc/v2/z9-b2g1.php) */
.chvf1 #minicart .clb-svg{stroke:#34C28A}
.chvf1 #minicart .clb-badge{box-shadow:0 0 0 2px #0E0E10}
.chvf1 #minicart .sx-tag__t{border-color:rgba(52,194,138,.45);background:rgba(52,194,138,.10);color:#34C28A}
.chvf1 #minicart .sx-tag__a:hover{color:#B3B4BB}
/* the one glint across the offer tile when it applies: a glint on dark glass, not a white flash */
@media (prefers-reduced-motion:no-preference){
  .chvf1 #minicart .sx-gift.is-on .sx-gift__img::after{background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,.22) 50%,transparent 60%)}
}

/* ---------- 6. Totals and buttons ---------- */
.chvf1 #minicart p.k-progress--free::before{content:"";display:inline-block;width:6px;height:6px;margin-right:8px;vertical-align:1px;border-radius:50%;background:#34C28A}
.chvf1 #minicart .btn--black{--btn-bg:#fff;--btn-fg:#0e0e10;--btn-wipe:#D9DADC}
.chvf1 #minicart .btn--ghost{--btn-line:rgba(255,255,255,.30)}
@media (hover:hover) and (pointer:fine){
  .chvf1 #minicart .btn--black:hover{--btn-bg:var(--bt-soft-fill,#e4e5e9)}
  .chvf1 #minicart .btn--ghost:hover{--btn-line:#fff}
}

/* ---------- 7. The "Added to cart" message never lies on the open drawer (v2-fix1-fxe.js closes it; this holds the rest) ---------- */
.chvf1 #minicart[data-open] ~ .cl-toast{opacity:0;pointer-events:none}
