/* ---- Mention Autocomplete ---- */

.mention {
    display: inline-flex;
    align-items: baseline;
    cursor: pointer;
    white-space: nowrap;
    font-size: inherit;
    line-height: inherit;
    vertical-align: baseline;
}

.mention:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.mention-icon {
    display: inline-block !important;
    width: 1.1em !important;
    height: 1.1em !important;
    max-width: 1.1em !important;
    object-fit: contain;
    margin: 0 2px 0 0 !important;
    border-radius: 0 !important;
    flex-shrink: 0;
    align-self: center;
    vertical-align: -0.15em;
}

/* Dropdown */
.mention-dropdown {
    position: fixed;
    z-index: 10000;
    background: #1a1b22;
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    max-height: 280px;
    overflow-y: auto;
    min-width: 240px;
    display: none;
}

.mention-dropdown__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.1s;
}

.mention-dropdown__item:hover,
.mention-dropdown__item--active {
    background: rgba(196, 162, 78, 0.12);
}

.mention-dropdown__icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 2px;
}

.mention-dropdown__icon-placeholder {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.mention-dropdown__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
}

.mention-dropdown__type {
    color: #7a7870;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.mention-dropdown__empty {
    padding: 16px;
    text-align: center;
    color: #7a7870;
    font-size: 13px;
}

/* .item-tooltip-Regeln: seit 07.09.2026 zentral in tooltip.css (global geladen) */

/* @ toolbar button */
.ge-toolbar__mention {
    font-weight: 700;
    font-size: 15px;
    color: var(--accent-gold, #c4a24e);
}

.ge-toolbar__automention {
    color: var(--accent-gold, #c4a24e);
}

/* Auto-link review panel (mention-autolink.js) */
.mention-autolink {
    position: fixed;
    z-index: 10001;
    width: min(460px, calc(100vw - 20px));
    max-height: min(480px, calc(100vh - 20px));
    display: flex;
    flex-direction: column;
    background: #13151a;
    border: 1px solid #2a2a35;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    color: #e0ddd5;
    font-size: 13px;
}

.mention-autolink--message {
    width: auto;
    padding: 10px 14px;
    color: #7a7870;
}

.mention-autolink__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #2a2a35;
    cursor: move;
    user-select: none;
    touch-action: none;
}

.mention-autolink--dragging {
    opacity: 0.92;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.mention-autolink__close {
    background: none;
    border: 0;
    color: #7a7870;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.mention-autolink__hint {
    padding: 6px 12px;
    color: #7a7870;
    font-size: 12px;
}

.mention-autolink__list {
    overflow-y: auto;
    padding: 4px 0;
}

.mention-autolink__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
}

.mention-autolink__row:hover {
    background: rgba(196, 162, 78, 0.08);
}

.mention-autolink__row input {
    flex-shrink: 0;
    accent-color: #c4a24e;
}

.mention-autolink__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mention-autolink__name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mention-autolink__ctx {
    color: #7a7870;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mention-autolink__ctx mark {
    background: none;
    color: #e0ddd5;
    font-weight: 600;
}

.mention-autolink__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.mention-autolink__badge {
    color: #d9a441;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mention-autolink__badge--linked {
    color: #6fbf73;
}

.mention-autolink__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #2a2a35;
}

.mention-autolink__foot button {
    background: #1a1b22;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    color: #e0ddd5;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

.mention-autolink__foot button:hover {
    border-color: #c4a24e;
}

.mention-autolink__bulk,
.mention-autolink__actions {
    display: flex;
    gap: 6px;
}

.mention-autolink__foot .mention-autolink__apply {
    background: #c4a24e;
    border-color: #c4a24e;
    color: #0a0a0f;
    font-weight: 600;
}

.mention-autolink__foot .mention-autolink__apply:disabled {
    opacity: 0.4;
    cursor: default;
}

.mention-autolink__pref {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px 10px;
    color: #7a7870;
    font-size: 12px;
    cursor: pointer;
}

#rte-mention-btn {
    font-weight: 700;
    font-size: 15px;
    color: var(--accent-gold, #c4a24e);
}
