body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar styling ───────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c5c5c5; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* Hide scrollbar for category row on mobile */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Category filter pills ───────────────────────────── */
.category-btn {
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid #d1d5db;
    background-color: #fff;
    color: #374151;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.category-btn.active {
    background-color: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}
.category-btn:hover:not(.active) { background-color: #f3f4f6; }
.category-btn:active { transform: scale(0.95); }

/* ── Menu item card ──────────────────────────────────── */
.menu-item {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}
.menu-item:active {
    transform: scale(0.96);
}

/* ── Mobile tab bar ──────────────────────────────────── */
.mobile-tab {
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
}
.mobile-tab.active { color: #4f46e5; }
.mobile-tab:not(.active) { color: #9ca3af; }

/* Safe area for iPhone notch */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* ── Panels (mobile show/hide) ───────────────────────── */
#panel-menu  { display: flex; }
#panel-order { display: none; }

@media (min-width: 1024px) {
    #panel-menu  { display: flex !important; }
    #panel-order { display: flex !important; }
}

/* Mobile panel visibility managed by JS tab switching */
#panel-order.active-mobile { display: flex; }
#panel-menu.active-mobile  { display: flex; }

/* ── Order item delete button ────────────────────────── */
.delete-item-btn {
    opacity: 0.45;
    transition: opacity 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}
.delete-item-btn:hover,
.delete-item-btn:active {
    opacity: 1;
    color: #ef4444;
}

/* ── KOT panel chevron animation ─────────────────────── */
#pending-kots-chevron,
#pending-kots-chevron-mobile {
    transition: transform 0.2s ease;
}

/* ── KOT panel scrollbar ─────────────────────────────── */
#pending-kots-panel::-webkit-scrollbar,
#pending-kots-panel-mobile::-webkit-scrollbar { width: 4px; }
#pending-kots-panel::-webkit-scrollbar-thumb,
#pending-kots-panel-mobile::-webkit-scrollbar-thumb { background: #f97316; border-radius: 4px; }

/* ── Payment modal slide-up on mobile ───────────────── */
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.animate-slide-up { animation: slideUp 0.25s ease; }

/* ── Toast positioning fix on mobile ────────────────── */
@media (max-width: 1023px) {
    #toast {
        top: auto;
        bottom: 5rem;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        white-space: nowrap;
    }
}

/* ── Print styles ────────────────────────────────────── */
@media print {
    @page {
        size: auto;
        margin: 4mm;
    }

    body * { visibility: hidden; }
    body {
        background-color: white !important;
        margin: 0;
    }

    #receipt-container, #receipt-container * { visibility: visible; }
    #receipt-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 280px;
        font-family: 'Courier New', Courier, monospace;
        color: #000;
        font-size: 11px;
        box-shadow: none;
    }

    .receipt-header { text-align: center; margin-bottom: 10px; }
    .receipt-header h3 { margin: 0; font-size: 16px; font-weight: bold; }
    .receipt-header p { margin: 2px 0; font-size: 10px; }

    .receipt-table { width: 100%; border-collapse: collapse; }
    .receipt-table th, .receipt-table td { padding: 2px 0; }
    .receipt-table thead tr { border-bottom: 1px dashed #000; }
    .receipt-table tbody tr td:last-child,
    .receipt-table thead tr th:last-child { text-align: right; }

    .receipt-totals { margin-top: 10px; font-size: 12px; }
    .receipt-totals div { display: flex; justify-content: space-between; }

    .receipt-footer { text-align: center; margin-top: 15px; font-size: 10px; }

    .no-print, #pos-container, #payment-modal, #mobile-tab-bar { display: none !important; }
}