/* File Manager Styles - Dark Theme */

/* Download Progress Overlay */
.download-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.download-progress-container {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px;
    min-width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.download-progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.download-progress-icon {
    font-size: 32px;
    animation: download-spin 2s linear infinite;
}

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

.download-progress-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.download-progress-filename {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
    word-break: break-all;
}

.download-progress-bar-container {
    background: #2a2a2a;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.download-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00a8ff, #0066ff);
    transition: width 0.3s ease;
    border-radius: 8px;
}

.download-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #aaa;
    font-size: 13px;
}

.download-progress-percentage {
    color: #00a8ff;
    font-weight: 600;
    font-size: 16px;
}

.download-progress-details {
    display: flex;
    gap: 15px;
}

.download-progress-speed,
.download-progress-size,
.download-progress-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 768px) {
    .download-progress-container {
        min-width: 90%;
        padding: 20px;
    }
    
    .download-progress-details {
        flex-direction: column;
        gap: 8px;
    }
}

.file-browser {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    background: #1a1a2e;
}

/* Row 1: Breadcrumb */
.fm-breadcrumb-row {
    background: #16213e;
    padding: 1px 1px;
    border-bottom: 1px solid #0f3460;
}

.breadcrumb-path {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-wrap: wrap;
    font-size: 9px;
}

.breadcrumb-item {
    color: #94a3b8;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.breadcrumb-item:hover:not(.active) {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.breadcrumb-item.active {
    color: #ff9800;
    font-weight: 600;
}

.breadcrumb-item::after {
    content: '/';
    margin-left: 5px;
    color: #475569;
}

.breadcrumb-item:last-child::after {
    display: none;
}

/* Row 2: Navigation */
.fm-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 5px;
    background: #0f3460;
    border-bottom: 1px solid #16213e;
}

.fm-nav-left,
.fm-nav-right {
    display: flex;
    gap: 4px;
}

.fm-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 3px 3px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.fm-icon-btn:hover:not(:disabled) {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.4);
    color: #ff9800;
}

.fm-icon-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Row 3: Toolbar */
.fm-toolbar-row {
    display: flex;
    gap: 6px;
    padding: 2px 5px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.fm-tool-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    white-space: nowrap;
}

.fm-tool-btn:hover {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.4);
    color: #ff9800;
}

.fm-tool-btn.active {
    background: rgba(255, 152, 0, 0.3);
    border-color: rgba(255, 152, 0, 0.5);
    color: #ff9800;
}

/* Sort Dropdown */
.fm-sort-dropdown {
    position: relative;
}

.fm-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    background: #0f3460;
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 120px;
}

.fm-dropdown-menu.show {
    display: block;
}

.fm-dropdown-item {
    display: block;
    padding: 8px 12px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
}

.fm-dropdown-item:hover {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.fm-dropdown-item.active {
    background: rgba(255, 152, 0, 0.3);
    color: #ff9800;
    font-weight: 600;
}

/* File List */
.file-list {
    flex: 1;
    overflow-y: auto;
    background: #1a1a2e;
    padding: 0px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1px 1px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 3px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.file-item:hover {
    background: rgba(255, 152, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.3);
}

.file-item.selected {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.4);
}

.file-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.file-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}

.file-actions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    gap: 3px;
    background: linear-gradient(to right, transparent, #1a1a2e 20%, #1a1a2e);
    padding-left: 20px;
    z-index: 10;
}

.file-item:hover .file-actions {
    display: flex;
}

/* Mobile toggle button */
.file-actions-toggle {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: #ff9800;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    z-index: 5;
}

