.file-selector {
    width: 90%;
    max-width: 600px;
    height: 80vh;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.file-selector-header {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 2px solid var(--border-color);
}

[dir="rtl"] .file-selector-header {
    direction: ltr !important;
}

.current-path .separator {
    color: var(--text-muted);
    padding: 0 4px;
}

.file-selector-back-button {
    background: none;
    border: none;
    fill: var(--text-muted);
    user-select: none;
}

.current-path {
    flex-grow: 1;
    font-size: 16px;
    overflow: scroll;
    white-space: nowrap;
}

.close-selector {
    position: static !important;
    background: none;
    border: none;
    font-size: 20px;
    color: #ccc;
    padding: 0 5px;
    user-select: none;
}

.file-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.file-list.switching {
    transform: scale(0.95);
    opacity: 0;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    user-select: none;

    svg {
        flex-shrink: 0;
        margin-right: 10px;
        fill: var(--text-muted);
    }
}

[dir="rtl"] .file-item svg {
    margin-right: unset;
    margin-left: 10px;
}

.file-item span {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
