/* ==========================================================================
   Meal Planner V2 — flat (no gradients)
   Base: #264f3e (forest)
   Accent: #B08D57 (gold)
   ========================================================================== */

   :root{
    --mp2-forest: #264f3e;
    --mp2-forest-700: #1f4233;
    --mp2-forest-600: #264f3e;
    --mp2-forest-500: #2f5f4a;
  
    --mp2-gold: #B08D57;
    --mp2-gold-600: #9e7b45;
    --mp2-gold-300: #d2b48c;
  
    --mp2-bg: #f6f7f4;          /* warm neutral background */
    --mp2-surface: #ffffff;     /* cards/panels */
    --mp2-surface-2: #fbfbf9;
  
    --mp2-ink: #10231b;
    --mp2-muted: rgba(16,35,27,.72);
  
    --mp2-border: rgba(16,35,27,.14);
    --mp2-border-2: rgba(16,35,27,.09);
  
    --mp2-shadow: 0 10px 28px rgba(16,35,27,.10);
    --mp2-shadow-soft: 0 8px 16px rgba(16,35,27,.08);
  
    --mp2-radius: 14px;
    --mp2-radius-sm: 12px;
    --mp2-radius-xs: 10px;
  
    --mp2-focus: 0 0 0 3px rgba(176,141,87,.25);
  
    /* “theme tints” (flat) */
    --mp2-forest-tint: rgba(38,79,62,.10);
    --mp2-gold-tint: rgba(176,141,87,.14);
  }
  
  /* ---------- App shell ---------- */
  .mp2-app{
    border: 1px solid var(--mp2-border-2);
    border-radius: var(--mp2-radius);
    overflow: hidden;
    background: var(--mp2-bg);
    box-shadow: var(--mp2-shadow);
    width: 100%;
    max-width: none; /* fluid layout (desktop-friendly) */
    margin: 24px 0 0;
    color: var(--mp2-ink);
  }

  
  
  /* ---------- Topbar ---------- */
  .mp2-topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--mp2-border-2);
  
    /* FLAT */
    /* background: rgba(38,79,62,.06); */
    background: #264f3e;
  }
  
  .mp2-title{
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .2px;
    color:#fff;
  }
  
  .mp2-actions{
    display:flex;
    gap: 10px;
    align-items:center;
  }
  
  .mp2-topbar-actions{
    display:flex;
    align-items:center;
    gap:8px;
  }
  
  /* ---------- Buttons ---------- */
  .mp2-btn{
    border: 1px solid var(--mp2-border);
    background: var(--mp2-surface);
    padding: 8px 10px;
    border-radius: var(--mp2-radius-xs);
    cursor: pointer;
    color: var(--mp2-ink);
    transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease, background-color .12s ease, opacity .12s ease;
  }


  .facetwp-load-more {
    border: 1px solid var(--mp2-border);
    background: var(--mp2-surface);
    padding: 8px 10px;
    border-radius: var(--mp2-radius-xs);
    cursor: pointer;
    color: var(--mp2-ink);
    transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease, background-color .12s ease, opacity .12s ease;
    text-align:center;
    margin-top:40px;
  }
  
  .mp2-btn:hover{
    border-color: rgba(16,35,27,.20);
    box-shadow: var(--mp2-shadow-soft);
    transform: translateY(-1px);
  }
  
  .mp2-btn:active{
    transform: translateY(0);
    box-shadow: none;
  }
  
  .mp2-btn:focus{
    outline: none;
    box-shadow: var(--mp2-focus);
  }
  
  .mp2-btn-ghost{
    background: transparent;
  }
  
  .mp2-btn[disabled]{
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
  
  /* Optional: primary button style if you add class="is-primary" */
  .mp2-btn.is-primary{
    background: var(--mp2-forest);
    color: #fff;
    border-color: rgba(0,0,0,.10);
  }
  .mp2-btn.is-primary:hover{
    background: var(--mp2-forest-700);
  }
  
  /* ---------- Badges / Pills ---------- */
  .mp2-badge{
    display:inline-block;
    min-width: 18px;
    text-align:center;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid rgba(16,35,27,.18);
    font-size: 12px;
    margin-left: 6px;
    background: rgba(255,255,255,.65);
  }
  
  .mp2-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
  
    /* FLAT */
    /* background: var(--mp2-forest-tint); */
    background: #fefef7;
    color: var(--mp2-forest-700);
    border: 1px solid rgba(38,79,62,.16);
  }
  
  /* Save pill container inside the plan header */
  #mp2-save-status .mp2-pill{
    background: var(--mp2-gold-tint);
    color: var(--mp2-forest-700);
    border-color: rgba(176,141,87,.30);
  }
  
  /* ---------- Body ---------- */
  .mp2-layout{
    display:flex;
    flex-direction:column; /* mobile keeps the current “top tabs” feel */
    min-height: 0;
  }

  .mp2-sidebar{
    background: var(--mp2-surface);
    border-bottom: 1px solid var(--mp2-border-2);
  }

  .mp2-sidebar-subnav{
    padding: 10px 12px;
    border-top: 1px solid var(--mp2-border-2);
  }

  .mp2-body{
    padding: 12px 14px;
    min-width: 0;
  }

  /* Secondary controls bar (Plan, and other tab-specific tools) */
  .mp2-subnav{
    display:flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items:center;
    margin: 12px 0;
  }

  @media (min-width: 1024px){
    .mp2-subnav{
      margin: 0;
    }
  }

  /* Desktop: left sidebar + wide content */
  @media (min-width: 1024px){
    .mp2-layout{
      flex-direction:row;
      align-items:stretch;
    }
    .mp2-sidebar{
      /* flex: 0 0 280px; */
      flex: 0 0 320px;
      border-bottom: 0;
      border-right: 1px solid var(--mp2-border-2);
      min-height: 0;
      position: sticky;
      top: 0;
      align-self: flex-start;
      max-height: calc(100vh - 20px);
      overflow:auto;
    }
    .mp2-body{
      flex: 1 1 auto;
      padding: 16px 18px;
    }
  }

  /* Inline subnav mount (mobile) */
  .mp2-subnav-inline:empty{ display:none; }
  
  /* ---------- Tabs ---------- */
  .mp2-tabs{
    display:flex;
    background: var(--mp2-surface);
  }

  /* Desktop: vertical tab rail inside the sidebar */
  @media (min-width: 1024px){
    .mp2-tabs{
      flex-direction: column;
      position: sticky;
      top: 0;
      z-index: 10;
      border-bottom: 1px solid var(--mp2-border-2);
    }
    .mp2-tab{
      text-align: left;
      border-right: 0;
      border-bottom: 1px solid var(--mp2-border-2);
    }
    .mp2-tab:last-child{ border-bottom: 0; }
    .mp2-tab.is-active:after{
      display:none;
    }
  }

  
  .mp2-tab{
    flex: 1;
    padding: 12px 10px;
    background: transparent;
    border: 0;
    border-right: 1px solid var(--mp2-border-2);
    cursor: pointer;
    font-weight: 800;
    color: rgba(16,35,27,.75);
    transition: background-color .12s ease, color .12s ease;
  }
  
  .mp2-tab:last-child{ border-right: 0; }
  
  .mp2-tab:hover{
    background: rgba(38,79,62,.06);
    color: var(--mp2-ink);
  }
  
  .mp2-tab.is-active{
    background: rgba(38,79,62,.10);
    color: var(--mp2-forest-700);
    position: relative;
  }
  .mp2-tab.is-active:after{
    content:"";
    position:absolute;
    left:10px; right:10px;
    bottom:6px;
    height:3px;
    border-radius: 999px;
  
    /* FLAT accent line */
    /* background: rgba(176,141,87,.90); */
  }
  
  /* ---------- Loading ---------- */
  .mp2-loading{
    padding: 18px 0;
    opacity: 0.75;
    color: var(--mp2-muted);
  }
  
  /* ---------- Search ---------- */
  .mp2-search{
    display:flex;
    gap:10px;
    align-items:center;
    margin-bottom: 12px;
  }
  
  .mp2-input{
    flex: 1;
    min-width: 0;
    border: 1px solid var(--mp2-border);
    background: var(--mp2-surface);
    padding: 10px 12px;
    border-radius: var(--mp2-radius-xs);
    font-size: 14px;
    color: var(--mp2-ink);
  }
  .mp2-input:focus{
    outline: none;
    box-shadow: var(--mp2-focus);
    border-color: rgba(176,141,87,.55);
  }
  
  /* ---------- Cards grid ---------- */
  .mp2-grid{
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    /* margin:15px; */
  }
  @media (min-width: 900px){
    .mp2-grid{ grid-template-columns: repeat(5, minmax(0, 1fr)); }
  }


  @media (max-width: 1300px){
    .mp2-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  
  .mp2-card{
    border: 1px solid var(--mp2-border-2);
    border-radius: var(--mp2-radius);
    overflow:hidden;
    background: var(--mp2-surface);
    display:flex;
    flex-direction:column;
    box-shadow: 0 6px 14px rgba(16,35,27,.06);
    transition: transform .10s ease, box-shadow .12s ease, border-color .12s ease;
  }
  
  .mp2-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(16,35,27,.10);
    border-color: rgba(16,35,27,.14);
  }
  
  .mp2-card img{
    width: 100%;
    height: 128px;
    object-fit: cover;
    background: rgba(16,35,27,.04);
  }

  /* Compact card (used in Plan day columns on desktop) */
  .mp2-card--mini img,
  .mp2-card--mini .mp2-card-ph{
    height: 78px;
  }
  .mp2-card--mini .mp2-card-body{
    padding: 8px;
    gap: 6px;
  }
  .mp2-card--mini .mp2-card-title{
    font-size: 13px;
  }
  .mp2-card--mini .mp2-card-actions button{
    font-size: 12px;
    padding: 6px 8px;
  }
  
  /* Flat placeholder (no gradient) */
  .mp2-card-ph{
    width:100%;
    height:128px;
    background: rgba(38,79,62,.10);
  }
  
  .mp2-card-body{
    padding: 10px;
    display:flex;
    flex-direction:column;
    gap: 8px;
  }
  
  .mp2-card-title{
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--mp2-ink);
    text-decoration: none;
    margin-bottom: var(--space-4);
  }
  .mp2-card-title:hover{
    color: var(--mp2-forest-700);
    text-decoration: underline;
  }
  
  .mp2-card-actions{
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .mp2-card-actions button{
    font-size: 13px;
    padding: 7px 9px;
    border-radius: var(--mp2-radius-xs);
  }
  
  /* Make Add feel more “actionable” */
  .mp2-card-actions button[data-mp2-action="add"]{
    border-color: rgba(176,141,87,.34);
    background: rgba(176,141,87,.12);
  }
  .mp2-card-actions button[data-mp2-action="add"]:hover{
    background: rgba(176,141,87,.18);
    border-color: rgba(176,141,87,.48);
  }
  
  /* Save button more “theme” */
  .mp2-card-actions button[data-mp2-action="save"]{
    border-color: rgba(38,79,62,.18);
  }
  .mp2-card-actions button[data-mp2-action="save"]:hover{
    border-color: rgba(38,79,62,.28);
  }
  
  /* ---------- Week layout ---------- */
  .mp2-week{
    display: grid;
    grid-template-columns: 1fr; /* always vertical */
    gap: 10px;
  }

  /* Desktop: 7-day board (less up/down scrolling) */
  @media (min-width: 1024px){
    .mp2-week{
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 12px;
      align-items: stretch;
    }
    .mp2-day{
      margin: 0;
      padding: 10px;
      display:flex;
      flex-direction: column;
      min-height: 0;
    }
    .mp2-slot-list{
      min-height: 0;
      overflow: auto;
      padding-right: 2px;
    }
  }
  
  /* ---------- Day block ---------- */
  .mp2-day{
    border: 1px solid rgba(38,79,62,.16);
    border-radius: var(--mp2-radius);
    padding: 10px;
    margin: 12px 0;
  
    /* FLAT */
    /* background: rgba(38,79,62,.08); */
    background: #fefef7;
  
    box-shadow: 0 6px 16px rgba(16,35,27,.06);
  }
  
  @media (min-width: 900px){
    .mp2-day{
      padding: 12px 14px;
    }
    .mp2-day h3{
      font-size: 14px;
    }
  }
  
  .mp2-day h3{
    margin: 0 0 8px 0;
    font-size: 13px;
    text-transform: uppercase;
    opacity: .85;
    letter-spacing: 0.06em;
    color: rgba(38,79,62,.92);
  }
  
  /* Helpful hover for droppable zones */
  .mp2-day[data-mp2-dropzone]{
    transition: border-color .12s ease, background-color .12s ease;
  }
  .mp2-day[data-mp2-dropzone]:hover{
    border-color: rgba(176,141,87,.50);
  
    /* FLAT hover */
    background: rgba(176,141,87,.10);
  }
  
  /* ---------- Slot (future use) ---------- */
  .mp2-slot{
    border: 1px dashed rgba(16,35,27,.20);
    border-radius: var(--mp2-radius-sm);
    padding: 8px;
    min-height: 56px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 10px;
  
    /* FLAT */
    background: rgba(255,255,255,.60);
  }
  .mp2-slot + .mp2-slot{ margin-top: 8px; }
  .mp2-slot-title{ font-weight: 800; font-size: 13px; }
  .mp2-slot-empty{ opacity: 0.7; }
  
  /* ---------- Planned item row ---------- */
  .mp2-planned{
    background: rgba(38,79,62,.14);
    /* background: #cdddc9; */
    border-color: rgba(38,79,62,.18);
  }
  
  .mp2-planned a{
    color: var(--mp2-ink);
    text-decoration: none;
  }
  .mp2-planned a:hover{
    color: var(--mp2-forest-700);
    text-decoration: underline;
  }
  
  .mp2-planned.is-dragging{
    opacity: 0.35;
  }
  
  /* Drag handle */
  .mp2-drag-handle{
    opacity: .70;
    transition: opacity .12s ease, transform .08s ease;
    display:block;
    text-align:center;
    width:100%;
  }
  .mp2-drag-handle:hover{
    opacity: 1;
    transform: scale(1.05);
    cursor:grab;
  }
  .mp2-drag-handle:active{
    cursor: grabbing;
  }
  
  /* Remove button refinement */
  .mp2-planned .mp2-btn[data-mp2-action="remove-plan"]{
    background: rgba(255,255,255,.70);
    border-color: rgba(16,35,27,.14);
  }
  .mp2-planned .mp2-btn[data-mp2-action="remove-plan"]:hover{
    background: rgba(255,255,255,.90);
    border-color: rgba(176,141,87,.48);
  }
  
  /* ---------- Misc polish ---------- */
  .mp2-card-media{
    display:block;
    line-height: 0;
  }
  
  .mp2-card-media img{
    display:block;
  }
  
  /* Reduced motion */
  @media (prefers-reduced-motion: reduce){
    .mp2-btn, .mp2-card, .mp2-tab, .mp2-drag-handle, .mp2-day{
      transition: none !important;
    }
  }
  


  /* ---------- Layout stability (tab switching) ---------- */

/* Keep the content area from “jumping” when tab content is short */
#mp2-main{
  min-height: 70vh;      /* desktop default stability */
  /* margin:15px; */
}

