/* BeamitExplorer Custom Styles */

/* Search Drawer Styles */
.search-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1050;
    max-height: 80vh;
    overflow-y: auto;
}

.search-drawer.show {
    transform: translateY(0);
}

.search-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.search-drawer-body {
    padding: 1.5rem;
}

/* Desktop/Tablet Styles */
@media (min-width: 768px) {
    .search-drawer {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: auto;
        width: 400px;
        max-width: 90vw;
        transform: translateX(-100%);
        border-top: none;
        border-right: 1px solid #dee2e6;
        max-height: 100vh;
    }
    
    .search-drawer.show {
        transform: translateX(0);
    }
    
    .search-drawer-header {
        background: white;
        border-bottom: 1px solid #dee2e6;
    }
}

/* File Card Styles */
.file-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease-in-out;
    background: white;
}

.file-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.file-card-header {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    background: #f8f9fa;
}

.file-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

.file-card-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0.25rem 0 0 0;
}

.file-card-body {
    padding: 1rem;
}

.file-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.file-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.file-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-card-comments {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    padding: 0.75rem;
    margin: 0.75rem 0;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #495057;
}

/* Responsive Grid */
.files-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}

@media (min-width: 1200px) {
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    }
}

/* Loading States */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

/* Mobile Optimizations */
@media (max-width: 767.98px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .file-card-actions {
        flex-direction: column;
    }
    
    .file-card-actions .btn {
        width: 100%;
    }
    
    .file-card-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .search-drawer {
        background: #212529;
        border-color: #495057;
    }
    
    .search-drawer-header {
        background: #343a40;
        border-color: #495057;
    }
    
    .file-card {
        background: #212529;
        border-color: #495057;
    }
    
    .file-card-header {
        background: #343a40;
        border-color: #495057;
    }
    
    .file-card-title {
        color: #f8f9fa;
    }
    
    .file-card-comments {
        background: #343a40;
        color: #e9ecef;
    }
}
