/**
 * Chot Order Dashboard - Custom Styles
 * Minimal custom CSS for additional styling beyond Tailwind
 */

/* Smooth transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus ring customization */
*:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.9);
    outline-offset: 2px;
    border-radius: 4px;
}

.dark *:focus-visible {
    outline-color: rgba(255, 255, 255, 0.9);
}

/* Custom scrollbar for dark mode */
.dark ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dark ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Light mode scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Smooth modal transitions */
#order-modal {
    animation: fadeIn 0.2s ease-in-out;
}

#order-modal.hidden {
    animation: fadeOut 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Loading state animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Hover effects for table rows */
table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

/* Input focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.dark input:focus,
.dark textarea:focus,
.dark select:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Button hover effects */
button {
    transition: all 0.15s ease-in-out;
}

/* Tab button active state */
.tab-button.active {
    position: relative;
}

/* Product search results scrollbar */
#product-results {
    scrollbar-width: thin;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #app-container {
        padding: 1rem;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    .modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* Print styles */
@media print {
    #theme-toggle,
    .tab-button,
    button {
        display: none;
    }
}

/* Badge animations */
.badge {
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Empty state styling */
.empty-state {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.empty-state:hover {
    opacity: 0.8;
}

/* Product card hover effect */
.add-product-btn {
    position: relative;
    overflow: hidden;
}

.add-product-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.add-product-btn:hover::before {
    left: 100%;
}

/* Status badge pulse animation for pending orders */
.status-pending {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}