/* Mobile: use a bit less so it doesn't feel too tall */
@media (max-width: 900px){
  #mp2-main{
    min-height: 62vh;
  }
}

/* If you prefer a hard cap so huge browse grids don’t blow up the page,
   you can turn the main area into a scroll container. Uncomment:
*/
/*
#mp2-main{
  min-height: 70vh;
  max-height: 78vh;
  overflow: auto;
  padding-right: 4px; 
}
*/

/* Smooth scroll and layout feel when content changes */
#mp2-main{
  scroll-behavior: smooth;
}



/* Tabs on top + sticky for usability */
.mp2-tabs{
  position: sticky;
  top: 0;
  z-index: 50;
  border-top: 0;
  /* border-bottom: 1px solid var(--mp2-border-2); */
  background: var(--mp2-surface);
}










/* App-like layout: header + tabs stay pinned, content scrolls */
.mp2-app{
  display: flex;
  flex-direction: column;
}

/* Keep topbar visible inside the component */
.mp2-topbar{
  position: sticky;
  top: 0;
  z-index: 60;
}

/* Tabs stick directly under topbar */
.mp2-tabs{
  position: sticky;
  top: 0;             /* will stack under topbar because topbar is also sticky */
  z-index: 55;
  border-bottom: 1px solid var(--mp2-border-2);
  background: var(--mp2-surface);
}

