/*
 * Side cart (FunnelKit Cart 1.9.1.2) to the design. Package 8c-3, 13 Oct 2026.
 *
 * Design: design/global/mini-cart (the filled drawer, desktop and mobile) and design/empty-cart
 * (the empty drawer). Plan: design/cart-checkout/build-plan.md, section 11 (Q3 (a)).
 *
 * Why a stylesheet and not Bricks: FunnelKit prints its own markup in the page footer, so Bricks'
 * classes and controls can't reach it. The drawer's colours come from FunnelKit's --fkcart-*
 * variables, which inc/funnelkit.php points at our colour tokens; everything here uses the site's
 * variables (colours, type, spacing, radius), so a token change in Bricks reaches the drawer too.
 *
 * How the rules win: this file loads after FunnelKit's stylesheet (inc/funnelkit.php), and each
 * selector repeats FunnelKit's own selector for the same property, or adds one class to it, so
 * equal or higher specificity plus later order wins. Where FunnelKit uses !important the comment
 * says so. The markup changed by our template overrides (cart-for-woocommerce/cart/) is noted
 * where it's styled.
 *
 * Known differences from Figma, by decision: PROCEED TO CHECKOUT is the system's Large button
 * (56 px, D8) rather than 61 px; grey text (#a3a3a3) is Muted text (D1, contrast); the item
 * image sits on Mist rather than #e5e2e1 (no token); the overlay is D6 (Primary 40% + 4 px blur)
 * rather than black 32%; on phones the drawer covers the header (Ali, 13 Oct); Subscribe & Save,
 * Subscription Savings, PayPal and "Pay in 4" aren't built (Phase 2 / no keys).
 */

/* ---------------------------------------------------------------------------------------------
 * 1. The drawer, its overlay and keyboard focus
 * ------------------------------------------------------------------------------------------- */

/* Overlay: D6, Primary at 40% with a 4 px blur, as the site's pop-up (Figma's black 32% is the
   older of the two overlays). FunnelKit: black at opacity .3. */
#fkcart-modal .fkcart-modal-backdrop {
  background-color: var(--color-overlay);
  opacity: 1;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Keyboard focus: the site's 2 px Primary outline. FunnelKit removes outlines on its buttons,
   inputs and icons with selectors up to two IDs deep (e.g. "#fkcart-modal .fkcart-coupon-area
   .fkcart-coupon-input-wrap #fkcart-coupon__input:focus { outline: 0 }"), hence !important.
   The title is left out: the script focuses it when the drawer opens, as the dialog's start. */
#fkcart-modal .fkcart-preview-ui :focus-visible:not(.fkcart-title) {
  outline: 2px solid var(--color-primary) !important;
  outline-offset: 2px;
}

/* The scrolling part (items and cross-sells): a thin Sage scroll bar. FunnelKit draws a 6 px
   #666 bar with "::-webkit-scrollbar"; the standard properties replace it where supported. */
#fkcart-modal .fkcart-reward-product-wrap {
  scrollbar-width: thin;
  scrollbar-color: var(--color-sage) transparent;
}

/* A visually hidden label (the cross-sell button's product name, cart/upsell-style2.php). */
#fkcart-modal .fl-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------------------------------------
 * 2. Header: "Your Ritual (1 item)" and the close button (cart/header-style1.php)
 * Design: padding 24/32, a bottom border, H4 Cormorant + Body count, a 13 px cross.
 * ------------------------------------------------------------------------------------------- */

/* FunnelKit: 12 px top and bottom, 16 px sides (".fkcart-panel"), no border. Figma's border
   #c1c8c2 has no token; Sage is the nearest. */
#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading {
  gap: var(--space-s);
  padding: var(--space-l) var(--space-xl);
  border-bottom: 1px solid var(--color-sage);
}

/* The title, an <h2> in our override: H4 (Cormorant 700, 32/38). FunnelKit: 16 px, weight 600. */
#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading .fkcart-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-2xs);
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  font-weight: 700;
  color: var(--color-dark-green);
}

/* The title takes focus (by script) only as the dialog's starting point; it isn't a control,
   so it shows no outline (the theme style outlines every focused element). */
