/* Smilies + Formatierung 1.1.1.110 – Inline-Darstellung + :-Vorschlagsliste */

/* Im Text gerenderte Smilies */
img.smiley {
    display: inline-block;
    height: 1.35em;
    width: auto;
    vertical-align: -0.28em;
    margin: 0 1px;
    user-select: none;
}

/* Vorschlagsliste beim Tippen von ":" */
.smiley-ac {
    position: absolute;
    z-index: 1000;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e3e3e3);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    font-size: 14px;
}
.smiley-ac[hidden] { display: none; }

.smiley-ac-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
}
.smiley-ac-item.active,
.smiley-ac-item:hover { background: rgba(0, 0, 0, .08); }
.smiley-ac-item img { height: 20px; width: auto; }

/* kleines Kästchen für Formatier-Befehle (B / i / U / A) */
.smiley-ac-cmd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .08);
    font-size: 13px;
    line-height: 1;
}

@media (prefers-color-scheme: dark) {
    .smiley-ac { background: var(--card-bg, #1c1f24); border-color: var(--border-color, #2c313a); }
    .smiley-ac-item.active,
    .smiley-ac-item:hover { background: rgba(255, 255, 255, .1); }
    .smiley-ac-cmd { background: rgba(255, 255, 255, .14); }
}

/* Eigener Hover-Tooltip für Smilies (Stil wie encounts .cm-tooltip) */
.smiley-tip {
    position: fixed;
    z-index: 1200;
    display: none;
    pointer-events: none;
    transform: translate(-50%, -100%);
    background: #1f2330;
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 7px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}