/* IMPORTANT: give the planner a stable height and make the content area scroll */
.mp2-body{
  /* pick a height that feels good; adjust if needed */
  max-height: 78vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px;
}

/* your main wrapper no longer needs min-height tricks */
.mp2-main{
  min-height: 0;
}

/* Mobile tuning */
@media (max-width: 900px){
  .mp2-body{
    max-height: 76vh;
    padding: 10px 12px;
  }
}

/* Optional: slightly nicer scrollbar (Chrome/Safari) */
.mp2-body::-webkit-scrollbar{
  width: 10px;
}
.mp2-body::-webkit-scrollbar-thumb{
  background: rgba(16,35,27,.18);
  border-radius: 999px;
  border: 3px solid rgba(0,0,0,0);
  background-clip: content-box;
}








/* ---------- Week header + day headers ---------- */
.mp2-weekhead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.mp2-weekleft{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.mp2-weektitle{
  font-weight:900;
  font-size:15px;
  letter-spacing:.2px;
}

.mp2-weeknav{
  display:flex;
  gap:8px;
  align-items:center;
}

.mp2-dayhead{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.mp2-daymeta{
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color: rgba(38,79,62,.92);
}

.mp2-daydate{
  font-size:12px;
  font-weight:800;
  color: rgba(16,35,27,.70);
}

/* ---------- Toast ---------- */
.mp2-toast{
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}

.mp2-toast.is-on{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.mp2-toast .mp2-pill{
  background: rgba(176,141,87,.18);
  border-color: rgba(176,141,87,.35);
}

/* ---------- Modal / Day picker ---------- */
.mp2-modal{
  position: fixed;
  inset: 0;
  z-index: 100300;
  display: none;
}

.mp2-modal.is-open{
  display: block;
}

.mp2-modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(16,35,27,.40);
}

.mp2-modal-panel{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 24px));
  background: var(--mp2-surface);
  border: 1px solid var(--mp2-border-2);
  border-radius: var(--mp2-radius);
  box-shadow: 0 18px 50px rgba(16,35,27,.25);
  overflow: hidden;
}

