/* Enhanced File Manager Styles */

.file-manager-container {
    display: flex;
    height: calc(100vh - 60px);
    background: #f8f9fa;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.sidebar-section {
    margin: 20px 0;
    padding: 0 15px;
}

.sidebar-section h6 {
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding: 0 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #007bff;
}

.nav-item.active {
    background: #e3f2fd;
    color: #007bff;
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #007bff;
}

.nav-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 15px;
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.storage-info {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}

.progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #007bff, #0056b3);
    height: 100%;
    transition: width 0.3s ease;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.header-left {
    flex: 1;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #007bff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.view-toggle button {
    border: none;
    background: transparent;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle button.active {
    background: #007bff;
    color: white;
}

/* Search Container */
.search-container {
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.search-container .input-group {
    max-width: 600px;
}

.search-container .form-control {
    border-right: none;
}

.search-container .input-group-append .btn {
    border-left: none;
}

/* File List */
.file-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.file-list {
    display: grid;
    gap: 10px;
}

.file-list.view-list {
    grid-template-columns: 1fr;
}

.file-list.view-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.file-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.file-list.view-list .file-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-list.view-grid .file-item {
    text-align: center;
    padding: 20px;
}

.file-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
}

.file-item.selected {
    border-color: #007bff;
    background: #e3f2fd;
}

.file-icon {
    font-size: 24px;
    color: #6c757d;
}

.file-list.view-grid .file-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.file-icon.folder {
    color: #ffc107;
}

.file-icon.pdf {
    color: #dc3545;
}

.file-icon.doc,
.file-icon.docx {
    color: #007bff;
}

.file-icon.xls,
.file-icon.xlsx {
    color: #28a745;
}

.file-icon.ppt,
.file-icon.pptx {
    color: #fd7e14;
}

.file-icon.image {
    color: #6f42c1;
}

.file-name {
    font-weight: 500;
    color: #495057;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-list.view-grid .file-name {
    white-space: normal;
    overflow: visible;
}

.file-meta {
    font-size: 12px;
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.file-list.view-list .file-actions {
    margin-left: auto;
}

.favorite-marker,
.shared-marker {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ffc107;
    font-size: 12px;
}

.shared-marker {
    color: #17a2b8;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #495057;
    margin-bottom: 10px;
}

/* Context Menu */
.context-menu {
    position: fixed;
    z-index: 1000;
}

.context-menu .dropdown-menu {
    display: block;
    position: static;
    margin: 0;
    border: 1px solid rgba(0,0,0,0.15);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.context-menu .dropdown-item {
    padding: 8px 15px;
    font-size: 14px;
}

.context-menu .dropdown-item i {
    width: 16px;
    margin-right: 8px;
    text-align: center;
}

/* Modals */
.modal-content {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
}

.modal-title {
    font-weight: 500;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e0e0e0;
    padding: 15px 20px;
}

/* Dropzone */
.dropzone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropzone:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.dropzone.dz-drag-hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.dz-message {
    color: #6c757d;
}

.dz-message i {
    color: #adb5bd;
}

/* Upload Progress */
.upload-progress {
    margin-top: 20px;
}

/* Version History */
.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.version-item:last-child {
    border-bottom: none;
}

.version-info {
    flex: 1;
}

.version-info strong {
    display: block;
    margin-bottom: 5px;
}

.version-actions {
    display: flex;
    gap: 10px;
}

/* Comments Sidebar */
.comments-sidebar {
    width: 0;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow: hidden;
}

.comments-sidebar.active {
    width: 300px;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.comments-input {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}

.comment-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.4;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        top: 60px;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .file-manager-container {
        flex-direction: column;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .file-list.view-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print Styles */
@media print {
    .sidebar,
    .content-header,
    .search-container,
    .file-actions,
    .context-menu {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
}
