/* ─────────────────────────────────────────────
   Shared Menu Panel Styles
   Used by: pos.html (left panel) and menu.html (QR customer menu)
   ───────────────────────────────────────────── */

/* ── CSS Variables (light orange theme) ── */
:root {
  --mp-orange:   #ea580c;
  --mp-orange-d: #c2410c;
  --mp-orange-l: #fed7aa;
  --mp-bg:       #f1f5f9;
  --mp-white:    #ffffff;
  --mp-border:   #e2e8f0;
  --mp-text:     #1e293b;
  --mp-muted:    #64748b;
}

/* ── Search Box ── */
.mp-search-box {
  position: relative;
  margin-bottom: 12px;
}
.mp-search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--mp-border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--mp-text);
  outline: none;
  transition: border-color 0.2s;
  background: var(--mp-bg);
  font-family: inherit;
}
.mp-search-box input:focus {
  border-color: var(--mp-orange);
  background: var(--mp-white);
}
.mp-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
}

/* ── Category Chips ── */
.mp-cat-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}
.mp-cat-chip {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--mp-border);
  border-radius: 99px;
  background: var(--mp-white);
  color: var(--mp-muted);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  font-family: inherit;
}
.mp-cat-chip:hover {
  border-color: var(--mp-orange);
  color: var(--mp-orange);
}
.mp-cat-chip.active {
  background: var(--mp-orange);
  border-color: var(--mp-orange);
  color: white;
}

/* ── Items Scroll & Grid ── */
.mp-items-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
}
.mp-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.mp-items-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--mp-muted);
  font-size: 14px;
}

/* ── Item Card ── */
.mp-item-card {
  background: var(--mp-white);
  color: var(--mp-text);
  border: 1.5px solid var(--mp-border);
  border-radius: 12px;
  padding: 12px 12px 10px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s, border-color 0.12s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 90px;
  user-select: none;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.mp-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
  border-color: var(--mp-orange);
}
.mp-item-card:active { transform: scale(0.97); }
.mp-item-card.in-cart {
  background: #fff7ed;
  border-color: var(--mp-orange);
  box-shadow: 0 0 0 2px var(--mp-orange), 0 4px 14px rgba(234, 88, 12, 0.18);
}
.mp-item-card.out-of-stock {
  opacity: 0.45;
  cursor: not-allowed;
}

.mp-item-card-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}
.mp-item-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mp-item-card-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--mp-orange);
}
.mp-item-card.in-cart .mp-item-card-price {
  font-size: 11px;
  color: var(--mp-orange-d);
}

/* ── Qty Stepper (hidden until in-cart) ── */
.mp-item-stepper {
  display: none;
  align-items: center;
  background: var(--mp-orange);
  border-radius: 99px;
  overflow: hidden;
}
.mp-item-card.in-cart .mp-item-stepper { display: flex; }
.mp-step-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mp-step-btn:active { background: rgba(0, 0, 0, 0.2); }
.mp-step-qty {
  font-size: 13px;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
  color: white;
}

/* ── Menu Top Bar ── */
.mp-menu-top {
  padding: 14px 16px 10px;
  background: var(--mp-white);
  border-bottom: 1px solid var(--mp-border);
  flex-shrink: 0;
}

/* ── Mobile responsive ── */
@media (max-width: 640px) {
  .mp-menu-top { padding: 8px 10px 6px; }
  .mp-search-box { margin-bottom: 8px; }
  .mp-search-box input { padding: 8px 12px 8px 34px; font-size: 13px; }
  .mp-search-icon { font-size: 14px; left: 10px; }

  /* Category chips: single scrollable row */
  .mp-cat-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 5px;
    scrollbar-width: none;
  }
  .mp-cat-chips::-webkit-scrollbar { display: none; }
  .mp-cat-chip { padding: 5px 12px; font-size: 11px; flex-shrink: 0; }

  /* Items grid: 3 compact columns */
  .mp-items-scroll { padding: 8px 10px; }
  .mp-items-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .mp-item-card { min-height: 68px; padding: 7px 8px 7px; border-radius: 10px; }
  .mp-item-card-name { font-size: 11px; line-height: 1.25; margin-bottom: 4px; }
  .mp-item-card-price { font-size: 12px; }
  .mp-step-btn { min-width: 32px; min-height: 32px; width: 32px; height: 32px; font-size: 14px; }
  .mp-step-qty { font-size: 12px; }
}

/* ── Veg / Non-Veg FSSAI indicator ── */
.veg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border: 1.5px solid;
  border-radius: 2px;
  margin-right: 3px;
  vertical-align: middle;
  flex-shrink: 0;
}
.veg-badge::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.veg-badge.veg    { border-color: #16a34a; }
.veg-badge.veg::after    { background: #16a34a; }
.veg-badge.non-veg { border-color: #dc2626; }
.veg-badge.non-veg::after { background: #dc2626; }
