.dlux-file-tool-library {
    background: rgba(var(--primal-rgb, 13, 110, 253), 0.12);
    color: var(--primal_dark, #0d6efd);
}

.dlux-file-field--asset {
    position: relative;
}

.dlux-file-field--asset.is-library-open {
    z-index: 20;
}

.dlux-file-library {
    position: absolute;
    inset-block-start: calc(100% + 0.45rem);
    inset-inline: 0;
    z-index: 25;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(var(--primal-rgb, 13, 110, 253), 0.18);
    border-radius: 1rem;
    background: var(--bs-body-bg, #fff);
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.18);
}

.dlux-file-library__search {
    position: relative;
    margin-bottom: 0.65rem;
}

.dlux-file-library__search > i {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.8rem;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
}

/* `.glass-input` sets `padding: 0.4rem 0.8rem !important` globally, so the room
   for the icon has to be important too or the icon sits on top of the text — in
   both directions, since the icon is inline-start anchored. */
.dlux-file-library__search input {
    padding-inline-start: 2.25rem !important;
}

.dlux-file-library__grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
    max-height: 15rem;
    overflow: auto;
}

.dlux-file-library__option {
    align-items: center;
    background: var(--bs-body-bg);
    border: 1px solid var(--dlux-border, rgba(127, 127, 127, 0.25));
    border-radius: 0.8rem;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 5.5rem;
    padding: 0.45rem;
}

.dlux-file-library__option:hover,
.dlux-file-library__option:focus-visible,
.dlux-file-library__option.is-selected {
    border-color: var(--primal, #2363c3);
    box-shadow: 0 0 0 0.15rem color-mix(in srgb, var(--primal, #2363c3) 20%, transparent);
}

.dlux-file-library__option img,
.dlux-file-library__option > i {
    height: 3rem;
    object-fit: contain;
    width: 100%;
}

.dlux-file-library__option > i {
    font-size: 1.9rem;
}

.dlux-file-library__option span {
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}