.mp2-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--mp2-border-2);
}

.mp2-modal-title{
  font-weight:900;
  color: var(--mp2-forest-700);
}

.mp2-modal-body{
  padding: 12px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mp2-daypick-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 900px){
  .mp2-daypick-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mp2-daypick{
  border: 1px solid rgba(38,79,62,.16);
  background: rgba(38,79,62,.06);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  text-align:left;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease, background-color .12s ease;
}

.mp2-daypick:hover{
  border-color: rgba(176,141,87,.50);
  background: rgba(176,141,87,.10);
  box-shadow: 0 10px 18px rgba(16,35,27,.08);
  transform: translateY(-1px);
}

.mp2-daypick strong{
  display:block;
  font-size: 13px;
  font-weight: 900;
  color: var(--mp2-forest-700);
}

.mp2-daypick span{
  display:block;
  font-size: 12px;
  font-weight: 800;
  color: rgba(16,35,27,.70);
  margin-top: 4px;
}

/* Mobile: make modal feel like a bottom sheet */
@media (max-width: 640px){
  .mp2-modal-panel{
    left: 50%;
    top: auto;
    bottom: 10px;
    transform: translateX(-50%);
    border-radius: 16px;
  }
}




/* ---------- Welcome box ---------- */
.mp2-welcome{
  padding: 12px 14px;
  border-bottom: 1px solid var(--mp2-border-2);
  background: rgba(38,79,62,.06);
  /* margin:0px 40px 0px 40px; */
  margin:0px auto;
}

.mp2-welcome-inner{
  border: 1px solid rgba(38,79,62,.16);
  background: var(--mp2-surface);
  border-radius: var(--mp2-radius);
  padding: 12px 12px;
  box-shadow: 0 6px 14px rgba(16,35,27,.06);
  text-align:center;
}

.mp2-welcome-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.mp2-welcome-title{
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--mp2-forest-700);
  letter-spacing: .2px;
  text-align:center;
}

.mp2-welcome-text{
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(16,35,27,.85);
}

.mp2-welcome-toggle{
  padding: 6px 10px;
  font-size: 13px;
  border-color: rgba(176,141,87,.40);
  background: rgba(176,141,87,.12);
}

.mp2-welcome-toggle:hover{
  background: rgba(176,141,87,.18);
  border-color: rgba(176,141,87,.55);
}

/* Collapsed state */
.mp2-welcome.is-collapsed .mp2-welcome-text{
  display:none;
}




/* Wrapper + welcome box */

/* Wrapper aligns welcome + app together */
.mp2-wrap{
  /* max-width: 1100px; */
  max-width: none;
  margin: 40px auto 0;
}

/* App no longer needs margin-top because wrap handles spacing */
.mp2-app{
  margin: 0;
}

/* Welcome lives OUTSIDE the app */
.mp2-welcome{
  margin-bottom: 12px;
  padding: 0;
  background: transparent;
  border: 0;
}

.mp2-welcome-inner{
  border: 1px solid rgba(38,79,62,.16);
  background: var(--mp2-surface);
  border-radius: var(--mp2-radius);
  padding: 14px 14px;
  box-shadow: 0 10px 24px rgba(16,35,27,.08);
}

.mp2-welcome-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.mp2-welcome-title{
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--mp2-forest-700);
}

.mp2-welcome-text{
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(16,35,27,.85);
}

.mp2-welcome-mini{
  margin: 0 0 10px 0;
}




/* ---------- Drag drop landing target ---------- */
.mp2-day.is-drop-active{
  border-color: rgba(176,141,87,.65) !important;
  background: rgba(176,141,87,.10) !important;
}

.mp2-slot-list{
  position: relative; /* anchor for the indicator */
}

.mp2-drop-indicator{
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 3px solid rgba(176,141,87,.95);
  border-radius: 999px;
  pointer-events: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16,35,27,.10);
  opacity: 0;
  transition: opacity .08s ease;
}

.mp2-drop-indicator.is-on{
  opacity: 1;
}

/* Optional: give a tiny “slot” hint when empty and dragging */
.mp2-slot-list.is-empty-drop{
  min-height: 34px;
}


/* ---------- Drag drop placeholder card ---------- */
.mp2-day.is-drop-active{
  border-color: rgba(176,141,87,.65) !important;
  background: rgba(176,141,87,.10) !important;
}

.mp2-slot-list{
  position: relative;
}

/* Placeholder looks like a “ghost card” */
.mp2-drop-placeholder{
  border: 2px dashed rgba(176,141,87,.80);
  background: rgba(176,141,87,.14);
  border-radius: 12px;
  height: 52px;                 /* matches planned row feel */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  color: rgba(38,79,62,.90);
  font-weight: 800;
  font-size: 13px;
  pointer-events: none;
}

.mp2-drop-placeholder::before{
  content: "Drop here";
  opacity: .9;
}

/* Optional: make empty days feel ready to receive */
.mp2-slot-list.is-empty-drop{
  min-height: 56px;
}



/* ---------- DnD smoothness ---------- */

/* Smoothly reflow cards when placeholder moves */
.mp2-slot-list .mp2-planned{
  transition: transform 120ms ease, opacity 120ms ease;
  will-change: transform;
}

/* Don’t animate the one being dragged (prevents laggy feel) */
.mp2-planned.is-dragging{
  transition: none !important;
}

/* Placeholder also feels nicer */
.mp2-drop-placeholder{
  transition: transform 120ms ease, opacity 120ms ease;
}

/* Small “settle” effect right after drop */
@keyframes mp2DropSettle{
  0%   { transform: scale(.98); }
  100% { transform: scale(1); }
}
.mp2-planned.is-dropped{
  animation: mp2DropSettle 140ms ease-out;
}


.mp2-day.is-drop-active .mp2-planned{
  transform: translateY(0); /* keeps it stable */
}



#mp2-export-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 99999;
  background: #fff;
  border: 1px solid #ddd;
  padding: 6px;
}

/* ---------- Export dropdown (polished) ---------- */

/* Ensure dropdown can escape */
.mp2-weeknav { overflow: visible !important; }

