/* Yellow Picnic — Step 3 (meal selection) brand reskin + cart sidebar.
   Loaded on the customizable-meal-plans page; step 3 markup is AJAX-injected,
   so everything is scoped to .menu-list-no-modal (step 3's grid container,
   distinct from the all-meals page which is .custom-page). */

:root {
  --yp-espresso: #473B37;
  --yp-juniper:  #286841;
  --yp-juniper-hover: #275D3B;
  --yp-ivory:    #F5F5F2;
  --yp-fawn:     #D9D6D0;
  --yp-gray-mid: #9E9A95;
  --yp-yellow:       #f4bd01;
  --yp-yellow-hover: #dba900;
  --yp-serif:    'Instrument Serif', Georgia, serif;
  --yp-sans:     'Montserrat', sans-serif;
}

/* ── Step 3 cards — brand fonts + colours, ORIGINAL (full-bleed) sizing ──
   Keep the new brand typography + palette, but let the meal grid's original
   sizing, spacing, font-sizes and full-bleed images come through unchanged.
   Only thing added back is bottom clearance for the fixed cart bar. */
.menu-list-no-modal .menu-list-card-container {
  padding-bottom: 120px !important;
}
.menu-list-no-modal .cui-card {
  background: var(--yp-ivory) !important;   /* brand */
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* Sharp corners: the per-card "Meal Plan" dropdown (keeps its green border) and
   the macro bars — brand look is square, no rounded edges. Radios stay round. */
.menu-list-no-modal .goal-select { border-radius: 0 !important; }
.menu-list-no-modal .progress,
.menu-list-no-modal .progress-container,
.menu-list-no-modal .progress-block,
.menu-list-no-modal .progress-bar { border-radius: 0 !important; }
.menu-list-no-modal .cui-meal-title,
.menu-list-no-modal .cui-meal-title a {
  font-family: var(--yp-serif) !important;
  font-size: 26px !important;
  line-height: 1.1 !important;
  font-weight: 400 !important;
  color: #000 !important;
  text-transform: none !important;
  text-decoration: none !important;
}
.menu-list-no-modal .cui-meal-description,
.menu-list-no-modal .ycwc-description {
  font-family: var(--yp-sans) !important;
  font-weight: 400 !important;
  color: var(--yp-espresso) !important;
}
.menu-list-no-modal .cui-meal-ingredients .clicker {
  font-family: var(--yp-sans) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--yp-juniper) !important;
}
/* Quantity stepper on each card — borderless, clean −/+ symbols (matches the
   cart sidebar). The plugin renders an SVG icon inside each button; hide it and
   draw the symbol with CSS so it's identical to the cart. */
.menu-list-no-modal .cui-quantity-selector {
  border: none !important;
  background: transparent !important;
  width: auto !important;
  gap: 2px !important;
}
.menu-list-no-modal .cui-quantity-selector .cui-fab-button {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 0 !important;
  color: var(--yp-espresso) !important;
  position: relative !important;
}
.menu-list-no-modal .cui-quantity-selector .cui-fab-button .cui-icon { display: none !important; }
.menu-list-no-modal .cui-quantity-selector .cui-fab-button::before {
  font-family: var(--yp-sans) !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  color: var(--yp-espresso) !important;
}
.menu-list-no-modal .cui-quantity-selector .qty-minus::before { content: "\2212"; }
.menu-list-no-modal .cui-quantity-selector .qty-plus::before  { content: "+"; }
.menu-list-no-modal .cui-quantity-selector .cui-fab-button:hover::before { opacity: 0.6; }
.menu-list-no-modal .cui-quantity-selector span {
  font-family: var(--yp-sans) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--yp-espresso) !important;
  min-width: 26px !important;
  text-align: center !important;
}
.menu-list-no-modal .meal-card .goal-right,
.menu-list-no-modal .goal-select {
  font-family: var(--yp-sans) !important;
}
/* Top "Explore the Menu …" heading — brand serif, centered (matches menu page) */
.menu-list-no-modal .menu-actions {
  text-align: center !important;
  margin: 30px 0 14px !important;
}
.menu-list-no-modal .weekday,
.menu-list-no-modal .weekday-center,
.custom-page-title {
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
  font-family: var(--yp-serif) !important;
  font-size: 40px !important;
  line-height: 1.1 !important;
  letter-spacing: 0.01em !important;
  font-weight: 400 !important;
  color: #000 !important;
  text-align: center !important;
}
@media (max-width: 767px) {
  .menu-list-no-modal .weekday,
  .menu-list-no-modal .weekday-center { font-size: 28px !important; }
}

