/* ============================================================
   MENU ORDER POPUP (js/menu-order.js)
   ============================================================ */
.mo-overlay {
  position: fixed;
  inset: 0;
  z-index: 3300;
  background: rgba(10, 24, 10, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.mo-overlay[hidden] { display: none; }
.mo-overlay.open { opacity: 1; }

.mo-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  height: min(90vh, 900px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  transform: translateY(24px);
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
  font-family: 'Inter', sans-serif;
}
.mo-overlay.open .mo-sheet { transform: none; }

@media (max-width: 640px) {
  .mo-sheet {
    max-width: none;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
    transform: translateY(40px);
  }
}

/* ---------- Header ---------- */
.mo-head {
  flex-shrink: 0;
  background: #153010;
  color: #fff;
  padding: 14px 16px 0;
  padding-top: max(14px, env(safe-area-inset-top));
}
.mo-head-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mo-logo {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}
.mo-head-text { flex: 1; min-width: 0; }
.mo-eyebrow {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #BEC050;
  font-weight: 600;
}
.mo-head h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #fff;
}
.mo-table-tag {
  flex-shrink: 0;
  background: #BEC050;
  color: #153010;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
}
.mo-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}
.mo-close:hover { background: rgba(255, 255, 255, 0.22); }

.mo-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 0 14px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.7);
}
.mo-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 16px; /* stops iOS zooming on focus */
  outline: none;
}
.mo-search input::placeholder { color: rgba(255, 255, 255, 0.55); }

.mo-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 12px 16px;
  scroll-padding: 0 16px;
  scrollbar-width: none;
}
.mo-overlay.reviewing .mo-search,
.mo-overlay.reviewing .mo-chips { display: none; }
.mo-overlay.reviewing .mo-head { padding-bottom: 14px; }
.mo-chips::-webkit-scrollbar { display: none; }
.mo-chip {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 50px;
  white-space: nowrap;
  cursor: pointer;
}
.mo-chip.active {
  background: #BEC050;
  border-color: #BEC050;
  color: #153010;
  font-weight: 700;
}

/* ---------- Item list ---------- */
.mo-body,
.mo-review {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 16px 24px;
}
.mo-body[hidden],
.mo-review[hidden] { display: none; }

.mo-section { padding-top: 14px; }
.mo-section[hidden],
.mo-group[hidden],
.mo-item[hidden],
.mo-divider[hidden] { display: none; }
.mo-section-title {
  margin: 0 0 4px;
  font-family: 'Playfair Display', serif;
  font-size: 1.12rem;
  color: #153010;
  padding-bottom: 8px;
  border-bottom: 2px solid #BEC050;
}
.mo-group-title {
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #153010;
}
.mo-group-title small {
  margin-left: 6px;
  font-weight: 400;
  font-size: 0.72rem;
  color: rgba(21, 48, 16, 0.5);
}
.mo-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 4px;
  color: #3B5A10;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.mo-divider::before,
.mo-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(59, 90, 16, 0.35);
}