.mp2-topbar-actions{
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Make the Export button feel intentional */
.mp2-topbar-actions [data-mp2-action="export-toggle"]{
  border-color: rgba(176,141,87,.34);
  background: rgba(176,141,87,.12);
  font-weight: 900;
}
.mp2-topbar-actions [data-mp2-action="export-toggle"]:hover{
  background: rgba(176,141,87,.18);
  border-color: rgba(176,141,87,.55);
}

/* The menu panel */
#mp2-export-menu.mp2-menu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 99999;

  min-width: 240px;
  padding: 6px;

  background: var(--mp2-surface);
  border: 1px solid var(--mp2-border-2);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(16,35,27,.16);

  /* nice little entrance without being “animated” */
  transform-origin: top right;
}

/* Optional: a small “caret” pointer */
#mp2-export-menu.mp2-menu:before{
  content:"";
  position:absolute;
  right: 16px;
  top: -6px;
  width: 10px;
  height: 10px;
  background: var(--mp2-surface);
  border-left: 1px solid var(--mp2-border-2);
  border-top: 1px solid var(--mp2-border-2);
  transform: rotate(45deg);
}

/* Menu items become true menu rows */
#mp2-export-menu .mp2-menu-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;

  border: 1px solid transparent;
  background: transparent;

  padding: 9px 10px;
  border-radius: 10px;

  font-size: 13px;
  font-weight: 900;
  color: var(--mp2-ink);
  cursor: pointer;

  transition: background-color .12s ease, border-color .12s ease, transform .08s ease;
}

#mp2-export-menu .mp2-menu-item:hover{
  background: rgba(38,79,62,.06);
  border-color: rgba(38,79,62,.14);
  transform: translateY(-1px);
}

#mp2-export-menu .mp2-menu-item:active{
  transform: translateY(0);
}

/* Add subtle “type” emphasis per action */
/* #mp2-export-menu .mp2-menu-item[data-mp2-action="export-pdf"]{
  background: rgba(38,79,62,.06);
  border-color: rgba(38,79,62,.14);
}
#mp2-export-menu .mp2-menu-item[data-mp2-action="export-pdf"]:hover{
  background: rgba(38,79,62,.10);
} */


/* Make the Export button feel intentional */
.mp2-topbar-actions [data-mp2-action="export-pdf"]{
  border-color: rgba(176,141,87,.34);
  background: rgba(176,141,87,.12);
  font-weight: 900;
}
.mp2-topbar-actions [data-mp2-action="export-pdf"]:hover{
  background: rgba(176,141,87,.18);
  border-color: rgba(176,141,87,.55);
}

#mp2-export-menu .mp2-menu-item[data-mp2-action="export-grocery"]{
  background: rgba(176,141,87,.10);
  border-color: rgba(176,141,87,.22);
}
#mp2-export-menu .mp2-menu-item[data-mp2-action="export-grocery"]:hover{
  background: rgba(176,141,87,.16);
  border-color: rgba(176,141,87,.32);
}

/* Instacart can be “coming soon” */
#mp2-export-menu .mp2-menu-item[data-mp2-action="export-instacart"]{
  opacity: .70;
}

/* Divider option if you decide to add <div class="mp2-menu-sep"></div> later */
#mp2-export-menu .mp2-menu-sep{
  height: 1px;
  background: var(--mp2-border-2);
  margin: 6px 6px;
  border-radius: 999px;
}




/* ---------- Export busy state ---------- */
.mp2-btn.is-busy,
#mp2-export-menu .mp2-menu-item.is-busy{
  position: relative;
  opacity: .75;
  pointer-events: none;
}

/* small inline spinner */
.mp2-spinner{
  display:inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(38,79,62,.22);
  border-top-color: rgba(38,79,62,.85);
  animation: mp2Spin .8s linear infinite;
  margin-left: 8px;
  vertical-align: -2px;
}

@keyframes mp2Spin{
  to { transform: rotate(360deg); }
}


.mp2-modal-backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.6);
  z-index:9999999999999999998;
}
.mp2-modal{
  position:fixed;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  width:min(900px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  overflow:auto;
  background:#fff;
  border-radius:14px;
  z-index: 100300;
}

/* Backdrop sits behind */
.mp2-modal .mp2-modal-backdrop{
  position: absolute;
  inset: 0;
  z-index: 0;            /* key */
}

/* Panel sits above */
.mp2-modal .mp2-modal-panel{
  position: relative;    /* key */
  z-index: 1;            /* key */
}

.mp2-grocery-backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.4);
  z-index: 100200;
}

.mp2-grocery-modal{
  position:fixed;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  width:min(900px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  overflow:auto;
  background:#fff;
  border-radius:14px;
  z-index: 100210;
  box-shadow: 0 18px 50px rgba(16,35,27,.25);
  padding:20px;
}








/* ================================
   Grocery list modal styling
   ================================ */

   .mp2-grocery{
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  /* Section headers (==dressing== etc) */
  .mp2-grocery-section{
    margin: 10px 0 4px;
    padding-top: 6px;
    border-top: 1px solid var(--mp2-border-2);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--mp2-forest-700);
    opacity: .85;
  }
  
  /* Individual item row */
  .mp2-grocery-row{
    display: grid;
    grid-template-columns: 22px 1fr 64px 90px 28px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--mp2-surface-2);
    border: 1px solid var(--mp2-border-2);
    transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
  }
  
  .mp2-grocery-row:hover{
    background: #fff;
    border-color: rgba(16,35,27,.18);
    box-shadow: 0 6px 14px rgba(16,35,27,.08);
  }
  
  /* Checkbox */
  .mp2-grocery-row input[type="checkbox"]{
    width: 16px;
    height: 16px;
    accent-color: var(--mp2-forest);
    cursor: pointer;
  }
  
  /* Text inputs */
  .mp2-grocery-name,
  .mp2-grocery-qty,
  .mp2-grocery-unit{
    border: 1px solid var(--mp2-border);
    background: #fff;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 13px;
    color: var(--mp2-ink);
    min-width: 0;
  }
  
  .mp2-grocery-name{
    font-weight: 700;
  }
  
  .mp2-grocery-qty{
    text-align: right;
  }
  
  .mp2-grocery-unit{
    font-size: 12px;
    opacity: .9;
  }
  
  .mp2-grocery-name:focus,
  .mp2-grocery-qty:focus,
  .mp2-grocery-unit:focus{
    outline: none;
    box-shadow: var(--mp2-focus);
    border-color: rgba(176,141,87,.55);
  }
  
  /* Remove (X) button */
  .mp2-grocery-remove{
    border: 0;
    background: transparent;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    cursor: pointer;
    color: rgba(16,35,27,.45);
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .12s ease, color .12s ease, transform .08s ease;
  }
  
  .mp2-grocery-remove:hover{
    background: rgba(192,57,43,.12);
    color: #c0392b;
    transform: scale(1.05);
  }
  
  .mp2-grocery-remove:active{
    transform: scale(.95);
  }
  
  /* Checked items (already have it) */
  .mp2-grocery-row input[type="checkbox"]:checked ~ .mp2-grocery-name{
    text-decoration: line-through;
    opacity: .55;
  }
  
  /* Mobile adjustments */
  @media (max-width: 640px){
    .mp2-grocery-row{
      grid-template-columns: 22px 1fr 56px 70px 28px;
      padding: 8px;
    }
  }
  


  /* --- Grocery modal layout: header + scroll body + sticky footer --- */
