/* ═══════════════════════════════════════════════
   Hotel Restaurant Digital Menu — Custom Styles
   Extends Tailwind CSS with animations & effects
   ═══════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
    --color-bg-dark: #0f0f1a;
    --color-bg-card: #1a1a2e;
    --color-bg-card-hover: #222240;
    --color-gold: #d4a574;
    --color-gold-light: #e8c9a0;
    --color-cream: #f5f0eb;
    --color-cream-dim: #b0a89e;
    --color-emerald: #2d6a4f;
    --color-red: #dc2626;
    --color-glass: rgba(26, 26, 46, 0.75);
    --color-glass-border: rgba(212, 165, 116, 0.15);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

/* ── Base ── */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-cream);
    overscroll-behavior-y: contain;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-gold); border-radius: 99px; }

/* ── Glassmorphism ── */
.glass {
    background: var(--color-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-glass-border);
}

.glass-card {
    background: linear-gradient(135deg, rgba(26,26,46,0.85), rgba(26,26,46,0.6));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,165,116,0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover, .glass-card:active {
    border-color: rgba(212,165,116,0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(212,165,116,0.1);
}

/* ── Category Pills ── */
.category-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.pill {
    transition: all 0.25s ease;
    white-space: nowrap;
    cursor: pointer;
}
.pill.active {
    background: var(--color-gold) !important;
    color: #1a1a2e !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212,165,116,0.3);
}

/* ── Tag Chips ── */
.tag-chip {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tag-vegan { background: #2d6a4f; color: #d1fae5; }
.tag-non-fasting { background: #92400e; color: #fef3c7; }
.tag-gluten-free { background: #1e40af; color: #dbeafe; }
.tag-chef-special { background: #991b1b; color: #fee2e2; }

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,165,116,0.5); }
    50% { box-shadow: 0 0 0 12px rgba(212,165,116,0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.animate-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.animate-slide-down {
    animation: slideDown 0.3s ease-in forwards;
}
.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}
.animate-fade-out {
    animation: fadeOut 0.3s ease forwards;
}
.animate-pulse-gold {
    animation: pulse-gold 2s ease-in-out infinite;
}
.animate-bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stagger children */
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.30s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.40s; }

/* ── Loading Skeleton ── */
.skeleton {
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a4e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

/* ── Cart FAB ── */
.cart-fab {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-fab:hover {
    transform: scale(1.1);
}
.cart-fab:active {
    transform: scale(0.95);
}
.cart-badge {
    animation: bounceIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Overlay ── */
.overlay-backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── Ripple Effect ── */
.ripple {
    position: relative;
    overflow: hidden;
}
.ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(212,165,116,0.3) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.ripple:active::after {
    opacity: 1;
}

/* ── Quantity Controls ── */
.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.qty-btn:hover {
    transform: scale(1.1);
}
.qty-btn:active {
    transform: scale(0.9);
}

/* ── Staff Dashboard ── */
.order-card {
    transition: all 0.3s ease;
}
.order-card.new-order {
    animation: fadeInUp 0.5s ease forwards;
    border-left: 4px solid var(--color-gold);
}

.status-submitted { background: #fbbf24; color: #78350f; }
.status-confirmed { background: #60a5fa; color: #1e3a5f; }
.status-preparing { background: #a78bfa; color: #2e1065; }
.status-served { background: #34d399; color: #064e3b; }
.status-cancelled { background: #f87171; color: #7f1d1d; }

/* ── Notification Pulse ── */
@keyframes notification-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.notification-pulse {
    animation: notification-pulse 0.5s ease;
}

/* ── Print Styles (QR Generator) ── */
@media print {
    body { background: white !important; color: black !important; }
    .no-print { display: none !important; }
    .qr-grid { break-inside: avoid; }
}

/* ── Waiter Show Mode ── */
.waiter-mode {
    background: #ffffff !important;
    color: #111111 !important;
}
.waiter-mode * {
    color: #111111 !important;
}
.waiter-mode .waiter-highlight {
    color: #000 !important;
    font-weight: 700;
}