.file-actions-toggle:active {
    background: rgba(255, 152, 0, 0.4);
    transform: translateY(-50%) scale(0.95);
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Hide hover effect on mobile */
    .file-item:hover .file-actions {
        display: none;
    }
    
    /* Show toggle button on mobile */
    .file-actions-toggle {
        display: block;
    }
    
    /* Show actions when active */
    .file-item.actions-visible .file-actions {
        display: flex;
    }
    
    /* Hide toggle when actions are visible */
    .file-item.actions-visible .file-actions-toggle {
        display: none;
    }
    
    /* Better spacing for mobile */
    .file-actions {
        gap: 6px;
    }
    
    .file-action-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    /* Hide scrollbar on mobile */
    .file-list::-webkit-scrollbar {
        display: none;
        width: 0;
    }
    
    .file-list {
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    /* Hide scrollbar in modal body on mobile */
    .fm-modal-body::-webkit-scrollbar {
        display: none;
        width: 0;
    }
    
    .fm-modal-body {
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
}

.file-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.file-action-btn:hover {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.4);
    color: #ff9800;
}

/* Selection Toolbar */
#selection-toolbar {
    background: rgba(0, 0, 0, 0.872);
    padding: 3px 3px;
    border-bottom: 1px solid rgba(255, 152, 0, 0.4);
    display: none;
}

#selection-toolbar.show {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#selection-count {
    color: #ff9800;
    font-size: 12px;
    font-weight: 600;
}

.selection-actions {
    display: flex;
    gap: 4px;
}

.selection-actions button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    padding: 3px 3px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 23px;
    transition: all 0.2s;
}

.selection-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Clipboard Indicator */
#clipboard-indicator {
    background: rgba(33, 150, 243, 0.2);
    padding: 6px 12px;
    border-bottom: 1px solid rgba(33, 150, 243, 0.4);
    display: none;
    align-items: center;
    justify-content: space-between;
}

#clipboard-text {
    color: #2196f3;
    font-size: 11px;
    font-weight: 600;
}

#paste-btn,
#clear-clipboard-btn {
    background: rgba(0, 255, 8, 0.235);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #0265e8;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s;
}

#paste-btn:hover,
#clear-clipboard-btn:hover {
    background: rgba(0, 255, 21, 0.879);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Properties Modal */
.fm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.fm-modal {
    background: #16213e;
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.fm-modal-header {
    background: #0f3460;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 152, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fm-modal-title {
    color: #ff9800;
    font-size: 14px;
    font-weight: 600;
}

.fm-modal-close {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.fm-modal-close:hover {
    background: rgba(239, 68, 68, 0.3);
}

.fm-modal-body {
    padding: 16px;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.fm-modal-body::-webkit-scrollbar {
    width: 8px;
}

.fm-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.fm-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 152, 0, 0.4);
    border-radius: 4px;
}

.fm-prop-table {
    width: 100%;
    border-collapse: collapse;
}

.fm-prop-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fm-prop-table td {
    padding: 10px 8px;
    font-size: 12px;
}

.fm-prop-table td:first-child {
    color: #94a3b8;
    font-weight: 600;
    width: 100px;
}

.fm-prop-table td:last-child {
    color: #e2e8f0;
    word-break: break-all;
}

.fm-modal-footer {
    background: #0f3460;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.fm-btn {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
}

.fm-btn-primary {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.4);
    color: #2196f3;
}

.fm-btn-primary:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.6);
}

.fm-btn-warning {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.4);
    color: #ff9800;
}

.fm-btn-warning:hover {
    background: rgba(255, 152, 0, 0.3);
    border-color: rgba(255, 152, 0, 0.6);
}

.fm-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #94a3b8;
}

.fm-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.fm-btn-info {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
    color: #4caf50;
}

.fm-btn-info:hover {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.6);
}

/* Chmod Grid */
.chmod-grid {
    display: grid;
    grid-template-columns: auto repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.chmod-header {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    font-weight: 600;
}

.chmod-row-label {
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.chmod-checkbox-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chmod-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff9800;
}

.chmod-result {
    text-align: center;
    margin-top: 12px;
    padding: 8px;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 4px;
    color: #ff9800;
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
}

/* Scrollbar */
.file-list::-webkit-scrollbar {
    width: 10px;
}

.file-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.file-list::-webkit-scrollbar-thumb {
    background: rgba(255, 152, 0, 0.4);
    border-radius: 5px;
}

.file-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 152, 0, 0.6);
}