.mp2-grocery-modal{
  display: flex;
  flex-direction: column;
  overflow: hidden; /* important: keep sticky footer clean */
}

.mp2-grocery-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--mp2-border-2);
  background: var(--mp2-surface);
}

.mp2-grocery-body{
  padding: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 32px - 56px - 56px); 
  /* (viewport minus modal margin minus header minus footer) */
}

/* sticky footer */
.mp2-grocery-footer{
  position: sticky;
  bottom: 0;
  display:flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--mp2-border-2);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
}

/* make primary button feel like the main action */
.mp2-grocery-footer .mp2-btn.is-primary{
  padding: 10px 12px;
  font-weight: 900;
}








/* facet wp panel filter */

/* Toolbar row (search stays above results; filters button next to it) */
/* Toolbar row */
#mp2-browse-mount .mp2-facet-toolbar{
  display:flex;
  justify-content:flex-end;
  margin: 10px 0 16px;
}

#mp2-browse-mount .mp2-filters-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 12px 18px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  cursor:pointer;
  font-size: 16px;
}

#mp2-browse-mount .mp2-caret{
  font-size: 16px;
  opacity: .8;
}

/* Popover modal */
#mp2-browse-mount .mp2-facet-popover{ position: relative; z-index: 9999; }

#mp2-browse-mount .mp2-facet-popover__overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}

#mp2-browse-mount .mp2-facet-popover__panel{
  position: fixed;
  left: 50%;
  top: 140px;
  transform: translateX(-50%);
  width: min(960px, 92vw);
  max-height: min(70vh, 720px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  border: 1px solid rgba(0,0,0,.12);
  opacity: 0;
  pointer-events: none;
  display:flex;
  flex-direction:column;
}

#mp2-browse-mount .mp2-facet-popover.is-open .mp2-facet-popover__overlay{ opacity: 1; pointer-events: auto; }
#mp2-browse-mount .mp2-facet-popover.is-open .mp2-facet-popover__panel{ opacity: 1; pointer-events: auto; }

.mp2-no-scroll{ overflow:hidden; }

/* Header */
#mp2-browse-mount .mp2-facet-popover__header{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
#mp2-browse-mount .mp2-facet-popover__title{ font-size: 18px; font-weight: 800; }
#mp2-browse-mount .mp2-facet-popover__sub{ font-size: 13px; opacity: .75; margin-top: 4px; }
#mp2-browse-mount .mp2-facet-popover__close{
  border:0;
  background:transparent;
  font-size: 28px;
  line-height:1;
  padding: 0 6px;
  cursor:pointer;
}

/* Body / grid */
#mp2-browse-mount .mp2-facet-popover__body{
  padding: 18px 20px;
  overflow:auto;
  flex:1;
}
#mp2-browse-mount .mp2-facet-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 40px;
}
#mp2-browse-mount .mp2-facet-heading{
  font-size: var(--mp2-fs-16);
  font-weight: 800;
  margin-bottom: 10px;
}
#mp2-browse-mount .mp2-facet-col .facetwp-facet{ margin: 0; }

/* Footer buttons */
#mp2-browse-mount .mp2-facet-popover__footer{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  padding: 12px 20px 18px;
  border-top: 1px solid rgba(0,0,0,.08);
}

@media (max-width: 720px){
  #mp2-browse-mount .mp2-facet-popover__panel{ top: 90px; }
  #mp2-browse-mount .mp2-facet-grid{ grid-template-columns: 1fr; }
  #mp2-browse-mount .mp2-facet-heading{ font-size: var(--mp2-fs-16); }
}

#mp2-browse-mount .mp2-browse-top{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}



/* --- MP2 FacetWP Search Bar --- */
#mp2-browse-mount .facetwp-facet input.facetwp-search {
  width: 100%;
  max-width: 420px;
  height: 48px;

  padding: 0 14px 0 44px; /* space for icon */
  font-size: 14px;
  line-height: 48px;

  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 10px;
  background: #fff;

  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  transition: border-color .15s ease, box-shadow .15s ease;
}

/* Focus state */
#mp2-browse-mount .facetwp-facet input.facetwp-search:focus {
  outline: none;
  border-color: #007777;
  box-shadow: 0 0 0 2px rgba(0,119,119,.12);
}

/* Placeholder tone */
#mp2-browse-mount .facetwp-facet input.facetwp-search::placeholder {
  color: rgba(0,0,0,.45);
}

/* Search icon (FacetWP injects <i>) */
#mp2-browse-mount .facetwp-facet .facetwp-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: rgba(0,0,0,.45);
  pointer-events: none;
}

/* Wrapper positioning */
#mp2-browse-mount .facetwp-facet .facetwp-input-wrap {
  position: relative;
  display: inline-block;
}

/* Hover polish */
#mp2-browse-mount .facetwp-facet input.facetwp-search:hover {
  border-color: rgba(0,0,0,.25);
}




/* Align search + filters nicely */
#mp2-browse-mount .mp2-browse-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px;
  flex-wrap: wrap;
}

/* Make Filters button same height */
#mp2-browse-mount .mp2-filters-btn {
  height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}



@media (min-width: 900px) {
  #mp2-browse-mount .facetwp-facet input.facetwp-search {
    max-width: 520px;
  }
}