#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading .fkcart-title:focus {
  outline: none;
}

/* "(1 item)": Body in Muted text. FunnelKit gives the count's span a 4 px left margin. */
#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading .fkcart-title .fkcart-title-count {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 400;
  color: var(--color-text-muted);
}

/* The close button (a <button> in our override): a 32 px round target with the designer's 14 px
   cross, drawn as a mask so it takes the text colour. FunnelKit styles it as a flex row only. */
#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading .fkcart-modal-close {
  flex-shrink: 0;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: calc(var(--space-2xs) * -1);
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-dark-green);
  cursor: pointer;
}

#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading .fkcart-modal-close::before {
  content: "";
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: url(../../icons/design/drawer-close.svg) center / contain no-repeat;
  mask: url(../../icons/design/drawer-close.svg) center / contain no-repeat;
}

#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading .fkcart-modal-close:hover {
  color: var(--color-primary);
}

/* ---------------------------------------------------------------------------------------------
 * 3. Free-shipping bar (cart/rewards.php)
 * Design: Mist panel, padding 24/32; the message left with a truck right; a 6 px Sage track
 * with a Primary fill; START and FREE SHIPPING at 10 px under it.
 * ------------------------------------------------------------------------------------------- */

/* FunnelKit: 8 px top and bottom, 16 px sides, a bottom border (removed by its own
   "body #fkcart-modal .fkcart-preview-ui .fkcart-reward-panel { border: none }"). */
#fkcart-modal .fkcart-preview-ui .fkcart-reward-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-l) var(--space-xl);
  background-color: var(--color-mist);
}

/* The message: Body in Dark Green, left-aligned. FunnelKit: 12 px, centred, Muted. */
#fkcart-modal .fkcart-reward-panel .fkcart-reward-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  margin: 0;
  padding-bottom: var(--space-3xs);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  text-align: left;
  color: var(--color-dark-green);
}

/* The designer's truck (16 x 11), as a mask in the text colour. */
#fkcart-modal .fkcart-reward-panel .fl-reward-icon {
  flex-shrink: 0;
  width: 16px;
  height: 12px;
  background-color: currentColor;
  -webkit-mask: url(../../icons/design/drawer-truck.svg) center / contain no-repeat;
  mask: url(../../icons/design/drawer-truck.svg) center / contain no-repeat;
}

/* The track: 6 px, Sage. FunnelKit: #ccc, its bar 10 px tall. */
#fkcart-modal .fkcart-reward-panel .fkcart-progress-wrap {
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--color-sage);
}

#fkcart-modal .fkcart-reward-panel .fkcart-progress-wrap .fkcart-progress-bar {
  height: 100%;
}

/* START and the reward's label, 10 px with 0.5 px tracking, each at its point on the track. */
#fkcart-modal .fkcart-reward-panel .fl-reward-labels {
  position: relative;
  height: 1rem;
  font-size: 0.625rem;
  line-height: 1rem;
  letter-spacing: 0.05em;
}

#fkcart-modal .fkcart-reward-panel .fl-reward-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-weight: 700;
  color: var(--color-primary);
}

/* START sits at the left edge and is Regular, Muted text (Figma's grey, D1). */
#fkcart-modal .fkcart-reward-panel .fl-reward-label--start {
  left: 0;
  transform: none;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* The last reward ends at the track's right edge. */
#fkcart-modal .fkcart-reward-panel .fl-reward-label--end {
  transform: translateX(-100%);
}

/* ---------------------------------------------------------------------------------------------
 * 4. Items (FunnelKit's cart/item-single.php, not overridden)
 * Design: padding 32; a 96 px image, 24 px gap; the name in Inter 600 18 Primary; the size and
 * spec line in 12/16 Muted; the bin top right; the stepper, with the price at its right
 * (Ali, 13 Oct: Subscribe & Save, where Figma puts the price, is Phase 2).
 * ".fkcart--item-parent" scopes these rules to cart items: the cross-sell cards share
 * ".fkcart--item" but not the parent.
 * ------------------------------------------------------------------------------------------- */

