@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    color: #2D3436;
}

/* Color Variables for convenience if needed, though Tailwind classes are used */
:root {
    --primary: #3498DB;
    --sidebar: #2C3E50;
    --success: #2ECC71;
    --bg-light: #F8F9FA;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Custom Scrollbar for other elements */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
    border: 3px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #3498DB;
}

/* Custom Scrollbar Utility */
.custom-scrollbar::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #3498DB;
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view-section.active {
    display: block;
}

#pos-view.active {
    display: flex !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-btn.active {
    background-color: #3498DB !important;
    color: white !important;
}

/* Product Card Hover Effect */
.product-card {
    transition: all 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Modal Animations */
#modal-overlay {
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
}

#modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#add-item-modal.active {
    display: block;
    transform: scale(1);
}

/* Sidebar Auto-Hide */
#sidebar {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#sidebar.auto-hide {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    opacity: 0;
    z-index: 40;
    box-shadow: none;
}

#sidebar.auto-hide.sidebar-visible {
    transform: translateX(0);
    opacity: 1;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
}

#sidebar.pinned {
    position: relative;
    transform: translateX(0) !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

/* Pin button active state */
#sidebar-pin-btn.pinned {
    background-color: #4f46e5;
    color: white;
    transform: rotate(45deg);
}

/* Sidebar overlay when auto-hide sidebar is visible */
#sidebar-overlay {
    transition: opacity 0.3s ease;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 1024px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
    }

    #sidebar.sidebar-visible {
        transform: translateX(0);
    }

    #sidebar-overlay.sidebar-visible {
        display: block;
        opacity: 1;
    }

    /* POS adjustments for mobile */
    #pos-view>div {
        grid-template-columns: 1fr;
        height: auto;
        overflow-y: auto;
    }

    #pos-products-grid td,
    #pos-products-grid th {
        padding: 8px 4px;
        font-size: 11px;
    }

    .view-section {
        padding: 10px !important;
    }

    /* Metric cards on mobile */
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    header {
        padding: 0 10px;
    }

    #page-title {
        font-size: 16px;
    }

    #real-time {
        font-size: 14px;
    }
}

/* Ensure POS products table doesn't break layout */
#pos-products-grid {
    min-width: 600px;
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

min-width: 600px;
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}