@media (max-width: 640px) {
  #mp2-browse-mount .facetwp-facet input.facetwp-search {
    width: 100%;
    max-width: none;
  }

  #mp2-browse-mount .mp2-browse-top {
    flex-direction: column;
    align-items: stretch;
  }
}



#mp2-browse-mount .facetwp-facet input.facetwp-search {
  border-radius: 999px;
}
#mp2-browse-mount .mp2-filters-btn {
  border-radius: 999px;
}

/* =========================================
   MP2 — Responsive tokens (single place to tweak)
   Goal: stop “squeeze” below ~480px by scaling padding/gaps/type with clamp()
   ========================================= */

/* Keep tokens scoped to the component */
.mp2-app{
  /* Fonts */
  --mp2-font-ui: "Inter", "inter-variable", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid type (min, fluid, max) */
  --mp2-fs-12: clamp(12px, 1.2vw, 13px);
  --mp2-fs-13: clamp(13px, 1.3vw, 14px);
  --mp2-fs-14: clamp(14px, 1.5vw, 15px);
  --mp2-fs-16: clamp(15px, 1.9vw, 16px);

  /* Line heights */
  --mp2-lh: 1.35;
  --mp2-lh-tight: 1.2;

  /* Fluid spacing scale */
  --mp2-s1: clamp(6px, 1.2vw, 8px);
  --mp2-s2: clamp(8px, 1.6vw, 12px);
  --mp2-s3: clamp(10px, 2.0vw, 14px);
  --mp2-s4: clamp(12px, 2.4vw, 18px);

  /* Component padding (x/y) */
  --mp2-pad-x: clamp(10px, 3.2vw, 14px);
  --mp2-pad-y: clamp(10px, 2.8vw, 14px);

  /* Card media height */
  --mp2-card-media-h: clamp(140px, 22vw, 140px);

  /* Border radius (slightly tighter on tiny screens via clamp) */
  --mp2-radius: clamp(12px, 2.2vw, 14px);
  --mp2-radius-xs: clamp(10px, 2.0vw, 12px);

  /* Grid gap */
  --mp2-grid-gap: var(--mp2-s2);
}

/* Hard “tiny phone” tighten (<= 480px) */
@media (max-width: 480px){
  .mp2-app{
    --mp2-pad-x: 10px;
    --mp2-pad-y: 10px;
    --mp2-grid-gap: 10px;
  }
}

/* Typography base */
.mp2-app{
  font-family: var(--mp2-font-ui);
  font-size: var(--mp2-fs-14);
  line-height: var(--mp2-lh);
  border-radius: var(--mp2-radius);
}

/* Universal box sizing inside component */
.mp2-app, .mp2-app *{ box-sizing: border-box; }

/* ---------- Apply tokens to existing layout ---------- */

/* App shell spacing */
.mp2-app{
  margin: clamp(18px, 4vw, 40px) auto 0;
  /* max-width: 1100px; */
  max-width: none;
}

/* Topbar */
.mp2-topbar{
  padding: var(--mp2-pad-y) var(--mp2-pad-x);
  gap: var(--mp2-s2);
}
.mp2-title{ font-size: var(--mp2-fs-16); }

/* Tabs */
.mp2-tab{
  padding: var(--mp2-s3) var(--mp2-s2);
  font-size: var(--mp2-fs-14);
}

/* Body scrolling container padding */
.mp2-body{
  padding: var(--mp2-pad-y) var(--mp2-pad-x);
}

/* Buttons: tap targets + fluid type */
.mp2-btn{
  font-size: var(--mp2-fs-14);
  /* padding: 10px 12px; base tap target */
  border-radius: var(--mp2-radius-xs);
}
@media (max-width: 480px){
  .mp2-btn{ padding: 10px 10px; }
}

/* Grid gap + mobile column behavior */
.mp2-grid{
  gap: var(--mp2-grid-gap);
}
@media (max-width: 480px){
  .mp2-grid{ grid-template-columns: 1fr; }
}

/* Card media */
.mp2-card img,
.mp2-card-ph{
  height: var(--mp2-card-media-h);
}

/* Card body padding */
.mp2-card-body{
  padding: var(--mp2-s2);
  gap: var(--mp2-s2);
}

/* Title: fluid size + clamp lines (prevents squeeze) */
.mp2-card-title{
  font-size: var(--mp2-fs-14);
  line-height: var(--mp2-lh-tight);

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Card actions: predictable layout on small screens */
.mp2-card-actions{
  display: grid;
  grid-template-columns: 1fr 1fr; /* Save | Add */
  gap: 8px;
}
.mp2-card-actions .mp2-btn,
.mp2-card-actions button{
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}

/* Very small phones: stack */
@media (max-width: 360px){
  .mp2-card-actions{ grid-template-columns: 1fr; }
}

/* Browse top area: avoid squeeze under 480px */
@media (max-width: 480px){
  #mp2-browse-mount .mp2-browse-top{
    gap: 10px;
    margin: 10px 0 12px;
  }

  #mp2-browse-mount .facetwp-facet input.facetwp-search{
    height: 44px;
    line-height: 44px;
    font-size: 16px; /* keep iOS from zooming */
  }

  #mp2-browse-mount .mp2-filters-btn{
    height: 44px;
    font-size: 15px;
    padding: 0 14px;
  }
}



/* =========================================
   MP2 Browse — Desktop layout hard override
   Fix: results dropping under sidebar
   ========================================= */

   @media (min-width: 901px){

    /* Force 2-column grid layout */
    #mp2-browse-mount .mp2-browse-shell{
      display: grid !important;
      grid-template-columns: 280px minmax(0, 1fr) !important;
      gap: 18px !important;
      align-items: start !important;
    }
  
    /* Sidebar stays in its column */
    #mp2-browse-mount .mp2-browse-sidebar{
      display: block !important;
      width: 280px;
      max-width: 280px;
      min-width: 0;
    }
  
    /* Content stays in its column and can shrink properly */
    #mp2-browse-mount .mp2-browse-content,
    #mp2-browse-mount .mp2-browse-main,
    #mp2-browse-mount .mp2-results-host{
      min-width: 0 !important;
    }
  
    /* Make sure the grid of cards doesn't force wrapping */
    #mp2-browse-mount .mp2-grid{
      width: 100%;
    }
  }

  
  @media (min-width: 901px){
    #mp2-browse-mount .mp2-browse-sidebar{
      padding: 12px 12px !important;
      font-size: 13px; /* keep filters compact */
    }
    #mp2-browse-mount .mp2-browse-sidebar .facetwp-facet{
      margin-bottom: 12px;
    }
  }
  