/* The list. FunnelKit: 16 px top only (".fkcart-pt-16"), items 16 px from the panel's sides. */
#fkcart-modal .fkcart-slider-body > .fkcart-item-wrap:not(.fkcart-carousel-wrap) {
  padding: var(--space-xl);
}

/* Items stack 24 px apart with a divider, as on the cart page's mobile list. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent + .fkcart--item-parent {
  margin-top: var(--space-l);
  padding-top: var(--space-l);
  border-top: 1px solid var(--color-border);
}

/* One item: image and text 24 px apart. FunnelKit: a 16 px gap and margin, 16 px side padding. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent > .fkcart--item {
  gap: var(--space-l);
  margin: 0;
  padding: 0;
}

/* The bin is positioned against the item, not the image (FunnelKit: ".fkcart-thumb-wrap {
   position: relative }", with the cross over the image's top-left corner). */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-thumb-wrap {
  position: static;
}

/* The image: 96 px on Mist. FunnelKit: 60 px. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-image-wrapper {
  align-items: center;
  justify-content: center;
  width: 6rem;
  height: 6rem;
  flex: 0 0 6rem;
  background-color: var(--color-mist);
}

/* FunnelKit: an 8 px radius and a #dedfea border on the image. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  border-radius: 0;
}

/* The bin: top right of the item, 24 px target (44 px on touch screens, below). FunnelKit: a
   28 px target over the image's top-left corner. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-remove-item {
  top: -6px;
  right: -7px;
  left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-text-muted);
}

/* The designer's bin (9 x 10) as a mask, in place of FunnelKit's grey round cross. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-remove-item span {
  position: static;
  width: 9px;
  height: 10px;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: url(../../icons/design/drawer-trash.svg) center / contain no-repeat;
  mask: url(../../icons/design/drawer-trash.svg) center / contain no-repeat;
}

#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-remove-item span svg {
  display: none;
}

#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-remove-item:hover {
  color: var(--color-error);
}

/* Name and details across the top, then the stepper with the price at its right. FunnelKit
   lays the item out as two columns (60% details and stepper, 40% price). The details block
   becomes "display: contents" so its two parts can sit on the grid (it has no role). */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-item-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "details details"
    "quantity price";
  align-items: center;
  gap: var(--space-s);
  min-width: 0;
}

#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-item-wrap-start .fkcart-item-meta {
  display: contents;
}

/* Room on the right for the bin. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-item-title-price {
  grid-area: details;
  padding-right: var(--space-l);
}

#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-qty-wrap {
  grid-area: quantity;
}

/* FunnelKit: 40% wide, a column. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-item-wrap-start .fkcart-item-misc {
  grid-area: price;
  width: auto;
  max-width: none;
}

/* The name: Inter 600, 18 px, Primary. FunnelKit: 14 px. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-item-title {
  margin-bottom: var(--space-3xs);
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  font-weight: 600;
  color: var(--color-primary);
}

#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-item-title:hover {
  text-decoration: underline;
}

/* The size (WooCommerce's variation data) and the spec line (inc/funnelkit.php): Caption,
   Muted text. FunnelKit: 12 px at 1.5. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-item-meta-content,
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fl-drawer-spec {
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  color: var(--color-text-muted);
}

#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fl-drawer-spec {
  margin-top: var(--space-3xs);
}

/* The line price: Body, Dark Green. FunnelKit: 14 px. */
#fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-item-price {
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

/* The stepper, as the site's quantity field (class fl-quantity): white, a Border-colour edge,
   radius 4, 32 x 36 buttons and a 28 px bold value. FunnelKit: a 1 px shadow ring, radius 6,
   28 x 24 buttons. */
#fkcart-modal .fkcart-quantity-selector {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  box-shadow: none;
  background-color: var(--color-white);
}

#fkcart-modal .fkcart-quantity-selector .fkcart-quantity-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2.25rem;
  color: var(--color-dark-green);
}

#fkcart-modal .fkcart-quantity-selector .fkcart-quantity-button svg {
  width: 12px;
  height: 12px;
  color: var(--color-dark-green);
}

