/**
 * DocuFlow File Explorer Styles
 * Corporate professional design
 */

/* ========== File Explorer Container ========== */
.file-explorer {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.file-explorer.visible {
    right: 0;
}

/* ========== Header ========== */
.file-explorer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--primary);
    color: white;
    border-bottom: 1px solid var(--border-color);
}

.file-explorer-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.125rem;
    font-weight: 600;
}

.file-explorer-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.file-explorer-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== Toolbar ========== */
.file-explorer-toolbar {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.fe-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.fe-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.fe-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fe-path-display {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    overflow: hidden;
}

.fe-path-display span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== Content ========== */
.file-explorer-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-primary);
}

.file-list {
    min-height: 100%;
}

/* ========== File Items ========== */
.file-item {
    display: grid;
    grid-template-columns: 32px 32px 1fr 80px 120px;
    gap: var(--spacing-sm);
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease;
}

.file-item:hover {
    background: var(--bg-secondary);
}

.file-item.selected {
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--accent);
}

.file-item-checkbox input {
    cursor: pointer;
}

.file-item-icon {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.file-item-icon .fa-folder {
    color: var(--accent);
}

.file-item-icon .fa-file-pdf {
    color: #e74c3c;
}

.file-item-icon .fa-file-word {
    color: #2b579a;
}

.file-item-icon .fa-file-excel {
    color: #1d7145;
}

.file-item-icon .fa-file-image {
    color: #f39c12;
}

.file-item-icon .fa-file-code {
    color: #9b59b6;
}

.file-item-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-align: right;
}

.file-item-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ========== Loading / Empty States ========== */
.file-list-loading,
.file-list-empty,
.file-list-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: 4rem var(--spacing-md);
    color: var(--text-secondary);
}

.file-list-loading i,
.file-list-empty i,
.file-list-error i {
    font-size: 3rem;
}

.file-list-error {
    color: var(--error);
}

/* ========== Footer ========== */
.file-explorer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.fe-selected-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.fe-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.fe-action-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.fe-btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.fe-btn-secondary:hover {
    background: var(--bg-secondary);
}

.fe-btn-primary {
    background: var(--accent);
    color: white;
}

.fe-btn-primary:hover {
    background: var(--primary);
}

.fe-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .file-explorer {
        width: 100%;
        right: -100%;
    }
    
    .file-item {
        grid-template-columns: 32px 32px 1fr 60px;
    }
    
    .file-item-date {
        display: none;
    }
}

/* ========== Scrollbar ========== */
/* Scrollbar styles moved to scrollbars.css (Phase 15) */