/* ================================
   MP2 Mobile facet drawer — GLOBAL overlay (outside scroll container)
   ================================ */

   .mp2-facet-drawer{
    position: fixed;
    inset: 0;
    z-index: 1005000;
    display: none; /* hidden by default */
  }
  
  .mp2-facet-drawer.is-open{ display: block; }
  
  .mp2-facet-drawer__overlay{
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
  }
  
  .mp2-facet-drawer__panel{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
  
    background: #fff;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    box-shadow: 0 -18px 60px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
  }
  
  .mp2-facet-drawer__header{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }
  
  .mp2-facet-drawer__title{ font-size: 16px; font-weight: 900; }
  .mp2-facet-drawer__sub{ font-size: 12px; opacity:.7; margin-top: 2px; }
  .mp2-facet-drawer__close{
    border:0; background:transparent;
    font-size: 28px; line-height: 1;
    padding: 0 6px;
    cursor:pointer;
  }
  
  .mp2-facet-drawer__body{
    padding: 14px 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
  }
  
  .mp2-facet-drawer__footer{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding: 12px 16px 14px;
    border-top: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
  }
  
  /* body lock */
  .mp2-no-scroll{ overflow:hidden; }
  

  .mp2-browse-filters-title {
    display:none;
  }

  .facetwp-checkbox {
    text-transform:lowercase;
  }


  .facetwp-counter {
    opacity:0.4;



  }

  @media (min-width: 1024px) {
    .mp2-weekhead {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .mp2-weeknav {
      display: flex;
      gap: 6px;
    }
  }
  
  


 
  .mp2-grocery-page {
    width:100%;
    max-width:800px;
    margin:0 auto;
  }






  /* welcome box */
.stepscontainer {
    width:100%;
    text-align:center;
}
.steps {
    text-align:center;
    display:inline-block;
    width:360px;
    padding:25px;
    box-sizing:border-box;
    font-size:1.0rem;
    /* color:#999; */
    color:#000;
    font-weight:bold;
    
}

.steps .nb {
    display:inline-block;
    
    height:30px;width:30px;
    border-radius:15px;
    color:#fff;
    font-weight:bold;
    font-size:1.2rem
}

.steps .step-image {
    display:inline-block;
    width:100%;
    max-width:120px;
    margin-bottom:20px;
}

.steps .phone{
    display:inline-block;
    width:100%;
    max-width:80px;
    margin-bottom:20px;
}


/* Center the facet drawer panel */
.mp2-facet-drawer__panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: min(92vw, 520px); /* mobile-friendly, prevents giant panels */
  max-height: 75vh;
  min-height: 55vh;

  display: flex;
  flex-direction: column;

  border-radius: 14px;
}

/* Make body scrollable inside the panel */
.mp2-facet-drawer__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Optional: slightly dim background more */
.mp2-facet-drawer__overlay {
  background: rgba(0, 0, 0, 0.55);
}



.mp2-weekhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mp2-weeknav {
  display: flex;
  gap: 6px;
}

.mp2-weeknav .mp2-btn {
  padding: 6px 10px;
  font-size: 13px;
}


.mp2-weeknav [data-mp2-action="week-prev"]::before { content: "← "; }
.mp2-weeknav [data-mp2-action="week-next"]::after { content: " →"; }

.mp2-weeknav .mp2-btn {
  white-space: nowrap;
}






@media (max-width: 900px) {

  /* Force stacking (override floats/inline-block from theme/FacetWP) */
  .mp2-browse-top {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;

    /* in case any child floats leak */
    clear: both !important;
  }

  /* Search block: centered (by max-width) */
  .mp2-browse-top > .facetwp-facet-search_bar {
    display: block !important;
    float: none !important;

    width: 100% !important;
    max-width: 560px;           /* center “shape” */
    margin: 0 auto !important;  /* centers the whole search control */
  }

  .mp2-browse-top > .facetwp-facet-search_bar .facetwp-input-wrap {
    display: flex !important;   /* keeps icon + input aligned */
    width: 100% !important;
  }

  .mp2-browse-top > .facetwp-facet-search_bar .facetwp-search {
    width: 100% !important;
    text-align: center;         /* you said centered search */
  }

  /* Filters row: below, left-aligned */
  .mp2-browse-top > .mp2-facet-toolbar {
    display: block !important;
    float: none !important;

    width: 100% !important;
    max-width: 560px;           /* align with the centered search width */
    margin: 0 auto !important;
    text-align: left !important;
  }

  .mp2-browse-top > .mp2-facet-toolbar .mp2-filters-btn {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
}


@media (max-width: 900px) {
  .mp2-browse-actions-row {
    display: flex;
    flex-direction: column;   /* 👈 stack */
    gap: 8px;
    align-items: stretch;     /* full-width buttons */
  }

  .mp2-browse-actions-row .mp2-btn, .mp2-btn .mp2-filters-btn{
    width: 100%;
    justify-content: center;  /* optional: nicer symmetry */
    background: rgba(176,141,87,.12);
    border-color: rgba(176, 141, 87, .34);
  }
}



/* Pristine = hide only the RESULT LIST, not the UI */
#mp2-browse-mount.is-pristine .facetwp-template,
#mp2-browse-mount.is-pristine .facetwp-pager,
#mp2-browse-mount.is-pristine .facetwp-facet-pagination,
#mp2-browse-mount.is-pristine .facetwp-facet-pager {
  display: none !important;
}

/* Keep search + toolbar visible */
#mp2-browse-mount.is-pristine .mp2-browse-top,
#mp2-browse-mount.is-pristine .mp2-facet-toolbar {
  display: block !important;
}

/* Optional empty state message */
#mp2-browse-mount.is-pristine .mp2-browse-shell::after {
  content: "Search or choose filters to see recipes.";
  display: block;
  padding: 18px 12px;
  opacity: .75;
  text-align: center;
}



@media (min-width: 901px) {
  .mp2-facet-toolbar {
    margin-top: 10px;
  }
  .mp2-browse-actions-row {
    display: flex;
    gap: 10px;
    align-items: center;
  }
}
