@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* GLOBAL Fonts */
.font-global,
.font-global * {
    font-family: 'Inter', sans-serif !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scroll-bar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scroll-bar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Custom scrollbar for main areas */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #4b5563;
    /* gray-600 */
    border-radius: 10px;
    border-right: 3px solid transparent;
    /* The 2px gap */
    background-clip: padding-box;
}

/* Product Card Hover Effect */
.product-card {
    position: relative;
    transition: all 0.2s ease-in-out;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(138, 90, 68, 0.15), 0 8px 10px -6px rgba(138, 90, 68, 0.1);
}

.product-card:hover .add-btn {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Category Button styling */
.category-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUpFade 0.3s ease-out forwards;
}

/* Print Styles - Optimized for 58mm Bluetooth Printer */
@media print {
    @page {
        size: 58mm auto;
        margin: 0;
    }

    body {
        width: 58mm;
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact;
    }

    /* Hide everything by default */
    body > *:not(#printReceiptArea) {
        display: none !important;
    }

    #printReceiptArea {
        display: block !important;
        width: 58mm;
        margin: 0;
        padding: 0;
    }

    #printReceiptArea * {
        visibility: visible !important;
    }

    /* Reset Tailwind or other styles that might interfere */
    .hidden {
        display: block !important;
    }
}

/* Floating Label Styles */
.floating-label-group {
    position: relative;
}

.floating-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    padding: 0 0.5rem;
    color: #6b7280;
    font-weight: 400;
    font-size: 0.875rem;
    pointer-events: none;
    transition: all 0.2s ease-out;
    z-index: 10;
    border-radius: 4px;
}

.floating-input:focus~.floating-label,
.floating-input:not(:placeholder-shown)~.floating-label,
.floating-select:focus~.floating-label,
.floating-select:not(:invalid)~.floating-label {
    top: 0;
    font-size: 0.75rem;
    color: #4b5563;
}

.floating-input::placeholder {
    color: transparent;
}

/* Hide scrollbar but keep functionality */
.no-scrollbar::-webkit-scrollbar {
    display: none !important;
}

/* Pull to Refresh Indicator */
#ptr-indicator {
    position: fixed;
    top: -80px;
    /* Hide off-screen */
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: transform 0.2s ease-out;
    pointer-events: none;
}

.ptr-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: #4A3320;
    border: 2px solid #E6DCC3;
    pointer-events: auto;
}

.ptr-icon svg {
    width: 22px;
    height: 22px;
}

@keyframes ptr-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ptr-spinning svg {
    animation: ptr-spin 0.8s linear infinite;
}

/* Receipt Preview Box */
#receiptPreviewBox {
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    background-color: white;
}