.files {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

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

.files-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-text {
    padding: 4px 2px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.btn-text:hover {
    color: var(--text-primary);
}

.file-list {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.file-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
}

.file-row.just-done {
    animation: rowDone 700ms ease-out;
}

.file-row.just-done .btn-download {
    animation: pop 460ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.file-row:first-child {
    padding-top: 14px;
}

.file-row:last-child {
    padding-bottom: 14px;
}

.file-row + .file-row {
    padding-top: 12px;
}

.file-row + .file-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--divider);
}

.file-row::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 400%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg,
        rgba(168, 85, 247, 0) 0%,
        rgba(168, 85, 247, 0.25) 47.3%,
        rgba(168, 85, 247, 0) 66.7%,
        rgba(168, 85, 247, 0) 100%) 0 0 / 37.5% 100% repeat-x;
    opacity: 0;
    transition: opacity 500ms ease;
    animation: row-sweep 2s linear infinite paused;
}

.file-row.is-busy::after {
    opacity: 1;
    animation-play-state: running;
}

.file-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-name {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 13px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta .is-success {
    color: var(--success);
}

.file-meta .is-warning {
    color: var(--warning);
}

.file-row.is-cloud .file-meta {
    color: var(--danger-text);
}

.file-meta .file-local {
    color: var(--accent-soft);
}

.file-row.is-error .file-meta {
    color: var(--error);
    white-space: normal;
}

.file-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.btn-download.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}