/* The theme style gives inputs a 48 px minimum height. */
#fkcart-modal .fkcart-quantity-selector .fkcart-quantity__input {
  width: 1.75rem;
  min-width: 1.75rem;
  height: 2.25rem;
  min-height: 0;
  max-height: none;
  padding: 0;
  font-size: var(--text-small);
  line-height: 1;
  font-weight: 700;
  color: var(--color-dark-green);
}

/* ---------------------------------------------------------------------------------------------
 * 5. Cross-sells, "Complete Your Routine" (cart/upsell-style2.php)
 * Design: Mist section, padding 40/32, Inter 700 16 heading 24 px above a row of white 240 px
 * cards 16 px apart (the next card cut off by the drawer's edge); each card: a 64 px image on
 * Mist, the range (10 px, Muted), the name (Inter 600 14/20), "ADD + $20.00" (10 px, underlined).
 * ------------------------------------------------------------------------------------------- */

/* FunnelKit: the panel colour with a bottom border. */
#fkcart-modal .fkcart-slider-body .fkcart-carousel-wrap.fkcart-upsell-style2 {
  padding: var(--space-2xl) var(--space-xl);
  border: 0;
  background-color: var(--color-mist);
}

/* The heading (an <h3> in our override). FunnelKit: 600 weight, 16 px above and below, 16 px
   side padding. Room on the right for the arrows. */
#fkcart-modal .fkcart-carousel-wrap.fkcart-upsell-style2 .fkcart-upsell-heading {
  margin: 0 0 var(--space-l);
  padding: 0 4.5rem 0 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 700;
  color: var(--color-dark-green);
}

/* FunnelKit: 40 px side padding for its arrows, plus the panel's 16 px. */
#fkcart-modal .fkcart-carousel-wrap.fkcart-upsell-style2 .fkcart-carousel {
  padding: 0;
}

/* The row runs to the drawer's edge, so the next card is cut off there, as designed. */
#fkcart-modal .fkcart-upsell-style2 .fkcart-carousel__viewport {
  width: auto;
  margin-right: calc(var(--space-xl) * -1);
}

/* FunnelKit: a -15 px start margin. */
#fkcart-modal .fkcart-upsell-style2 .fkcart-carousel__container {
  margin-left: 0;
}

/* A card: 240 px, white, image left. FunnelKit: half the row, a centred column. */
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item.fkcart-carousel__slide {
  flex: 0 0 15rem;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-s);
  min-width: 0;
  margin: 0 var(--space-s) 0 0;
  padding: var(--space-s);
  text-align: left;
  background-color: var(--color-white);
}

/* The image: 64 px on Mist. FunnelKit: centred, up to 120 px (50-96 px on smaller screens). */
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-image-wrapper {
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  flex: 0 0 4rem;
  margin: 0;
  background-color: var(--color-mist);
}

#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-image-wrapper img,
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-image-wrapper span {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  border: 0;
  border-radius: 0;
}

/* The text column. FunnelKit: a row with a 16 px gap. */
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-item-info {
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2xs);
  min-width: 0;
}

#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-item-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* The range: 10 px, Muted. Range names are stored in title case, so it's set in capitals here
   (an eyebrow label: the case rule's exception). */
#fkcart-modal .fkcart-upsell-style2 .fl-upsell-range {
  font-size: 0.625rem;
  line-height: 1rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* The name: Inter 600 14/20, Dark Green (Figma's Medium folds into 600, D5). FunnelKit: 14 px
   at 1.5, clipped. */
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-item-title {
  margin: 0;
  overflow: visible;
  font-size: var(--text-small);
  line-height: var(--leading-small);
  font-weight: 600;
  color: var(--color-dark-green);
}

#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-item-title:hover {
  text-decoration: underline;
}

/* "ADD + $20.00": 10 px capitals in Primary over a 1 px Dark Green rule, as designed (a border,
   so the rule runs unbroken under the label and the price), with 7 px above so the target is
   24 px tall. FunnelKit: an outlined 13 px button. (A button's label is allowed capitals.) */
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-button {
  gap: 0.25em;
  min-height: 1.5rem;
  margin: 0;
  padding: 7px 0 0;
  border: 0;
  border-bottom: 1px solid var(--color-dark-green);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.625rem;
  line-height: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-primary);
  cursor: pointer;
}

