.fulltext-search-dialog--anchor {
    anchor-name: --fulltext-search-anchor;
}

.fulltext-search-dialog--container {
    z-index: 1000;
    pointer-events: initial;
    --selected-bg-color: var(--theme-primary-light);
    --selected-fg-color: var(--theme-primary-light-contrast);
    margin: -1rem;
    padding: 1rem;
    position: fixed;
    position-anchor: --fulltext-search-anchor;
    top: anchor(--anchor-document-toolbar bottom);
    left: anchor(--fulltext-search-anchor left);
    right: anchor(--anchor-document-toolbar right);
    justify-self: left;
    position-try-fallbacks: --fulltext-search-container-left, --fulltext-search-container-right, --fulltext-search-container-try;
}

.fulltext-search-dialog--container card-view {
    padding: 0.5rem;
    max-height: 50vh;
}

.fulltext-search-dialog--container .virtual-scroll {
    scrollbar-gutter: stable;
}

.fulltext-search-dialog--container .virtual-scroll .table-row {
    padding: 0 0.5rem;
}

.fulltext-search--resizeable {
    resize: vertical;
    overflow: hidden;
    min-height: 1rem;
    max-height: fit-content;
}

.fulltext-search--counter {
    min-width: 5rem;
    text-align: right;
    display: flex;
    justify-content: right;
}

.fulltext-search--results {
    contain: content;
    isolation: isolate;
    mix-blend-mode: darken;
}

.fulltext-search--results--result {
    fill: var(--theme-accent);
    fill-opacity: 0.5;
    rx: 2px;
    ry: 2px;
    contain: content;
}

.fulltext-search--results--result__selected {
    fill: var(--theme-accent);
    fill-opacity: 0.7;
    outline: 3px solid var(--theme-accent-dark);
    outline-offset: 4px;
    border-radius: 2px;
}

@position-try --fulltext-search-container-left {
    top: anchor(--anchor-document-toolbar bottom);
    left: anchor(--fulltext-search-anchor left);
    right: anchor(--anchor-document-toolbar right);
    justify-self: left;
}

@position-try --fulltext-search-container-right {
    top: anchor(--anchor-document-toolbar bottom);
    left: anchor(--anchor-document-toolbar left);
    right: anchor(--fulltext-search-anchor right);
    justify-self: right;
}

@position-try --fulltext-search-container-try {
    top: anchor(--anchor-document-toolbar bottom);
    left: anchor(--anchor-document-toolbar left);
    right: anchor(--anchor-document-toolbar right);
    justify-self: left;
}