/* Drag & Drop Styles */
.drop-area {
    border: 2px dashed #ced4da;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.drop-area.highlight {
    border-color: #4285f4;
    background-color: rgba(66, 133, 244, 0.1);
}

.border-dashed {
    border-style: dashed !important;
}

/* Toast Styles */
.toast {
    min-width: 300px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Progress Bar Animation */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position-x: 1rem; }
}

/* File Icons */
.file-icon-lg {
    font-size: 3rem;
}

/* Checkbox Styles */
.file-checkbox {
    cursor: pointer;
    transform: scale(1.2);
}

/* Bulk Actions Bar */
#bulkActions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Table Sorting */
th[data-sort]::after {
    content: ' ↕';
    opacity: 0.5;
    font-size: 0.8em;
}

th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

/* Responsive Menu */
@media (max-width: 991.98px) {
    .col-lg-3 {
        position: fixed;
        top: 56px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 56px);
        overflow-y: auto;
        z-index: 1000;
        background: white;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        transition: left 0.3s ease;
    }
    
    body.menu-open .col-lg-3 {
        left: 0;
    }
    
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
}

/* Modal Preview */
#previewModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* File Type Colors */
.text-file { color: #4285f4; }
.pdf-file { color: #db4437; }
.image-file { color: #f4b400; }
.document-file { color: #0f9d58; }
.spreadsheet-file { color: #ab47bc; }

/* Loading Spinner */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* Tooltip Customization */
.tooltip-inner {
    max-width: 300px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1rem;
    height: 1rem;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.btn-loading.btn-outline-primary::after {
    border: 2px solid rgba(66, 133, 244, 0.3);
    border-top-color: #4285f4;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* File Grid View */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.file-grid-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.file-grid-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* Context Menu */
.context-menu {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    display: none;
}

.context-menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.context-menu-item:hover {
    background-color: #f8f9fa;
}

/* Preview Features */
.preview-btn, .share-btn {
    min-width: 36px;
}

.file-actions .btn {
    margin-right: 5px;
}

.file-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Modal animations */
.modal.fade .modal-dialog {
    transform: translate(0, 50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* Responsive preview */
@media (max-width: 768px) {
    .preview-content-wrapper {
        min-height: 300px;
        max-height: 50vh;
    }
    
    .pdf-viewer {
        height: 40vh;
    }
    
    .image-controls {
        position: static;
        margin-top: 10px;
        background: transparent;
        box-shadow: none;
    }
    
    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
}

/* Loading animation */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Print styles for preview */
@media print {
    .modal-header,
    .modal-footer,
    .image-controls,
    .pdf-controls,
    .video-controls {
        display: none !important;
    }
    
    .modal-dialog {
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .modal-content {
        border: none !important;
        box-shadow: none !important;
    }
    
    .preview-content-wrapper {
        max-height: none !important;
        overflow: visible !important;
    }
}