/* =========================================================
   STYLE.CSS - TOKO KASIR ECER & GROSIR (OFFLINE & ONLINE)
   Responsive Mobile & Desktop POS Styling
   ========================================================= */

/* Prevent horizontal overflow and page drifting outside viewport on mobile and PC */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  position: relative;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Hide scrollbar for horizontal pill navs on mobile */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Nav Tab Styles */
.nav-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 0.65rem;
  transition: all 0.18s ease-in-out;
  white-space: nowrap;
  border: 1px solid transparent;
}

@media (min-width: 640px) {
  .nav-tab {
    padding: 0.55rem 1rem;
    font-size: 0.8125rem;
  }
}

.nav-tab:hover {
  color: #1e293b;
  background-color: #f1f5f9;
}

.nav-tab.active-tab {
  color: #4f46e5;
  background-color: #eef2ff;
  border-color: #c7d2fe;
  font-weight: 700;
}

/* Category Filter Chips */
.cat-chip {
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cat-chip:hover {
  background-color: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.cat-chip.active {
  background-color: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

/* Modal Overlay & Box */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  transition: opacity 0.2s ease;
}

@media (min-width: 640px) {
  .modal-overlay {
    padding: 1rem;
  }
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background-color: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalScaleUp 0.2s ease-out forwards;
  max-height: 92vh;
  overflow-y: auto;
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Receipt Styling */
.receipt-paper {
  background-color: #fffdf5;
  line-height: 1.4;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #receiptModal, #receiptModal * {
    visibility: visible;
  }
  #receiptModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
  }
  .modal-card {
    box-shadow: none;
    border: none;
    max-width: 100%;
    width: 100%;
    padding: 0;
  }
  .receipt-paper {
    border: none !important;
    background: white !important;
    width: 78mm; /* Standard POS printer width */
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    font-size: 11px;
    color: black;
  }
  .print\:hidden {
    display: none !important;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.custom-scroll {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.emp-filter-chip {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.emp-filter-chip:hover {
  background-color: #e2e8f0;
  color: #1e293b;
}
.emp-filter-chip.active {
  background-color: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