#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-button:hover {
  border-bottom-color: var(--color-primary);
  opacity: 1;
}

/* The price inside the button takes the button's type and colour. FunnelKit: 13 px Primary. */
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-button .fkcart-item-price,
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-button .fkcart-item-price .woocommerce-Price-amount,
#fkcart-modal .fkcart-item-wrap.fkcart-upsell-style2 .fkcart--item .fkcart-button .fkcart-item-price .woocommerce-Price-amount * {
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  color: inherit;
}

/* The arrows: at the heading's right end, 28 px targets. FunnelKit: 16 px, beside the cards. */
#fkcart-modal .fkcart-upsell-style2 .fkcart-nav-btn {
  top: -3.25rem;
  display: flex;
  width: 1.75rem;
  height: 1.75rem;
  transform: none;
  background: transparent;
  color: var(--color-dark-green);
}

#fkcart-modal .fkcart-upsell-style2 .fkcart-nav-btn--prev {
  right: 2rem;
  left: auto;
}

#fkcart-modal .fkcart-upsell-style2 .fkcart-nav-btn--next {
  right: 0;
}

#fkcart-modal .fkcart-upsell-style2 .fkcart-nav-btn svg {
  width: 16px;
  height: 16px;
}

/* No dots in the design; the arrows and a swipe do the same job. */
#fkcart-modal .fkcart-upsell-style2 .fkcart-carousel-dots {
  display: none;
}

/* ---------------------------------------------------------------------------------------------
 * 6. Summary (cart/order-summary.php) and checkout button
 * Design: Mist footer, a Sage top border, padding 32, 24 px gaps; the promo field and APPLY;
 * Subtotal and Shipping rows (Body: label Muted, value Dark Green); Total in H4 Primary;
 * PROCEED TO CHECKOUT; the shipping note under it.
 * ------------------------------------------------------------------------------------------- */

/* FunnelKit: "body #fkcart-modal .fkcart-preview-ui .fkcart-slider-footer { border: none }" and
   ".fkcart-pb-16" padding. */
body #fkcart-modal .fkcart-preview-ui .fkcart-slider-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
  padding: var(--space-xl);
  border-top: 1px solid var(--color-sage);
  background-color: var(--color-mist);
}

/* An empty cart has no summary, coupon or button, so no footer. */
body #fkcart-modal .fkcart-preview-ui.has-zero-state .fkcart-slider-footer,
#fkcart-modal .fkcart-slider-footer .fkcart-below-checkout-upsell:empty {
  display: none;
}

/* FunnelKit: 12/16 px padding, and top and bottom borders
   ("body #fkcart-modal .fkcart-preview-ui .fkcart-coupon-area"). */
body #fkcart-modal .fkcart-preview-ui .fkcart-coupon-area {
  padding: 0;
  border: 0;
}

/* The coupon's collapsible header has no title here (the field is always open), so FunnelKit
   would show an empty row with a chevron. */
#fkcart-modal .fkcart-coupon-area .fkcart-coupon-head {
  display: none;
}

#fkcart-modal .fkcart-coupon-area .fkcart-coupon-body {
  margin-top: 0;
}

#fkcart-modal .fkcart-coupon-area .fkcart-coupon-input-wrap {
  gap: var(--space-2xs);
}

/* The field: as the site's input (white, Border edge, radius 4, 48 px, 16 px text so phones
   don't zoom). FunnelKit: transparent, 13 px, square on the right to join its button. */
#fkcart-modal .fkcart-coupon-area .fkcart-coupon-input-wrap #fkcart-coupon__input,
#fkcart-modal .fkcart-coupon-area .fkcart-coupon-input-wrap #fkcart-coupon__input:focus,
#fkcart-modal .fkcart-coupon-area .fkcart-coupon-input-wrap #fkcart-coupon__input:hover {
  height: 3rem;
  min-height: 0;
  max-height: none;
  padding: 0 var(--space-s);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  background-color: var(--color-white);
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--color-dark-green);
}

#fkcart-modal .fkcart-coupon-area .fkcart-coupon-input-wrap #fkcart-coupon__input:focus {
  border-color: var(--color-primary);
}

