/* Document Management Styles */

/* Upload Drop Zone */
.upload-drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-drop-zone:hover {
    border-color: #0d6efd;
    background-color: #f0f8ff;
}

.upload-drop-zone.drag-over {
    border-color: #0d6efd;
    background-color: #e7f3ff;
    border-style: solid;
    transform: scale(1.02);
}

.upload-drop-text {
    pointer-events: none;
    color: #6c757d;
}

.upload-drop-zone.drag-over .upload-drop-text {
    color: #0d6efd;
}

/* Upload Progress */
.upload-progress .progress {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress .progress-bar {
    transition: width 0.3s ease;
}

/* Document Cards */
.document-card {
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 280px;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.document-card.border-primary {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Document Icons */
.document-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* File Type Icons with Colors */
.fa-file-pdf { color: #dc3545; }
.fa-file-word { color: #0d6efd; }
.fa-file-excel { color: #198754; }
.fa-file-powerpoint { color: #fd7e14; }
.fa-file-image { color: #17a2b8; }
.fa-file-video { color: #6f42c1; }
.fa-file-audio { color: #6f42c1; }
.fa-link { color: #17a2b8; }
.fa-file { color: #6c757d; }

/* Document Table */
.table-active {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.document-table .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
}

/* Search and Filter Bar */
.document-search-bar {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.document-search-bar .form-control,
.document-search-bar .form-select {
    border-radius: 6px;
}

/* View Toggle Buttons */
.view-toggle .btn {
    min-width: 100px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-notification {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.toast-success {
    border-left: 4px solid #198754;
    background-color: #f8fff9;
}

.toast-notification.toast-error {
    border-left: 4px solid #dc3545;
    background-color: #fff8f8;
}

.toast-notification.toast-warning {
    border-left: 4px solid #fd7e14;
    background-color: #fffaf5;
}

.toast-notification.toast-info {
    border-left: 4px solid #0dcaf0;
    background-color: #f0fcff;
}

/* Loading States */
.document-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.document-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Empty State */
.document-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.document-empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .upload-drop-zone {
        padding: 1rem;
        min-height: 80px;
    }
    
    .document-card {
        min-height: auto;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .toast-notification {
        max-width: none;
    }
    
    .document-search-bar {
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .upload-drop-zone {
        padding: 0.75rem;
    }
    
    .upload-drop-text {
        font-size: 0.875rem;
    }
    
    .document-icon {
        font-size: 2rem;
    }
}

/* Accessibility */
.upload-drop-zone:focus-within {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.document-card:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Animation for new documents */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.document-card.new {
    animation: fadeInUp 0.5s ease-out;
}

/* Drag and drop states */
.upload-drop-zone .form-control[type="file"] {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-drop-zone.drag-over .form-control[type="file"] {
    opacity: 0;
}

/* Document metadata styling */
.document-metadata {
    font-size: 0.875rem;
    color: #6c757d;
}

.document-metadata .badge {
    font-size: 0.75rem;
}

/* File size indicators */
.file-size-large {
    color: #fd7e14;
    font-weight: 600;
}

.file-size-warning {
    color: #dc3545;
    font-weight: 600;
}

/* Selected documents styling */
.documents-selected-bar {
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.documents-selected-bar .selected-count {
    font-weight: 600;
    color: #0d6efd;
}