/*
 * MOZO — Customer QR Menu (E5)
 * Light theme, mobile-first, standalone (no dark theme sidebar).
 */

/* --- Reset for QR menu page --- */
#qr-menu-app {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a2e;
  background: #f8f8fa;
  min-height: 100vh;
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.qr-header {
  background: #fff;
  padding: 20px 16px 12px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.qr-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}
.qr-table {
  font-size: 13px;
  font-weight: 600;
  color: #e94560;
  background: rgba(233,69,96,0.08);
  padding: 4px 12px;
  border-radius: 12px;
}

/* --- Category tabs --- */
.qr-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #fff;
  padding: 0 12px;
  border-bottom: 1px solid #f0f0f0;
}
.qr-tabs::-webkit-scrollbar { display: none; }
.qr-tab {
  flex-shrink: 0;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #888;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.qr-tab--active {
  color: #e94560;
  border-bottom-color: #e94560;
}

/* --- Item list --- */
.qr-items {
  padding: 8px 12px;
}
.qr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 12px;
  border: none;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.qr-item:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(233,69,96,0.15);
}
.qr-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.qr-item__name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
}
.qr-item__desc {
  font-size: 12px;
  color: #888;
}
.qr-item__price {
  font-family: 'JetBrains Mono', "SF Mono", "Cascadia Mono", "Consolas", monospace;
  font-size: 15px;
  font-weight: 700;
  color: #e94560;
  flex-shrink: 0;
  margin-left: 12px;
}

/* --- Cart bar --- */
.qr-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: #e94560;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -2px 12px rgba(233,69,96,0.3);
}
.qr-cart-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.qr-cart-total {
  font-family: 'JetBrains Mono', "SF Mono", "Cascadia Mono", "Consolas", monospace;
  font-size: 16px;
  font-weight: 700;
}
.qr-cart-btn {
  padding: 10px 24px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* --- Cart modal --- */
.qr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.qr-cart-modal {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  padding: 20px;
}
.qr-cart-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.qr-cart-modal__header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.qr-cart-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: #666;
}
.qr-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.qr-cart-item__info {
  display: flex;
  gap: 8px;
  font-size: 14px;
}
.qr-cart-item__qty {
  color: #e94560;
  font-weight: 600;
}
.qr-cart-item__price {
  font-family: 'JetBrains Mono', "SF Mono", "Cascadia Mono", "Consolas", monospace;
  font-weight: 700;
  font-size: 14px;
}
.qr-cart-modal__total {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  font-family: 'JetBrains Mono', "SF Mono", "Cascadia Mono", "Consolas", monospace;
  font-size: 18px;
  font-weight: 700;
  border-top: 2px solid #1a1a2e;
  margin-top: 8px;
}
.qr-cart-modal__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.qr-input {
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.qr-input:focus {
  border-color: #e94560;
}
.qr-submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: #e94560;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.qr-submit-btn:active {
  background: #d63050;
}
.qr-submit-btn:disabled {
  opacity: 0.6;
}

/* --- States --- */
.qr-loading, .qr-error, .qr-empty {
  text-align: center;
  padding: 40px 16px;
  color: #888;
  font-size: 15px;
}
.qr-error {
  color: #e94560;
}
.qr-success {
  text-align: center;
  padding: 60px 24px;
}
.qr-success h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 16px 0 24px;
  color: #1a1a2e;
}