#fkcart-modal .fkcart-coupon-area .fkcart-coupon-input-wrap.has-error #fkcart-coupon__input {
  border-color: var(--color-error);
}

#fkcart-modal .fkcart-coupon-area .fkcart-coupon-input-wrap #fkcart-coupon__input::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

/* APPLY: Primary, Inter 600 12 px with 1.2 px tracking, 48 px tall. FunnelKit: 15 px, 36 px,
   rounded on the right only. */
#fkcart-modal .fkcart-coupon-area .fkcart-coupon-input-wrap .fkcart-coupon-button {
  height: 3rem;
  max-height: none;
  margin: 0;
  padding: 0 var(--space-l);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-s);
  background-color: var(--color-primary);
  font-size: var(--text-caption);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
}

#fkcart-modal .fkcart-coupon-area .fkcart-coupon-input-wrap .fkcart-coupon-button:hover {
  border-color: var(--color-dark-green);
  background-color: var(--color-dark-green);
  opacity: 1;
}

/* FunnelKit: 16 px padding (".fkcart-order-summary", ".fkcart_summary_cta", ".fkcart-panel"). */
#fkcart-modal .fkcart-slider-footer .fkcart-order-summary,
#fkcart-modal .fkcart-slider-footer .fkcart-checkout-wrap {
  padding: 0;
}

#fkcart-modal .fkcart-slider-footer .fkcart_summary_cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
  padding: 0;
}

/* Rows 12 px apart. FunnelKit: a 4 px bottom margin. */
#fkcart-modal .fkcart-order-summary .fkcart-order-summary-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item {
  align-items: baseline;
  gap: var(--space-s);
  margin: 0;
}

/* Labels: Body, Muted (Figma's grey, D1). FunnelKit: 14 px; its shipping row's rule
   ("... .fkcart-shipping-wrap .fkcart-summary-text") is matched by the second selector. */
#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item .fkcart-summary-text,
#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item.fkcart-shipping-wrap .fkcart-summary-text,
#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item .fkcart-coupon-label {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-text-muted);
}

/* Values: Body, Dark Green (coupon savings stay Primary, FunnelKit's coupon colour). */
#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item .fkcart-summary-amount,
#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item.fkcart-shipping-wrap .fkcart-summary-amount {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  text-align: right;
  color: var(--color-dark-green);
}

/* FunnelKit spaces an amount's parts 8 px apart (a flex gap), which split the coupon's
   "-$3.50" into "- $3.50". */
#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item .fkcart-summary-amount {
  gap: 0;
}

/* The applied coupon's code, as the site's chip (Mist, a Border-colour edge, fully rounded,
   Dark Green). FunnelKit hard-codes a lime dashed edge (#5ba238) on #f1fded, #353030 text and
   a #82838e remove circle. */
#fkcart-modal .fkcart-coupon-applied .fkcart-coupon-code.fkcart-coupon-code-wrapper {
  border: 1px solid var(--color-border);
  background-color: var(--color-mist);
}

#fkcart-modal .fkcart-coupon-applied .fkcart-coupon-code.fkcart-coupon-code-wrapper span {
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  color: var(--color-dark-green);
}

#fkcart-modal .fkcart-coupon-applied .fkcart-coupon-code-wrapper .fkcart-remove-coupon {
  background-color: var(--color-text-muted);
}

/* Package F1: a fee row (the bundle saving, order-summary.php) keeps the label's Muted and shows
   its saving in Primary, as FunnelKit colours a coupon's. */
#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item.fl-summary-fee .fkcart-summary-amount {
  color: var(--color-primary);
}

/* Package F1: the bundle nudge above Subtotal ("Add 1 more tincture to save 10%."): Small, 600,
   Primary, on a white panel with the Border edge so it stands out on the Mist footer (my
   styling; the design has no nudge). */
#fkcart-modal .fkcart-order-summary .fl-bundle-nudge {
  margin: 0;
  padding: var(--space-2xs) var(--space-s);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  background-color: var(--color-white);
  font-size: var(--text-small);
  line-height: var(--leading-small);
  font-weight: 600;
  color: var(--color-primary);
}

