/* Custom Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border-radius: 10px;
    border: none;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

.btn-primary {
    background-color: #4285f4;
    border-color: #4285f4;
}

.btn-primary:hover {
    background-color: #3367d6;
    border-color: #3367d6;
}

.navbar-brand {
    font-weight: 600;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #5f6368;
}

.table td {
    vertical-align: middle;
}

.badge {
    font-weight: 500;
}

.progress {
    border-radius: 4px;
}

.list-group-item {
    border: none;
    padding: 12px 16px;
}

.list-group-item.active {
    background-color: #4285f4;
    border-color: #4285f4;
}

/* File icons */
.fa-file-pdf { color: #db4437; }
.fa-file-word { color: #4285f4; }
.fa-file-excel { color: #0f9d58; }
.fa-file-image { color: #f4b400; }
.fa-file-alt { color: #5f6368; }

/* ============================================
PREVIEW STYLES
============================================ */

/* Preview Modal */
.preview-image-container {
    max-height: 70vh;
    overflow: auto;
    text-align: center;
}

.preview-image {
    max-height: 70vh;
    max-width: 100%;
    object-fit: contain;
}

.preview-video-container {
    max-height: 70vh;
    background: #000;
    border-radius: 5px;
    overflow: hidden;
}

.preview-video {
    max-height: 70vh;
    background: #000;
    width: 100%;
}

.preview-audio-container {
    max-width: 500px;
    margin: 0 auto;
}

.preview-audio {
    width: 100%;
}

.preview-text {
    max-height: 60vh;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
    line-height: 1.5;
}

.preview-iframe {
    width: 100%;
    height: 70vh;
    border: none;
    border-radius: 5px;
}

/* Toast Notifications */
.toast-container {
    z-index: 9999;
}

.toast {
    min-width: 250px;
    max-width: 350px;
}

/* Responsive Preview */
@media (max-width: 768px) {
    .preview-image {
        max-height: 50vh;
    }
    
    .preview-video-container {
        max-height: 50vh;
    }
    
    .preview-text {
        max-height: 50vh;
        font-size: 12px;
        padding: 10px;
    }
    
    .preview-iframe {
        height: 50vh;
    }
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 4px 0;
    min-width: 200px;
    z-index: 10000;
    display: none;
    font-size: 14px;
}

.context-menu-visible {
    display: block !important;
}

.context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

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

.context-menu-item.context-menu-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.context-menu-item.context-menu-disabled:hover {
    background-color: transparent;
}

.context-menu-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 4px 0;
}

/* Selection Styles */
.file-item.selected {
    background-color: rgba(33, 150, 243, 0.1) !important;
    border: 2px solid #2196f3 !important;
    border-radius: 8px;
    transform: scale(1.02);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.file-item.cut-marked {
    opacity: 0.6;
    border: 2px dashed #ff5722 !important;
    border-radius: 8px;
}

/* Context Menu */
.context-menu {
    display: none;
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    min-width: 220px;
    max-width: 300px;
    padding: 8px 0;
    animation: fadeIn 0.15s ease-out;
}

.context-menu-visible {
    display: block !important;
}

.context-menu-item {
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    font-size: 14px;
    color: #333;
}

.context-menu-item:hover {
    background-color: #f5f5f5;
    color: #2196f3;
}

.context-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.context-menu-divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
}

/* Toast notifications */
.custom-toast {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    min-width: 300px !important;
    animation: slideInRight 0.3s ease-out !important;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Rename input */
.rename-input {
    position: absolute;
    z-index: 9999;
    background: white !important;
    border: 2px solid #2196f3 !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3) !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
}

/* Properties modal */
.properties-container {
    max-height: 400px;
    overflow-y: auto;
}

.property-group {
    margin-bottom: 20px;
}

.property-title {
    color: #495057;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* Current folder highlight */
.current-folder {
    background-color: rgba(33, 150, 243, 0.1) !important;
}

/* File actions hover */
.file-actions .btn:hover {
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* Folder tree chevron rotation */
.tree-toggle .fa-chevron-right.rotated {
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

/* Current folder highlight */
.current-folder {
    background-color: rgba(33, 150, 243, 0.1) !important;
    border-left: 3px solid #2196f3 !important;
    font-weight: 600;
}

/* Folder open state */
.folder-open > .folder-tree-children {
    display: block !important;
}