﻿/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1f1f22; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #f43f5e; }

.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

.glass-panel {
  background: rgba(20, 20, 22, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal { display: none; }
.modal.show { display: flex; }

.role-btn { background: #141418; color: #6b6b7b; border: 1px solid transparent; }
.role-btn:hover { background: #1a1a20; }
.role-btn.active { background: #ff5c00; color: white; box-shadow: 0 0 10px rgba(255,92,0,0.3); }

.order-type-btn { background: #141418; color: #6b6b7b; }
.order-type-btn.active { background: #ff5c00; color: white; }

.pay-tab { background: #141418; color: #6b6b7b; }
.pay-tab.active { background: #ff5c00; color: white; }

.category-pill.active { background: #ff5c00 !important; color: white !important; border-color: #ff5c00 !important; }

.discount-pill.active { background: rgba(255,92,0,0.15) !important; border-color: #ff5c00 !important; color: #ff5c00 !important; }
.discount-pill { background: rgba(255,255,255,0.03); color: #6b6b7b; border: 1px solid rgba(255,255,255,0.08); }
.discount-pill:hover { background: rgba(255,255,255,0.06); }

.menu-card-price { font-weight: 800; }

.toast-enter {
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUpFade {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@media print {
  @page { margin: 0; size: 58mm auto; }
  body { background: white !important; margin: 0; padding: 0; color: black !important; }
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible !important; color: black !important; }
  #print-area { position: absolute; left: 0; top: 0; width: 58mm; max-width: 58mm; background: white; padding: 4px; box-shadow: none !important; border-radius: 0 !important; }
  #print-area .text-transparent { color: black !important; -webkit-text-fill-color: black !important; }
  #print-area [class*="bg-sunset"], #print-area [class*="bg-petir"] { 
    background: none !important; 
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    color: black !important;
    -webkit-text-fill-color: black !important;
  }
  #recap-modal, #recap-modal * { visibility: visible !important; }
  #recap-modal { position: absolute; left: 0; top: 0; width: 100%; max-width: 100%; background: white !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; color: black !important; }
  #recap-modal * { color: black !important; border-color: #ccc !important; background: white !important; box-shadow: none !important; }
  #recap-modal button { display: none !important; }
  #recap-modal .recap-filter-btn { display: none !important; }
}

::selection { background: #f43f5e; color: white; }
::-moz-selection { background: #f43f5e; color: white; }

.recap-filter-btn { background: #1a1a1e; color: #6b6b7b; border: 1px solid transparent; transition: all 0.2s ease; }
.recap-filter-btn:hover { background: #1f1f22; }
.recap-filter-btn.active { background: #ff5c00; color: white; box-shadow: 0 0 10px rgba(255, 92, 0, 0.3); }

#login-overlay { transition: opacity 0.3s ease; }
#login-overlay.hidden { display: none; }

/* MOBILE FLOATING CART BAR */
#floating-cart-bar.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* MOBILE CART BOTTOM SHEET */
#mobile-cart-sheet.active { pointer-events: auto; }
#mobile-cart-sheet.active #mobile-cart-overlay { opacity: 1; }
#mobile-cart-sheet.active #mobile-cart-inner { transform: translateY(0); }

/* MOBILE STYLES */
@media (max-width: 767px) {
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Menu scroll area needs room for floating bar */
  #menu-scroll-area {
    padding-bottom: 80px;
  }

  /* Toast at bottom on mobile */
  #toast-container {
    top: auto;
    bottom: 100px;
    right: 12px;
    left: 12px;
    align-items: center;
  }
  .toast-enter {
    width: 100%;
    text-align: center;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .order-type-btn { padding-left: 4px; padding-right: 4px; font-size: 9px; }
}

/* QUEUE BADGE */
#queue-badge {
  animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 92, 0, 0.5); }
  50% { box-shadow: 0 0 18px rgba(255, 92, 0, 0.8); }
}

/* QUEUE MODAL */
#queue-modal.show { display: flex; }
#queue-modal .queue-item { transition: all 0.3s ease; }
#queue-modal .queue-item.ready { opacity: 0.4; text-decoration: line-through; }

/* TICKET STRIP - Disney Diner Style */
#ticket-strip {
  position: fixed;
  right: 16px;
  top: 80px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  pointer-events: none;
}
#ticket-strip::-webkit-scrollbar { width: 3px; }

.ticket-card {
  width: 180px;
  background: #fff8e7;
  color: #333;
  border-radius: 4px 12px 4px 12px;
  padding: 10px 12px;
  font-size: 10px;
  font-family: "Courier New", monospace;
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.3);
  animation: ticketSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.4s ease;
}
.ticket-card::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 20px;
  width: 12px;
  height: 12px;
  background: #0a0a0c;
  border-radius: 50%;
}
.ticket-card::after {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 20px;
  width: 12px;
  height: 12px;
  background: #0a0a0c;
  border-radius: 50%;
}
.ticket-card.dine-in { border-left: 4px solid #ff5c00; }
.ticket-card.takeaway { border-left: 4px solid #3b82f6; }
.ticket-card.delivery { border-left: 4px solid #10b981; }
.ticket-card .ticket-code { font-weight: 900; font-size: 11px; color: #ff5c00; }
.ticket-card .ticket-items { margin: 4px 0; line-height: 1.4; }
.ticket-card .ticket-customer { font-style: italic; color: #666; }
.ticket-card .ticket-ready-btn {
  display: block;
  margin-top: 6px;
  padding: 4px 8px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  font-size: 9px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.ticket-card .ticket-ready-btn:hover { background: #059669; }

.ticket-card.ready {
  animation: ticketFlyAway 0.6s ease-in forwards;
}
@keyframes ticketSlideIn {
  0% { transform: translateX(120px) rotate(6deg); opacity: 0; }
  100% { transform: translateX(0) rotate(0); opacity: 1; }
}
@keyframes ticketFlyAway {
  0% { transform: translateX(0) rotate(0); opacity: 1; }
  50% { transform: translateX(-20px) rotate(-8deg); opacity: 0.6; }
  100% { transform: translateX(200px) rotate(-15deg); opacity: 0; }
}

@media (max-width: 767px) {
  #ticket-strip { right: 8px; top: 60px; max-height: calc(100vh - 180px); }
  .ticket-card { width: 150px; font-size: 9px; padding: 8px 10px; }
}
