/**
 * Main Stylesheet
 * 
 * Global styles for the Document Manager application
 */

:root {
    --primary: #4f46e5;
    --secondary: #10b981;
    --editor-bg-light: #f9fafb;
    --editor-bg-dark: #1f2937;
    --editor-text-light: #111827;
    --editor-text-dark: #f3f4f6;
}

/* Tailwind configuration */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', sans-serif;
}

/* Utility classes */
.action-button {
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.action-button:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Make sidebar collapsible on mobile - hidden by default */
    #sidebar.sidebar-mobile-hidden {
        transform: translateX(-100%);
    }
    
    /* Sidebar visible state on mobile */
    #sidebar:not(.sidebar-mobile-hidden) {
        transform: translateX(0);
    }
    
    /* Backdrop visible state */
    #sidebarBackdrop:not(.sidebar-mobile-hidden) {
        opacity: 1;
    }
    
    #sidebarBackdrop.sidebar-mobile-hidden {
        opacity: 0;
        pointer-events: none;
    }
    
    /* Touch-friendly buttons */
    button, .action-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing on mobile */
    .file-item {
        padding: 0.875rem;
    }
    
    /* Mobile file list layout */
    .file-item .file-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Ensure sidebar is visible on desktop */
@media (min-width: 769px) {
    #sidebar {
        transform: none !important;
    }
}

/* File list styling */
.file-item {
    transition: all 0.2s ease;
}

.file-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dark .file-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Skeleton loading animation */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200px 100%;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: #ef4444;
    color: white;
}

.toast-info {
    background-color: #3b82f6;
    color: white;
}

