/* ==========================================================================
   Meal Village - My Orders + Order Details
   Everything is scoped under .mv-orders so the shared header/footer
   and other pages are not affected.
   ========================================================================== */
.mv-orders{
  --mvo-ink:#1F2933; --mvo-ink2:#3E4C59; --mvo-muted:#52606D; --mvo-faint:#616E7C;
  --mvo-bg:#F6F1EC; --mvo-card:#FFFFFF; --mvo-line:#E6DFD7; --mvo-line2:#EEE8E1; --mvo-field:#D9D2CA;
  --mvo-teal:#00706F; --mvo-teal-dk:#004F4E; --mvo-teal-lt:#EEF6F5;
  --mvo-placed-bg:#DBEAFE; --mvo-placed:#1E40AF;
  --mvo-done-bg:#DCFCE7;   --mvo-done:#166534;
  --mvo-cancel-bg:#FEE2E2; --mvo-cancel:#991B1B;
  --mvo-other-bg:#EEF0F2;  --mvo-other:#3E4C59;
  --mvo-tag-bg:#EEF2E6;    --mvo-tag:#3F5A1E;
  --mvo-note-bg:#FFF7E6;   --mvo-note-line:#F3D9A4; --mvo-note:#5C4813;
  background:var(--mvo-bg); color:var(--mvo-ink);
  padding:20px 20px 40px; box-sizing:border-box; font-size:16px; line-height:1.45;
}
.mv-orders *,.mv-orders *::before,.mv-orders *::after{box-sizing:border-box}
.mv-orders .mvo-wrap{max-width:960px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
.mv-orders .mvo-wrap > *{min-width:0;max-width:100%}
.mv-orders .mvo-wrap--wide{max-width:1080px}
.mv-orders .mvo-wrap--history{max-width:1240px}
.mv-orders h1,.mv-orders h2,.mv-orders p{margin:0}
.mv-orders a{color:var(--mvo-teal)}
.mv-orders a:hover{color:var(--mvo-teal-dk)}
.mv-orders button{font:inherit;cursor:pointer}
.mv-orders :focus-visible{outline:3px solid var(--mvo-teal);outline-offset:2px}
.mv-orders [hidden]{display:none !important}

/* ---------- shared bits ---------- */
.mvo-card{background:var(--mvo-card);border:1px solid var(--mvo-line);border-radius:16px}
.mvo-badge{display:inline-block;font-size:13px;font-weight:800;padding:4px 10px;border-radius:20px;white-space:nowrap}
.mvo-badge--placed{background:var(--mvo-placed-bg);color:var(--mvo-placed)}
.mvo-badge--delivered{background:var(--mvo-done-bg);color:var(--mvo-done)}
.mvo-badge--cancelled{background:var(--mvo-cancel-bg);color:var(--mvo-cancel)}
.mvo-badge--other{background:var(--mvo-other-bg);color:var(--mvo-other)}
.mvo-btn-outline{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border-radius:10px;
  border:1.5px solid var(--mvo-teal);background:transparent;color:var(--mvo-teal);font-size:15px;font-weight:700;text-decoration:none}
.mvo-btn-outline:hover{background:var(--mvo-teal-lt)}
.mvo-btn-solid{min-height:44px;padding:0 18px;border-radius:10px;border:none;background:#2E7D32;color:#fff;font-size:15px;font-weight:700}
.mvo-btn-pill{min-height:48px;padding:0 28px;border-radius:24px;border:1.5px solid var(--mvo-ink);background:transparent;color:var(--mvo-ink);font-size:15px;font-weight:700}
.mvo-btn-pill:hover{background:#fff}
.mvo-state{text-align:center;padding:48px 24px;display:flex;flex-direction:column;align-items:center;gap:12px}
.mvo-state h2{font-size:20px;font-weight:800}
.mvo-state p{color:var(--mvo-muted)}
.mvo-skel{border-radius:16px;background:linear-gradient(90deg,#EEE8E1 25%,#F7F3EF 50%,#EEE8E1 75%);background-size:200% 100%;animation:mvoShimmer 1.2s infinite linear}
@keyframes mvoShimmer{to{background-position:-200% 0}}
.mvo-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}

/* ---------- order history ---------- */
.mvo-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px}
.mvo-title{display:flex;flex-direction:column;gap:6px}
.mvo-title h1{font-size:36px;font-weight:800;line-height:1.15}
.mvo-title p{font-size:16px;color:var(--mvo-muted)}
.mvo-search{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--mvo-field);border-radius:10px;padding:0 14px;height:46px;width:300px;max-width:100%}
.mvo-search input{border:none;outline:none;font:inherit;font-size:15px;flex:1;min-width:0;background:transparent;color:var(--mvo-ink)}
.mvo-search:focus-within{outline:3px solid var(--mvo-teal);outline-offset:2px}

.mvo-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}
.mvo-stat{border-radius:14px;padding:12px 22px;display:flex;flex-direction:column;gap:4px;background:#fff;border:1px solid var(--mvo-line)}
.mvo-stat--main{background:var(--mvo-teal);border-color:var(--mvo-teal);color:#fff}
.mvo-stat span:first-child{font-size:14px;font-weight:600;color:var(--mvo-muted)}
.mvo-stat--main span:first-child{color:#fff;opacity:.9}
.mvo-stat span:last-child{font-size:30px;font-weight:800}

.mvo-controls{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;min-width:0}
.mvo-chips{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.mvo-chip{flex:0 0 auto;min-height:42px;padding:0 13px;border-radius:22px;border:1px solid var(--mvo-field);background:#fff;color:var(--mvo-ink);font-size:14px;font-weight:600;white-space:nowrap}
.mvo-chip[aria-pressed="true"]{background:var(--mvo-ink);border-color:var(--mvo-ink);color:#fff;font-weight:700}
.mvo-tabs{display:flex;flex-wrap:nowrap;gap:4px;background:#EAE3DB;padding:4px;border-radius:12px;min-width:0}
.mvo-tab{min-height:40px;padding:0 10px;border:none;border-radius:9px;background:transparent;color:var(--mvo-ink2);font-size:14px;font-weight:600;white-space:nowrap}
.mvo-tab[aria-selected="true"]{background:#fff;color:var(--mvo-ink);font-weight:700}

.mvo-list{display:flex;flex-direction:column;gap:16px}
.mvo-month{margin:8px 0 0;font-size:18px;font-weight:800;color:var(--mvo-ink2);letter-spacing:.04em}
.mvo-order{padding:22px 24px;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:18px}
.mvo-order__info{display:flex;flex-direction:column;gap:8px;min-width:240px}
.mvo-order__head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.mvo-order__id{font-size:18px;font-weight:800}
.mvo-order__date{font-size:15px;color:var(--mvo-muted)}
.mvo-order__tip{font-size:14px;color:var(--mvo-muted)}
.mvo-order__act{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.mvo-order__amt{font-size:22px;font-weight:800}
.mvo-order--cancelled .mvo-order__amt{color:var(--mvo-faint);text-decoration:line-through}
.mvo-more{display:flex;justify-content:center;padding-top:8px}

/* ---------- order details ---------- */
.mvo-back{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-size:15px;font-weight:700;text-decoration:none;align-self:flex-start}
.mvo-dhead{padding:24px 28px;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:20px}
.mvo-dhead__l{display:flex;flex-direction:column;gap:8px}
.mvo-dhead__row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.mvo-dhead h1{font-size:30px;font-weight:800;line-height:1.15}
.mvo-dhead__meta{font-size:15px;color:var(--mvo-muted)}
.mvo-dhead__r{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.mvo-dhead__r span:first-child{font-size:14px;font-weight:600;color:var(--mvo-muted)}
.mvo-dhead__r span:last-child{font-size:30px;font-weight:800}

.mvo-cols{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.mvo-main{flex:3 1 520px;display:flex;flex-direction:column;gap:20px;min-width:0}
.mvo-side{flex:1 1 300px;display:flex;flex-direction:column;gap:20px;min-width:0}

.mvo-note{display:flex;align-items:center;gap:12px;background:var(--mvo-note-bg);border:1px solid var(--mvo-note-line);border-radius:12px;padding:14px 18px;font-size:15px;color:var(--mvo-note)}
.mvo-note svg{flex:0 0 auto}

.mvo-day{overflow:hidden}
.mvo-day__bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;padding:16px 24px;background:var(--mvo-teal);color:#fff}
.mvo-day__date{font-size:17px;font-weight:800}
.mvo-day__win{font-size:14px;font-weight:600}
.mvo-item{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:18px 24px;border-bottom:1px solid var(--mvo-line2)}
.mvo-item:last-child{border-bottom:none}
.mvo-item__main{flex:1 1 260px;display:flex;flex-direction:column;gap:6px;min-width:0}
.mvo-item__name{font-size:16px;font-weight:700;overflow-wrap:anywhere}
.mvo-item__extra{font-size:14px;color:var(--mvo-muted);margin-top:-2px}
.mvo-item__sub{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.mvo-tag{font-size:12px;font-weight:700;padding:3px 9px;border-radius:6px;background:var(--mvo-tag-bg);color:var(--mvo-tag);text-transform:uppercase}
.mvo-item__qty{font-size:14px;color:var(--mvo-muted)}
.mvo-item__status{flex:0 0 120px;font-size:13px;font-weight:800}
.mvo-item__status--placed{color:var(--mvo-placed)}
.mvo-item__status--delivered{color:var(--mvo-done)}
.mvo-item__status--cancelled{color:var(--mvo-cancel)}
.mvo-item__status--other{color:var(--mvo-other)}
.mvo-item__amt{flex:0 0 80px;text-align:right;font-size:17px;font-weight:800}
.mvo-item--cancelled{background:#FBF9F7}
.mvo-item--cancelled .mvo-item__name{color:var(--mvo-faint)}
.mvo-item--cancelled .mvo-item__amt{color:var(--mvo-faint);text-decoration:line-through}

.mvo-box{padding:22px 24px;display:flex;flex-direction:column;gap:10px}
.mvo-box h2{font-size:13px;font-weight:800;letter-spacing:.06em;color:var(--mvo-ink2);text-transform:uppercase}
.mvo-box__lines{font-size:15px;line-height:1.55;overflow-wrap:anywhere}
.mvo-box__phone{font-size:15px;color:var(--mvo-muted)}
.mvo-pay{display:flex;align-items:center;gap:10px;font-size:15px}
.mvo-pay__brand{font-size:12px;font-weight:800;padding:4px 8px;border-radius:5px;background:#1A1F71;color:#fff;text-transform:uppercase}
.mvo-sum{gap:12px}
.mvo-sum__row{display:flex;justify-content:space-between;gap:12px;font-size:15px}
.mvo-sum__row span:first-child{color:var(--mvo-muted)}
.mvo-sum__row--save span:last-child{color:var(--mvo-done)}
.mvo-sum__total{border-top:1px dashed var(--mvo-field);padding-top:12px;display:flex;justify-content:space-between;font-size:18px;font-weight:800}

/* ---------- Bootstrap overrides (site loads bootstrap.min.css) ---------- */
.mv-orders label{font-weight:inherit;margin-bottom:0}
.mv-orders h1,.mv-orders h2{font-family:inherit;margin-top:0;margin-bottom:0}
.mv-orders .mvo-btn-outline:hover,.mv-orders .mvo-btn-outline:focus{text-decoration:none}

/* ==========================================================================
   Responsive
   Wide screens : chips and tabs side by side (approved design).
                  If they don't fit, the tabs move to the next line by themselves.
   <= 680px  : phones - chips swipe sideways, tabs 2 x 2, compact cards
   ========================================================================== */


/* ---------- web (desktop/laptop): chips and tabs side by side, as in the approved design ---------- */
@media (min-width:1200px){
  .mv-orders .mvo-controls{flex-wrap:nowrap}
  .mv-orders .mvo-chips{flex-wrap:nowrap}
  .mv-orders .mvo-tabs{flex:0 0 auto}
}
@media (min-width:1200px) and (max-width:1279px){
  /* tighter buttons so the 9 buttons still fit on one row */
  .mv-orders .mvo-chip{padding:0 10px;font-size:13px}
  .mv-orders .mvo-tab{padding:0 8px;font-size:13px}
}

/* ---------- phones ---------- */
@media (max-width:680px){
  .mv-orders{padding:10px 10px 34px}

  /* title + search */
  .mv-orders .mvo-title h1{font-size:28px}
  .mv-orders .mvo-search{width:100%}

  /* summary boxes side by side, smaller */
  .mv-orders .mvo-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .mv-orders .mvo-stat{padding:12px 14px;min-width:0}
  .mv-orders .mvo-stat span:last-child{font-size:20px;line-height:1.2}

  /* filters stacked */
  .mv-orders .mvo-controls{flex-direction:column;align-items:stretch;gap:12px;width:100%}

  /* date chips: one row you can swipe left/right */
  .mv-orders .mvo-chips{
    flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;width:100%;padding-bottom:2px
  }
  .mv-orders .mvo-chips::-webkit-scrollbar{display:none}
  .mv-orders .mvo-chip{min-height:40px}

  /* status tabs: 2 x 2 grid, columns can shrink */
  .mv-orders .mvo-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .mv-orders .mvo-tab{min-width:0;padding:0 6px;overflow:hidden;text-overflow:ellipsis}

  /* order cards */
  .mv-orders .mvo-order{padding:16px}
  .mv-orders .mvo-order__info{min-width:0}
  .mv-orders .mvo-order__act{width:100%;justify-content:space-between;gap:12px}

  /* order details */
  .mv-orders .mvo-dhead{padding:18px}
  .mv-orders .mvo-dhead h1{font-size:24px}
  .mv-orders .mvo-dhead__r{align-items:flex-start}
  .mv-orders .mvo-dhead__r span:last-child{font-size:24px}
  .mv-orders .mvo-main,.mv-orders .mvo-side{flex-basis:100%}
  .mv-orders .mvo-day__bar{padding:14px 16px}
  .mv-orders .mvo-item{padding:14px 16px;gap:10px}
  .mv-orders .mvo-item__main{flex-basis:100%}
  .mv-orders .mvo-item__status,.mv-orders .mvo-item__amt{flex:0 0 auto}
  .mv-orders .mvo-item__amt{margin-left:auto}
  .mv-orders .mvo-box{padding:18px}
}

/* ---------- very small phones (320px) ---------- */
@media (max-width:360px){
  .mv-orders .mvo-title h1{font-size:24px}
  .mv-orders .mvo-order__amt{font-size:19px}
  .mv-orders .mvo-btn-outline{padding:0 14px}
}


/* buttons keep their own weight (the generic .mv-orders button rule resets font) */
.mv-orders .mvo-btn-outline{font-size:15px;font-weight:700}

/* ---------- Thanksgiving: expandable order cards (items shown in the card) ---------- */
.mvo-order__sub{font-size:14px;color:var(--mvo-ink2);font-weight:600}
.mvo-order__amtwrap{display:flex;flex-direction:column;align-items:flex-end;line-height:1.15}
.mvo-order__amtlbl{font-size:12px;font-weight:600;color:var(--mvo-muted)}
.mvo-order--cancelled .mvo-order__amtwrap .mvo-order__amt{color:var(--mvo-faint);text-decoration:line-through}
.mvo-order__panel{flex:1 1 100%;border-top:1px solid var(--mvo-line2);padding-top:14px;display:flex;flex-direction:column;gap:14px}
.mvo-titems{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.mvo-titem{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--mvo-line2)}
.mvo-titem:last-child{border-bottom:none}
.mvo-titem__img{flex:0 0 56px;width:56px;height:56px;border-radius:10px;object-fit:cover;background:var(--mvo-line2)}
.mvo-titem__main{flex:1 1 auto;display:flex;flex-direction:column;gap:3px;min-width:0}
.mvo-titem__name{font-size:15px;font-weight:700;overflow-wrap:anywhere}
.mvo-titem__qty{font-size:13px;color:var(--mvo-muted)}
.mvo-titem .mvo-item__status{flex:0 0 auto}
.mvo-titem__amt{flex:0 0 72px;text-align:right;font-size:16px;font-weight:800}
.mvo-titem--cancelled .mvo-titem__name{color:var(--mvo-faint)}
.mvo-titem--cancelled .mvo-titem__amt{color:var(--mvo-faint);text-decoration:line-through}
.mvo-order__addr{background:var(--mvo-teal-lt);border-radius:12px;padding:12px 16px}
.mvo-order__addr span{display:block;font-size:12px;font-weight:800;letter-spacing:.06em;color:var(--mvo-ink2);text-transform:uppercase;margin-bottom:4px}
.mvo-order__addr p{margin:0;font-size:15px;line-height:1.5;overflow-wrap:anywhere}
@media (max-width:680px){
  .mvo-titem{flex-wrap:wrap;gap:10px}
  .mvo-titem__main{flex-basis:calc(100% - 70px)}
  .mvo-titem .mvo-item__status{margin-left:70px}
  .mvo-titem__amt{margin-left:auto;flex-basis:auto}
  .mvo-order__amtwrap{align-items:flex-start}
}

@media (prefers-reduced-motion:reduce){.mvo-skel{animation:none}}