/* Total: H4 (Cormorant 700, 32/38) in Primary, label and amount, 8 px more space above. */
#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item.fl-summary-total {
  padding-top: var(--space-2xs);
}

#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item.fl-summary-total .fkcart-summary-text,
#fkcart-modal .fkcart-order-summary .fkcart-summary-line-item.fl-summary-total .fkcart-summary-amount {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  font-weight: 700;
  color: var(--color-primary);
}

/* Package H1: a trade user's note under Total ("Prices exclude GST and delivery. GST and courier
   charges are added at invoicing.", order-summary.php): Small and Muted, like the cart page's and
   the store checkout's notes (Bricks Text with fl-text-small and fl-text-muted). */
#fkcart-modal .fkcart-order-summary .fl-trade-totals-note {
  margin: 0;
  font-size: var(--text-small);
  line-height: var(--leading-small);
  color: var(--color-text-muted);
}

#fkcart-modal .fkcart-order-summary .fkcart-text-light:empty {
  display: none;
}

/* PROCEED TO CHECKOUT: the site's Large button (class fl-button fl-button--large: Inter 300,
   16 px capitals, 0.03em tracking, 56 px, radius 4, Dark Green on hover). FunnelKit: 18 px,
   weight 500, 40 px, an opacity hover. */
#fkcart-modal .fkcart-slider-footer .fkcart-checkout-wrap #fkcart-checkout-button {
  align-items: center;
  min-height: 3.5rem;
  padding: var(--space-xs) var(--space-xl);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-s);
  font-family: Inter, system-ui, sans-serif;
  font-size: var(--text-button);
  line-height: var(--leading-button);
  font-weight: 300;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background-color 0.2s, border-color 0.2s;
}

#fkcart-modal .fkcart-slider-footer .fkcart-checkout-wrap #fkcart-checkout-button:hover {
  border-color: var(--color-dark-green);
  background-color: var(--color-dark-green);
  opacity: 1;
}

#fkcart-modal .fkcart-slider-footer .fkcart-checkout-wrap #fkcart-checkout-button .fkcart-checkout--text {
  margin: 0;
}

/* "Shipping calculated at checkout." (inc/funnelkit.php): Body, Muted, centred, 12 px under the
   button as designed. */
#fkcart-modal .fkcart-slider-footer .fl-drawer-note {
  margin: calc(var(--space-xs) * -1) 0 0;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  text-align: center;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------------------------------
 * 7. Empty cart (FunnelKit's cart/zero-item-state.php, not overridden)
 * Design (design/empty-cart): a Mist panel under the header, padding 59/20, centred, gap 17;
 * the designer's 128 px bag illustration; "Your Cart Is Empty" (H5, Primary); the line in Body,
 * Muted, 216 px wide; SHOP PRODUCTS as the Large button, 338 px.
 * ------------------------------------------------------------------------------------------- */

/* FunnelKit: the full height (it fills the body's one grid row), centred, 20 px padding. The
   design's panel ends under the button, with the drawer's white below. */
#fkcart-modal .fkcart-zero-state {
  align-self: start;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-s);
  height: auto;
  padding: 3.75rem var(--space-m);
  background-color: var(--color-mist);
}

/* The illustration (icons/design/empty-cart.svg, decorative) in place of FunnelKit's cart icon. */
#fkcart-modal .fkcart-zero-state .fkcart-icon-cart {
  width: 8rem;
  height: 8rem;
  background: url(../../icons/design/empty-cart.svg) center / contain no-repeat;
}

#fkcart-modal .fkcart-zero-state .fkcart-icon-cart svg {
  display: none;
}

/* FunnelKit: 18 px, weight 500. */
#fkcart-modal .fkcart-zero-state .fkcart-zero-state-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: var(--text-h5);
  line-height: var(--leading-h5);
  font-weight: 700;
  color: var(--color-primary);
}

/* FunnelKit: 14 px at 1.3. */
#fkcart-modal .fkcart-zero-state .fkcart-zero-state-text {
  max-width: 13.5rem;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-text-muted);
}

