/* ── Глобальный оверлей передачи файлов: модал входящего и список активных ── */

.ftx-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 10500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ftx-modal {
    background: var(--ctx-bg, #2b2d31);
    color: var(--text-primary, #fff);
    padding: 20px 22px;
    border-radius: 12px;
    min-width: 360px;
    max-width: 480px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
    font-size: 14px;
}

.ftx-modal-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
}

.ftx-modal-row {
    margin-bottom: 6px;
    word-break: break-word;
}

.ftx-modal-path {
    color: var(--text-secondary, #b5bac1);
    font-size: 12px;
    margin-top: 6px;
}

.ftx-modal-hint {
    color: var(--text-secondary, #b5bac1);
    font-size: 12px;
    margin: 8px 0 4px;
}

.ftx-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.ftx-btn {
    padding: 7px 16px;
    border-radius: 6px;
    border: 1px solid var(--btn-border, #4f545c);
    background: transparent;
    color: var(--text-primary, #fff);
    font-size: 13px;
    cursor: pointer;
}

.ftx-btn:hover { background: rgba(255, 255, 255, .06); }

.ftx-btn--primary {
    background: var(--accent, #5865f2);
    border-color: var(--accent, #5865f2);
    color: #fff;
}

.ftx-btn--primary:hover { filter: brightness(1.1); }

/* ── Список активных передач — закреплён снизу справа ── */
.ftx-list {
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 9500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 340px;
    width: 100%;
}

.ftx-item {
    background: var(--ctx-bg, #2b2d31);
    color: var(--text-primary, #fff);
    border: 1px solid var(--ctx-border, #1f2125);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
    font-size: 12px;
}

.ftx-item-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.ftx-item-dir {
    font-weight: 700;
    color: var(--accent, #5865f2);
}

.ftx-item-name {
    flex: 1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ftx-item-close {
    background: transparent;
    border: none;
    color: var(--text-secondary, #b5bac1);
    cursor: pointer;
    font-size: 13px;
    padding: 0 2px;
}

.ftx-item-close:hover { color: #fff; }

.ftx-item-meta {
    color: var(--text-secondary, #b5bac1);
    margin-bottom: 4px;
    font-size: 11px;
}

.ftx-item-mode {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(88, 101, 242, .25);
    color: #a8b2ff;
    font-weight: 600;
    font-size: 10px;
    margin-left: 4px;
}

.pm-attach-menu {
    min-width: 240px;
    max-width: 320px;
    z-index: 10000;
}

.ftx-list-header {
    background: var(--ctx-bg, #2b2d31);
    border: 1px solid var(--ctx-border, #1f2125);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--text-secondary, #b5bac1);
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ftx-item-bar {
    height: 4px;
    background: var(--ctx-border, #1f2125);
    border-radius: 2px;
    overflow: hidden;
    margin: 4px 0;
}

.ftx-item-bar-fill {
    height: 100%;
    background: var(--accent, #5865f2);
    transition: width .15s ease-out;
}

.ftx-item-status { color: var(--text-secondary, #b5bac1); font-size: 11px; }

.ftx-item--completed .ftx-item-bar-fill { background: #43b581; }
.ftx-item--failed    .ftx-item-bar-fill { background: #ed4245; }
.ftx-item--rejected  .ftx-item-bar-fill { background: #ed4245; }
.ftx-item--cancelled .ftx-item-bar-fill { background: #faa61a; }

.ftx-link {
    background: none;
    border: none;
    color: var(--accent, #5865f2);
    cursor: pointer;
    padding: 0;
    margin-left: 6px;
    font-size: 11px;
    text-decoration: underline;
}