/* ── Cart sidebar ───────────────────────────────────────────────── */
/* Hide the legacy black selection bar — its Continue button is reused
   programmatically by the sidebar, so it stays in the DOM. */
body.yp-step3 .meal-selection-bar { display: none !important; }

/* Floating cart toggle (desktop) */
#yp-cart-toggle {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px 0 20px;
  background: var(--yp-espresso);
  color: #fff;
  border: none;
  border-radius: 0;
  font-family: var(--yp-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  transition: background-color 180ms ease, color 180ms ease;
}
/* Inner wrapper: a transparent passthrough on desktop (button looks unchanged);
   on mobile it becomes the coloured button sitting inside the brown bar. */
.yp-cart-toggle-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#yp-cart-toggle .yp-cart-count {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--yp-espresso);
  font-size: 13px;
  font-weight: 700;
}

/* Guided toggle — one colour per stage:
   meals = espresso brown, breakfast = brand yellow, ready/continue = juniper. */
#yp-cart-toggle.yp-st-meals          { background: var(--yp-espresso); color: #fff; }
#yp-cart-toggle.yp-st-meals:hover    { background: var(--yp-espresso-hover, #3a302c); }
#yp-cart-toggle.yp-st-breakfast      { background: var(--yp-yellow); color: var(--yp-espresso); }
#yp-cart-toggle.yp-st-breakfast:hover{ background: var(--yp-yellow-hover); }
#yp-cart-toggle.yp-st-breakfast .yp-cart-count { color: var(--yp-espresso); }
#yp-cart-toggle.yp-st-ready          { background: var(--yp-juniper); color: #fff; }
#yp-cart-toggle.yp-st-ready:hover    { background: var(--yp-juniper-hover); }

/* --- Discoverability affordances (revertable) -------------------------------
   1) cart glyph on the bar = "tap to review/edit"
   2) "Edit meals" pill = jump back to the meal cards after the breakfast jump */
#yp-cart-toggle .yp-cart-hint { display: none; align-items: center; margin-right: 2px; }
#yp-cart-toggle .yp-cart-hint svg { width: 16px; height: 16px; display: block; }
#yp-cart-toggle.yp-show-hint .yp-cart-hint { display: inline-flex; }

#yp-edit-meals {
  position: fixed;
  right: 28px;
  bottom: 96px;
  z-index: 9998;
  display: none;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  background: #fff;
  color: var(--yp-espresso);
  border: 1px solid var(--yp-espresso);
  border-radius: 0;
  font-family: var(--yp-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
#yp-edit-meals.is-visible { display: inline-flex; }
#yp-edit-meals:hover { background: var(--yp-ivory); }
#yp-edit-meals > span { font-size: 17px; line-height: 1; }

@media (max-width: 767px) {
  #yp-edit-meals { right: auto; left: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); }
}
/* --- end affordances --- */

#yp-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34,31,27,0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  z-index: 9999;
}
body.yp-cart-open #yp-cart-backdrop { opacity: 1; visibility: visible; }

#yp-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 400px;
  max-width: 92vw;
  background: #fff;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 260ms ease;
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
}
body.yp-cart-open #yp-cart-panel { transform: translateX(0); }

.yp-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 24px 18px;
  border-bottom: 1px solid var(--yp-fawn);
}
.yp-cart-head h3 {
  margin: 0;
  font-family: var(--yp-serif) !important;
  font-size: 26px !important;
  font-weight: 400 !important;
  color: #000 !important;
}
.yp-cart-progress {
  font-family: var(--yp-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--yp-juniper);
  letter-spacing: 0.04em;
  margin-left: 8px;
}
.yp-cart-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--yp-espresso);
  cursor: pointer;
  padding: 4px 6px;
}

