.ql-mention-list-container {
    background-color: var(--mud-palette-surface);
    border-radius: 4px;
    box-shadow: var(--mud-elevation-8);
    overflow: auto;
    width: 270px;
    max-height: 700px;
    z-index: 9001
}

.ql-mention-loading {
    font-size: 16px;
    line-height: 44px;
    padding: 0 20px;
    vertical-align: middle
}

.ql-mention-list {
    list-style: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
    padding-bottom: 8px;
}

.ql-mention-list-item {
    cursor: pointer;
    font-size: 16px;
    padding: 4px 20px;
}

    .ql-mention-list-item.disabled {
        cursor: auto;
        padding:0px;
    }

    .ql-mention-list-item.selected {
        background-color: var(--mud-palette-action-default-hover);
        text-decoration: none
    }

    .ql-mention-list-item.selected {
        background-color: var(--t-color-10a);
        color: var(--mud-palette-primary);
    }

.ql-mention-user {
    display: flex;
    flex-direction: column;
}

.ql-mention-user__name {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ql-mention-user__sub {
    font-size: 14px;
    font-weight: 400;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ql-mention-list .selected .ql-mention-user__name {
    color: var(--mud-palette-primary);
}

.ql-mention-group {
    display: flex;
    align-items: center; /* centers the rule vertically */
    gap: .5rem; /* space between text and lines */
    padding: 3px 12px;
    font: 600 11px/1.4 system-ui; /* small, bold-ish label */
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary); /* tweak to taste */
    user-select: none;
    cursor: default;
}

    /* the horizontal rule on both sides of the label */
    .ql-mention-group::before,
    .ql-mention-group::after {
        content: "";
        flex: 1 1 auto; /* stretch to edges */
        border-top: 1px solid var(--mud-palette-lines-inputs);
    }

.mention {
    background-color: var(--t-color-50a);
    border-radius: 6px;
    height: 24px;
    margin-right: 2px;
    padding: 1px 0;
    user-select: all;
    cursor: pointer;
    width: 65px
}

.mention:hover {
    background-color: var(--t-color-75a);
}

    .mention > span {
        margin: 0 3px
    }

.html-editor .ql-toolbar .ql-picker.ql-expanded .ql-picker-options {
    height: 160px !important;
    overflow-y: scroll;
}

.html-content-wrapper {
    min-height: 174px;
}

.html-content-wrapper .ql-editor.ql-blank::before {
    color: var(--mud-palette-text-secondary);
}

.is-resizable {
    scrollbar-gutter: stable;
}

.t-activity-description-field .ql-container {
    height: 0;
}

.t-activity-description-field .html-content-wrapper.ql-snow .ql-editor {
    --editor-ring: var(--mud-palette-lines-inputs);
    margin-top: 2px;
    height: 0;
    border-radius: 4px;
    user-select: text;
    border: var(--reserve) solid transparent; /* fixed layout (no wiggle) */
    box-shadow: 0 0 0 1px var(--editor-ring);
}

.html-editor {

    /* colors you already had */
    --editor-ring: var(--mud-palette-lines-inputs);
    --editor-ring-hover: var(--mud-palette-action-default);
    --editor-ring-focus: var(--mud-palette-primary);

    /* ring geometry */
    --ring-thickness: 1px; /* default ring */
    --ring-thickness-focus: 2px; /* focused ring */
    --radius: var(--mud-default-borderradius, 8px);

    position: relative;
    border-radius: var(--radius);
    margin-top: 2px;
    border: var(--reserve) solid transparent; /* fixed layout, no wiggle */
    box-shadow: 0 0 0 var(--ring-thickness) var(--editor-ring); /* the visible ring */
    transition: box-shadow 200ms cubic-bezier(0.4,0,0.2,1);
    overflow: visible; /* let the shadow render outside the padding box */
}

    /* keep the inner toolbar/content divider without borders */
    .html-editor .ql-toolbar-host {
        border: 0 !important;
        /* bottom divider line only */
        box-shadow: inset 0 -1px 0 0 var(--editor-ring);
        transition: box-shadow 200ms cubic-bezier(0.4,0,0.2,1);
        border-top-left-radius: calc(var(--radius) - var(--reserve));
        border-top-right-radius: calc(var(--radius) - var(--reserve));
        padding: 8px 0px;
        margin: 0 8px;
    }

    /* no border on the resizable body */
    .html-editor .is-resizable {
        border: 0 !important;
        border-bottom-left-radius: calc(var(--radius) - var(--reserve));
        border-bottom-right-radius: calc(var(--radius) - var(--reserve));
    }

    /* hover color */
    .html-editor:hover,
    .html-editor .ql-editor:hover {
        --editor-ring: var(--editor-ring-hover);
    }

    /* focus state */
    .html-editor:focus-within {
        --editor-ring: var(--editor-ring-focus);
        --ring-thickness: var(--ring-thickness-focus);
    }

/* no flicker while toolbar is focused/open */
@supports selector(:has(*)) {
    .html-editor:has(:is(.ql-editor:focus, .ql-toolbar-host :focus, .ql-toolbar-host :active, .ql-toolbar-host .ql-expanded)) {
        --editor-ring: var(--editor-ring-focus);
        --ring-thickness: var(--ring-thickness-focus);
    }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    .html-editor, .html-editor .ql-toolbar-host {
        transition: none;
    }
}