/* SHOP PRODUCTS as the site's Large button. FunnelKit: 14 px, weight 500, 44 px, radius 4. */
#fkcart-modal .fkcart-zero-state .fkcart-shop-button {
  align-self: center;
  width: 100%;
  max-width: 21.125rem;
  min-height: 3.5rem;
  margin-top: var(--space-2xs);
  padding: var(--space-xs) var(--space-xl);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-s);
  background-color: var(--color-primary);
  font-size: var(--text-button);
  line-height: var(--leading-button);
  font-weight: 300;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-white);
  transition: background-color 0.2s, border-color 0.2s;
}

#fkcart-modal .fkcart-zero-state .fkcart-shop-button:hover {
  border-color: var(--color-dark-green);
  background-color: var(--color-dark-green);
  opacity: 1;
}

/* ---------------------------------------------------------------------------------------------
 * 8. Options panel (FunnelKit's quick view for a variable cross-sell, "Select options")
 * Not in Figma: it keeps FunnelKit's layout in our colours, with the site's button.
 * ------------------------------------------------------------------------------------------- */

/* ADD TO CART as the site's Large button. FunnelKit: 600 weight, sentence case, 44 px. */
#fkcart-modal .fkcart-quick-view-drawer .fkcart-add-variant-product {
  min-height: 3.5rem;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-s);
  font-size: var(--text-button);
  line-height: var(--leading-button);
  font-weight: 300;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background-color 0.2s, border-color 0.2s;
}

#fkcart-modal .fkcart-quick-view-drawer .fkcart-add-variant-product:hover {
  border-color: var(--color-dark-green);
  background-color: var(--color-dark-green);
  opacity: 1;
}

/* The close cross: at least a 32 px target (FunnelKit: the 20 px icon only). */
#fkcart-modal .fkcart-quick-view-drawer .fkcart-quick-view-close {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  cursor: pointer;
}

/* ---------------------------------------------------------------------------------------------
 * 9. Smaller screens
 * ------------------------------------------------------------------------------------------- */

/* Touch screens (the site's tablet breakpoint): 44 px targets for the close button, the bin and
   the stepper, as the site's quantity field. */
@media (max-width: 991px) {
  #fkcart-modal .fkcart-preview-ui .fkcart-slider-heading .fkcart-modal-close {
    width: 2.75rem;
    height: 2.75rem;
    margin-right: calc(var(--space-xs) * -1);
  }

  #fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-remove-item {
    top: -0.75rem;
    right: -0.75rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  #fkcart-modal .fkcart-item-wrap .fkcart--item-parent .fkcart-item-title-price {
    padding-right: var(--space-xl);
  }

  #fkcart-modal .fkcart-quantity-selector .fkcart-quantity-button {
    width: 2.75rem;
    height: 2.75rem;
  }

  #fkcart-modal .fkcart-quantity-selector .fkcart-quantity__input {
    height: 2.75rem;
  }
}

/* Phones (the site's mobile breakpoint): 20 px sides instead of 32, a 16 px gap beside the item
   image, and the summary's spacing tightened so the items keep more of the screen. */
@media (max-width: 478px) {
  #fkcart-modal .fkcart-preview-ui .fkcart-slider-heading,
  #fkcart-modal .fkcart-preview-ui .fkcart-reward-panel,
  #fkcart-modal .fkcart-slider-body > .fkcart-item-wrap:not(.fkcart-carousel-wrap) {
    padding-right: var(--space-m);
    padding-left: var(--space-m);
  }

  #fkcart-modal .fkcart-slider-body .fkcart-carousel-wrap.fkcart-upsell-style2 {
    padding: var(--space-xl) var(--space-m);
  }

  #fkcart-modal .fkcart-upsell-style2 .fkcart-carousel__viewport {
    margin-right: calc(var(--space-m) * -1);
  }

  #fkcart-modal .fkcart-item-wrap .fkcart--item-parent > .fkcart--item {
    gap: var(--space-s);
  }

  body #fkcart-modal .fkcart-preview-ui .fkcart-slider-footer {
    gap: var(--space-s);
    padding: var(--space-m);
  }

  #fkcart-modal .fkcart-slider-footer .fkcart_summary_cta {
    gap: var(--space-s);
  }

  #fkcart-modal .fkcart-order-summary .fkcart-order-summary-container {
    gap: var(--space-3xs);
  }
}
