/* MS-SHELL-V2 skin-30-cart — REDESIGN-06 CART (draft by NZ1 (MacBookAir3), 15.11.2026). DRAFT in dev/.
   Zone: signed-in basket, View/Theme/Default/Payment/Cart.php -> <body class="bodypage_payment/cart">,
   escaped in CSS as body.bodypage_payment\/cart. Same markup and classes on safety-courses.co.uk.
   Guest basket (Controller/Payment/Guestcart.php) is a JSON endpoint without its own page: nothing to skin here.
   NOT in this file: the practical-assessment modal .pamodal (#mcja/#mcja2) -> REDESIGN-20 DIALOGS;
   shared .btn/.table/inputs -> skin-05-common; shell -> skin-00/01.
   Rules: every selector = html.msv2 + zone body class; colours only --ms-* tokens; no gradients; nothing hidden
   (except the decorative, aria-hidden "Price per course" column label on tablet, clipped not removed); no text changes.
   !important only where the page's own inline styles or !important rules leave no other way (commented at each place).
   VISUALLY NOT CHECKED (no Chrome on this Mac) — written from the template markup. */

/* ── 1. Page heading ─────────────────────────────────────────────────── */
html.msv2 body.bodypage_payment\/cart .cart-page-title{color:var(--ms-ink);font-weight:700;letter-spacing:-.01em}
html.msv2 body.bodypage_payment\/cart .cart-page-sub{color:var(--ms-muted)}

/* ── 2. Basket = one bordered card: header row, course rows, total bar ── */
html.msv2 body.bodypage_payment\/cart .cart-head-row{
  background:var(--ms-soft);border:1px solid var(--ms-border);border-bottom:0;
  border-radius:var(--ms-radius-lg) var(--ms-radius-lg) 0 0;
  color:var(--ms-muted);font-size:12px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;
}
html.msv2 body.bodypage_payment\/cart .cart-card{
  background:var(--ms-surface);border:1px solid var(--ms-border);border-bottom:0;
  border-radius:0;box-shadow:none;
}
html.msv2 body.bodypage_payment\/cart .cart-card + .cart-card{border-top:1px solid var(--ms-border)}
html.msv2 body.bodypage_payment\/cart .cart-card .cc-img{border-radius:var(--ms-radius);background:var(--ms-soft)}
html.msv2 body.bodypage_payment\/cart .cart-card .cc-img-fallback{color:var(--ms-muted)}
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-title{color:var(--ms-ink);font-weight:600}
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-price,
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-price strong{color:var(--ms-ink)}
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-total{color:var(--ms-ink)}

/* ── 3. Quantity stepper: secondary controls (white + border), not navy/orange ── */
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty .qty-minus,
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty .qty-plus{
  background:var(--ms-surface);background-image:none;color:var(--ms-ink);
  border:1px solid var(--ms-border);border-radius:var(--ms-radius);box-shadow:none;transform:none;
}
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty .qty-minus:hover,
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty .qty-plus:hover{
  background:var(--ms-soft);border-color:var(--ms-navy);color:var(--ms-navy);transform:none;
}
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty input[type="number"]{
  background:var(--ms-surface);color:var(--ms-ink);border:1px solid var(--ms-border);border-radius:var(--ms-radius);
}

/* ── 4. Remove line: quiet red outline, red-soft on hover ── */
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-trash{
  background:var(--ms-surface);color:var(--ms-red);border:1px solid var(--ms-border);border-radius:var(--ms-radius);
}
html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-trash:hover{background:var(--ms-red-soft);border-color:var(--ms-red);color:var(--ms-red)}

/* keyboard focus for every control in the zone */
html.msv2 body.bodypage_payment\/cart .cart-card button:focus-visible,
html.msv2 body.bodypage_payment\/cart .cart-card summary:focus-visible,
html.msv2 body.bodypage_payment\/cart .cart-footer-buttons a:focus-visible,
html.msv2 body.bodypage_payment\/cart .cart-secondary a:focus-visible,
html.msv2 body.bodypage_payment\/cart .bundle-cart-rules input:focus-visible{outline:3px solid var(--ms-navy);outline-offset:2px}

/* ── 5. Volume discounts ("Buy more, pay less") ──
   summary and the price chips carry inline styles in Cart.php (+ CARTIMG !important on summary),
   so colour/size here need !important. Text is untouched. */