.mo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(21, 48, 16, 0.08);
  border-radius: 10px;
  transition: background 0.18s ease;
}
.mo-item.in-cart { background: rgba(190, 192, 80, 0.14); }
.mo-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mo-item-name {
  font-size: 0.93rem;
  color: #1d2a17;
  line-height: 1.35;
}
.mo-item-name em {
  font-style: normal;
  color: rgba(21, 48, 16, 0.6);
  font-size: 0.82rem;
}
.mo-item-desc {
  font-size: 0.74rem;
  font-style: italic;
  color: rgba(21, 48, 16, 0.55);
  line-height: 1.35;
}
.mo-item-price {
  font-size: 0.84rem;
  font-weight: 700;
  color: #C07228;
}
.mo-item-price b { color: #153010; }

.mo-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #3B5A10;
  background: #fff;
  color: #3B5A10;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}
.mo-btn:active { transform: scale(0.9); }
.mo-plus {
  background: #3B5A10;
  color: #fff;
}
.mo-minus:disabled {
  opacity: 0.28;
  cursor: default;
  transform: none;
}
.mo-stepper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.mo-qty {
  width: 26px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: #153010;
}

.mo-empty,
.mo-footnote {
  text-align: center;
  color: rgba(21, 48, 16, 0.55);
  font-size: 0.8rem;
  margin: 24px 0 0;
}
.mo-empty[hidden] { display: none; }

/* ---------- Order review ---------- */
.mo-review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
}
.mo-back,
.mo-clear {
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}
.mo-back { color: #3B5A10; }
.mo-clear { color: #b23b2a; }
.mo-review-title {
  margin: 10px 0 6px;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #153010;
}
.mo-field {
  display: block;
  margin-top: 16px;
}
.mo-field span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #153010;
  margin-bottom: 6px;
}
.mo-field input,
.mo-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(21, 48, 16, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  resize: vertical;
}
.mo-field input:focus,
.mo-field textarea:focus {
  outline: none;
  border-color: #3B5A10;
  box-shadow: 0 0 0 3px rgba(59, 90, 16, 0.15);
}
.mo-review-hint {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(59, 90, 16, 0.07);
  color: rgba(21, 48, 16, 0.75);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ---------- Bottom total bar ---------- */
.mo-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: #153010;
  color: #fff;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
}
.mo-bar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mo-bar-count {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.7);
}
.mo-bar-total {
  font-size: 1.3rem;
  font-weight: 700;
  color: #BEC050;
  line-height: 1.2;
}
.mo-bar-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 50px;
  padding: 12px 20px;
  background: #BEC050;
  color: #153010;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.mo-bar-btn[hidden] { display: none; }
.mo-bar-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.mo-bar-wa {
  background: #25D366;
  color: #fff;
}
.mo-overlay.has-items .mo-bar-total { animation: mo-pop 0.25s ease; }
@keyframes mo-pop {
  50% { transform: scale(1.06); }
}

/* ---------- "Who is this order for" steps ---------- */
.mo-setup {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px 28px;
}
.mo-setup[hidden],
.mo-step[hidden],
.mo-field[hidden],
.mo-back[hidden],
.mo-who[hidden] { display: none; }
.mo-overlay.setting-up .mo-search,
.mo-overlay.setting-up .mo-chips,
.mo-overlay.setting-up .mo-bar,
.mo-overlay.setting-up .mo-who { display: none; }
.mo-overlay.setting-up .mo-head { padding-bottom: 14px; }
.mo-setup-title {
  margin: 6px 0 4px;
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: #153010;
}
.mo-setup-sub { margin: 0 0 6px; font-size: 0.86rem; color: rgba(21, 48, 16, 0.6); }
.mo-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.mo-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 16px 14px;
  border: 1.5px solid rgba(21, 48, 16, 0.16);
  border-radius: 14px;
  background: #faf8f2;
  font: inherit;
  color: #153010;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.mo-option i { font-size: 1.4rem; color: #3B5A10; }
.mo-option strong { display: block; font-size: 1rem; }
.mo-option small { display: block; margin-top: 2px; font-size: 0.76rem; line-height: 1.4; color: rgba(21, 48, 16, 0.6); }
.mo-option:hover { border-color: #3B5A10; }
.mo-option[aria-pressed="true"] {
  border-color: #3B5A10;
  background: rgba(190, 192, 80, 0.18);
  box-shadow: 0 0 0 2px #3B5A10 inset;
}
.mo-req { color: #b23b2a; font-weight: 700; }
.mo-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecea;
  color: #a12a1a;
  font-size: 0.84rem;
}
.mo-error[hidden] { display: none; }
.mo-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  padding: 14px 20px;
  border: 0;
  border-radius: 50px;
  background: #153010;
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}
.mo-continue:hover { background: #3B5A10; }
.mo-who {
  border: 0;
  cursor: pointer;
  max-width: 46%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}
.mo-who i { font-size: 0.66rem; margin-left: 3px; }
.mo-who-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(190, 192, 80, 0.16);
  color: #153010;
  font-size: 0.88rem;
  font-weight: 600;
}
.mo-who-summary i { color: #3B5A10; margin-right: 4px; }
@media (max-width: 360px) { .mo-options { grid-template-columns: 1fr; } }

/* ---------- Trigger on the menu page ---------- */
.menu-order-cta {
  display: flex;
  justify-content: center;
  margin: -18px 0 34px;
}
.menu-order-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 0;
  border-radius: 50px;
  background: #C07228;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(192, 114, 40, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.menu-order-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(192, 114, 40, 0.45);
}