.yp-cart-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 24px;
}
.yp-cart-empty {
  font-family: var(--yp-sans);
  font-size: 14px;
  color: var(--yp-gray-mid);
  text-align: center;
  padding: 48px 12px;
}
.yp-cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--yp-fawn);
}
.yp-cart-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}
.yp-cart-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  flex: 0 0 auto;
  display: block;
  background: var(--yp-ivory);
}
.yp-cart-name {
  font-family: var(--yp-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--yp-espresso);
  line-height: 1.3;
}
/* Borderless −/+ stepper (no square box) */
.yp-cart-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  border: none;
  flex: 0 0 auto;
}
.yp-cart-stepper button {
  width: 30px;
  height: 30px;
  background: transparent;
  color: var(--yp-espresso);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: opacity 150ms ease;
}
.yp-cart-stepper button:hover { opacity: 0.6; }
.yp-cart-stepper .yp-cart-qty {
  min-width: 26px;
  text-align: center;
  font-family: var(--yp-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--yp-espresso);
}

.yp-cart-foot {
  padding: 18px 24px 24px;
  border-top: 1px solid var(--yp-fawn);
}
.yp-cart-continue {
  width: 100%;
  height: 56px;
  background: var(--yp-juniper);
  color: #fff;
  border: none;
  border-radius: 0;
  font-family: var(--yp-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 180ms ease;
}
.yp-cart-continue:hover { background: var(--yp-juniper-hover); }
.yp-cart-continue:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Mobile: bottom bar toggle + full-screen sheet ──────────────── */
@media (max-width: 767px) {
  /* Full-width BROWN bar (like the live black bar) with the coloured button
     inset inside it, so the CTA clearly reads as a button. Sharp corners. */
  #yp-cart-toggle {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--yp-espresso) !important;   /* brown frame behind the button */
    border-radius: 0;
    justify-content: stretch;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.18);
  }
  #yp-cart-toggle .yp-cart-toggle-inner {
    flex: 1;
    min-height: 52px;
    justify-content: center;
    border-radius: 0;                 /* sharp corners */
    background: var(--yp-juniper);    /* default; per-state colours below */
  }
  /* Guided colours ride on the inner button; the bar stays brown behind it. */
  #yp-cart-toggle.yp-st-meals     .yp-cart-toggle-inner { background: var(--yp-espresso); color: #fff; }
  #yp-cart-toggle.yp-st-breakfast .yp-cart-toggle-inner { background: var(--yp-yellow); color: var(--yp-espresso); }
  #yp-cart-toggle.yp-st-ready     .yp-cart-toggle-inner { background: var(--yp-juniper); color: #fff; }
  #yp-cart-panel {
    width: 100%;
    max-width: 100%;
  }
  .menu-list-no-modal .menu-list-card-container {
    grid-template-columns: 1fr !important;
    padding: 0 18px 120px !important;
  }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .menu-list-no-modal .menu-list-card-container { grid-template-columns: 1fr 1fr !important; }
}

/* ── Step 3 allergy filter bar ──────────────────────────────────── */
#yp-allergy-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: 1500px;
  margin: 0 auto 30px;
  padding: 0 40px;
}
.yp-allergy-label {
  font-family: var(--yp-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yp-gray-mid);
  margin-right: 4px;
}
.yp-allergy-chip {
  font-family: var(--yp-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--yp-espresso);
  background: transparent;
  border: 1px solid var(--yp-espresso);
  border-radius: 0;
  padding: 9px 18px;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.yp-allergy-chip:hover { background: var(--yp-ivory); }
.yp-allergy-chip.is-active {
  background: var(--yp-espresso);
  color: #fff;
}
@media (max-width: 767px) {
  #yp-allergy-bar { padding: 0 18px; margin-bottom: 22px; }
}

/* Cart sections (Meals / Breakfast) */
.yp-cart-section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 0 6px;
}
.yp-cart-section-title {
  font-family: var(--yp-serif);
  font-size: 19px;
  color: #000;
}
.yp-cart-section-count {
  font-family: var(--yp-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--yp-juniper);
}
.yp-cart-list .yp-cart-empty {
  text-align: left;
  padding: 6px 0 10px;
  font-size: 13px;
}

/* Mobile: meal cards run nearly edge-to-edge with just a small side gutter. */
@media (max-width: 767px) {
  .menu-list-no-modal .menu-list-card-container { padding-left: 10px !important; padding-right: 10px !important; }
  .menu-list-no-modal .cui-card { margin-left: 0 !important; margin-right: 0 !important; }
}