html.msv2 body.bodypage_payment\/cart .cart-card details summary{
  color:var(--ms-orange-ink)!important;font-size:13px!important;font-weight:600!important;
  text-transform:none!important;letter-spacing:0!important;
}
html.msv2 body.bodypage_payment\/cart .cart-card details > div > span{
  background:var(--ms-orange-soft)!important;color:var(--ms-ink)!important;
  border:1px solid var(--ms-border);border-radius:999px!important;font-size:12px!important;padding:3px 10px!important;
}

/* ── 6. Bundle rules notice (inline styles -> !important) ── */
html.msv2 body.bodypage_payment\/cart .bundle-cart-rules{
  background:var(--ms-blue-soft)!important;border:1px solid var(--ms-border)!important;
  border-radius:var(--ms-radius-lg)!important;color:var(--ms-ink)!important;
}
html.msv2 body.bodypage_payment\/cart .bundle-cart-rules > b{color:var(--ms-navy)!important}
html.msv2 body.bodypage_payment\/cart .bundle-cart-rules label{color:var(--ms-ink)!important;min-height:44px;align-items:center!important}
html.msv2 body.bodypage_payment\/cart .bundle-cart-rules input[type="checkbox"]{width:18px;height:18px;accent-color:var(--ms-navy);margin-top:0!important;flex:0 0 18px}

/* ── 7. Total bar closes the basket card ── */
html.msv2 body.bodypage_payment\/cart .cart-total-bar{
  background:var(--ms-surface);color:var(--ms-ink);
  border:1px solid var(--ms-border);border-radius:0 0 var(--ms-radius-lg) var(--ms-radius-lg);box-shadow:none;
}
html.msv2 body.bodypage_payment\/cart .cart-total-bar .ctb-label small{color:var(--ms-muted)}
html.msv2 body.bodypage_payment\/cart .cart-total-bar .ctb-amount,
html.msv2 body.bodypage_payment\/cart .cart-total-bar .ctb-amount strong{color:var(--ms-ink)}

/* ── 8. Sticky footer + the ONE orange action ──
   PAY-GREEN-2810 v2 in Cart.php paints the button green with
   "html body #btn-checkout#btn-checkout{...!important}" (2 ids). Only a selector with the same
   two ids plus the zone classes, also !important, can answer it. Display is NOT touched, so
   ".btn-checkout.hidden{display:none!important}" still hides the button for an empty basket.
   CONFLICT TO CONFIRM (see report): Alex chose green on 28.10; the REDESIGN rules say orange = primary, green = success only. */
html.msv2 body.bodypage_payment\/cart .cart-footer-fixed{background:var(--ms-bg);border-top:1px solid var(--ms-border);box-shadow:none}
html.msv2 body.bodypage_payment\/cart .cart-footer-fixed .cart-secure{color:var(--ms-muted)!important}            /* inline colour */
html.msv2 body.bodypage_payment\/cart .cart-footer-fixed .cart-secure .fa-lock{color:var(--ms-green)!important}   /* inline colour */
html.msv2 body.bodypage_payment\/cart #btn-checkout#btn-checkout{
  background:var(--ms-orange)!important;background-image:none!important;border-color:var(--ms-orange)!important;
  color:var(--ms-surface)!important;box-shadow:none!important;border-radius:var(--ms-radius)!important;min-height:52px;
}
html.msv2 body.bodypage_payment\/cart #btn-checkout#btn-checkout:hover,
html.msv2 body.bodypage_payment\/cart #btn-checkout#btn-checkout:focus-visible{
  background:var(--ms-orange-ink)!important;border-color:var(--ms-orange-ink)!important;color:var(--ms-surface)!important;
}

/* secondary action: white with border */
html.msv2 body.bodypage_payment\/cart .cart-secondary .btn-add-more{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;
  background:var(--ms-surface);color:var(--ms-ink);border:1px solid var(--ms-border);border-radius:var(--ms-radius);
  font-size:14px;font-weight:600;
}
html.msv2 body.bodypage_payment\/cart .cart-secondary .btn-add-more:hover{background:var(--ms-soft);border-color:var(--ms-navy);color:var(--ms-navy)}
html.msv2 body.bodypage_payment\/cart .cart-team-note{color:var(--ms-muted);font-size:13px}
html.msv2 body.bodypage_payment\/cart .cart-team-note .fa{color:var(--ms-muted)}

/* ── 9. Tablet 768–1023: the 6-column desktop grid leaves the title ~30px wide.
   Reflow: photo | title + price per course | qty | total | remove. ── */
