/* ============ Files Section ============ */
.files-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.section-title h2 {
    font-size: 20px;
    font-weight: 600;
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

.file-count {
    color: var(--text-muted);
    font-size: 14px;
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    width: 260px;
    font-family: var(--font-mono);
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), width 0.2s var(--ease);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder {
    color: var(--text-subtle);
}

/* Content search bar (banner shown while a content query is active) */
.content-search-bar {
    background: rgba(34, 211, 238, 0.10);
    border: 1px solid var(--accent);
    padding: 10px 16px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-mono);
    box-shadow: 0 0 16px var(--accent-glow);
    animation: fadeInUp 0.25s var(--ease);
}

.file-snippet {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
    background: rgba(34, 211, 238, 0.06);
    border-left: 2px solid var(--accent);
    padding: 6px 10px;
    border-radius: 4px;
    word-break: break-all;
    font-family: var(--font-mono);
}

.file-snippet mark {
    background: rgba(34, 211, 238, 0.3);
    color: var(--accent);
    border-radius: 2px;
    padding: 0 2px;
    font-weight: 600;
}

/* Batch bar */
.batch-bar {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--primary);
    padding: 10px 16px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.batch-buttons {
    display: flex;
    gap: 8px;
}

/* File list */
.file-list {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
    border-left: 2px solid transparent;
    animation: fadeInUp 0.32s var(--ease) both;
}

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

.file-item:hover {
    background: var(--bg-elevated);
    border-left-color: var(--accent);
}

.file-item.selected {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary);
}

.file-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.file-icon {
    font-size: 24px;
    flex-shrink: 0;
}

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

.file-name {
    display: block;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 13px;
}

.file-meta {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: var(--font-mono);
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.loading, .empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state {
    font-size: 15px;
}

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

/* Staggered entrance for list/grid items */
.file-item:nth-child(1), .file-card:nth-child(1) { animation-delay: 0.02s; }
.file-item:nth-child(2), .file-card:nth-child(2) { animation-delay: 0.04s; }
.file-item:nth-child(3), .file-card:nth-child(3) { animation-delay: 0.06s; }
.file-item:nth-child(4), .file-card:nth-child(4) { animation-delay: 0.08s; }
.file-item:nth-child(5), .file-card:nth-child(5) { animation-delay: 0.10s; }
.file-item:nth-child(6), .file-card:nth-child(6) { animation-delay: 0.12s; }
.file-item:nth-child(7), .file-card:nth-child(7) { animation-delay: 0.14s; }
.file-item:nth-child(8), .file-card:nth-child(8) { animation-delay: 0.16s; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.page-info {
    color: var(--text-muted);
    font-size: 14px;
}

