/* ========================= FILE CARDS ========================= */
.file-cards {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

    .file-cards[hidden] {
        display: none;
    }

.file-card {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    max-width: min(100%, 420px);
    min-width: 0;
    padding: .45rem .7rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .55rem;
    color: var(--bs-body-color);
    background: color-mix(in srgb, var(--bs-secondary-bg) 60%, transparent);
    text-decoration: none;
}

    .file-card > span,
    .file-card > a,
    .file-card__name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .file-card > .fa-paperclip {
        color: var(--bs-primary);
    }

    .file-card > .fa-download {
        color: var(--bs-secondary-color);
    }

    .file-card:hover {
        border-color: var(--bs-primary);
        color: var(--bs-body-color);
    }

/* ========================= CARDS INSIDE PANELS ========================= */
.pane .file-card,
.itsm-ticket-pane .file-card {
    background: var(--bs-body-bg);
}

.file-card--editable {
    width: fit-content;
}

.file-cards > .file-card:only-child,
[data-file-layout="column"] .file-card {
    width: 100%;
    max-width: none;
}

.file-card > .file-card__name {
    color: var(--bs-body-color);
    text-decoration: none;
}

    .file-card--editable > a,
    .file-card__name {
        flex: 1;
    }

    .file-card--editable.is-removed > a {
        opacity: .55;
        text-decoration: line-through;
    }

.file-card__content {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.file-card > button,
.file-card > form,
.file-card > .btn-group {
    flex-shrink: 0;
}

/* ========================= FILE PICKER ========================= */
.file-picker {
    flex: 1;
    min-width: 0;
}

.file-drop-active {
    outline: 2px dashed var(--bs-primary);
    outline-offset: 4px;
    border-radius: .55rem;
    background: color-mix(in srgb, var(--bs-primary) 8%, transparent);
}

    .file-picker > .file-cards:not([hidden]) {
        margin-bottom: .5rem;
    }

    .file-picker:has(> input:focus-visible) > button {
        outline: 2px solid var(--bs-primary);
        outline-offset: 2px;
    }