@media (min-width:768px) and (max-width:1023px){
  html.msv2 body.bodypage_payment\/cart .cart-head-row{grid-template-columns:88px minmax(0,1fr) auto 96px 44px}
  html.msv2 body.bodypage_payment\/cart .cart-head-row .ch-course{grid-column:1 / span 2}
  html.msv2 body.bodypage_payment\/cart .cart-head-row .ch-qty{grid-column:3}
  html.msv2 body.bodypage_payment\/cart .cart-head-row .ch-total{grid-column:4}
  /* decorative label (row is aria-hidden) whose column no longer exists: clipped, not removed */
  html.msv2 body.bodypage_payment\/cart .cart-head-row .ch-price{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  html.msv2 body.bodypage_payment\/cart .cart-card{grid-template-columns:88px minmax(0,1fr) auto 96px 44px;row-gap:4px}
  html.msv2 body.bodypage_payment\/cart .cart-card .cc-media{grid-column:1;grid-row:1 / span 2;width:88px}
  html.msv2 body.bodypage_payment\/cart .cart-card .cc-img{width:88px;height:62px}
  html.msv2 body.bodypage_payment\/cart .cart-card .cc-main{grid-column:2;grid-row:1;align-self:end}
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-price{grid-column:2;grid-row:2;text-align:left;align-self:start;color:var(--ms-muted)}
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-price strong{color:var(--ms-muted)}
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty{grid-column:3;grid-row:1 / span 2}
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-total{grid-column:4;grid-row:1 / span 2}
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-trash{grid-column:5;grid-row:1 / span 2;align-self:center}
  html.msv2 body.bodypage_payment\/cart .cart-card details{grid-column:2 / -1;grid-row:3}
}

/* ── 10. Phone ≤767: 44px touch targets. The page's mobile block sets 34px/50px with !important,
   so the size has to answer in kind (size only, same controls). ── */
@media (max-width:767px){
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty .qty-minus,
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty .qty-plus{
    width:44px!important;height:44px!important;min-width:44px;font-size:18px!important;border-radius:var(--ms-radius)!important;
  }
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty input[type="number"]{
    width:48px!important;height:44px!important;min-width:48px;font-size:16px!important;border-radius:var(--ms-radius)!important;
  }
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-trash{width:44px;height:44px}
  html.msv2 body.bodypage_payment\/cart .cart-card details summary{padding:10px 0;font-size:13px!important}
  html.msv2 body.bodypage_payment\/cart .cart-head-row{font-size:12px}
  html.msv2 body.bodypage_payment\/cart .cart-total-bar{border-radius:0 0 var(--ms-radius-lg) var(--ms-radius-lg)}
  html.msv2 body.bodypage_payment\/cart #btn-checkout#btn-checkout{min-height:52px}
}
/* 320–400: smaller photo so title, stepper and total fit without horizontal scroll */
@media (max-width:400px){
  html.msv2 body.bodypage_payment\/cart .cart-card{grid-template-columns:72px minmax(0,1fr) auto}
  html.msv2 body.bodypage_payment\/cart .cart-card .cc-media{width:72px}
  html.msv2 body.bodypage_payment\/cart .cart-card .cc-img{width:72px;height:52px}
  html.msv2 body.bodypage_payment\/cart .cart-card .cart-card-qty{gap:4px!important}
}
/* SC-CART-DEDUP-1 (owner 16 Nov): the same price was printed four times. Keep the price per course and the one Total;
   drop the per-line total and the amount repeated inside the Checkout button. */
html.msv2 .cart-card-total{display:none!important}
html.msv2 #btn-checkout .bc-amount{display:none!important}
/* SC-CART-DEDUP-1b: with the per-line total hidden, the desktop table kept an empty TOTAL column and the bin slid under it.
   Desktop table = image, course, price, quantity, bin. */
@layer ms-typography {
@media(min-width:901px){
 html.msv2 #ms-frame#ms-frame .cart-head-row .ch-total{display:none!important}
 html.msv2 #ms-frame#ms-frame :is(.cart-head-row,.cart-card){grid-template-columns:120px minmax(0,1fr) 130px 150px 56px!important}
 html.msv2 #ms-frame#ms-frame .cart-card>.cart-card-price{grid-column:3!important}
 html.msv2 #ms-frame#ms-frame .cart-card>.cart-card-qty{grid-column:4!important}
 html.msv2 #ms-frame#ms-frame .cart-card>.cart-card-trash{grid-column:5!important;justify-self:end!important}
}
}
