.forum-rich-editor {
    border: 1px solid #ced8e5;
    border-radius: .9rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92) 0%, rgba(248, 250, 252, .96) 100%);
    overflow: hidden;
    box-shadow: 0 .35rem .9rem rgba(15, 23, 42, .05);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.forum-rich-editor.is-dragover {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}

.forum-rich-editor:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .22rem rgba(13, 110, 253, .12), 0 .55rem 1.1rem rgba(15, 23, 42, .08);
}

.forum-rich-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    padding: .75rem .85rem;
    border-bottom: 1px solid #dbe4ef;
    position: relative;
    background: linear-gradient(180deg, rgba(250, 252, 255, .98) 0%, rgba(241, 245, 249, .96) 100%);
}

.forum-rich-editor__toolbar .btn-group {
    display: inline-flex;
    flex-wrap: wrap;
}

.forum-rich-editor__toolbar .btn {
    min-width: 2.4rem;
    border-radius: .7rem;
    font-weight: 600;
}

.forum-rich-editor__color {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .6rem;
    border: 1px solid #d4dce6;
    border-radius: .7rem;
    background: rgba(255, 255, 255, .85);
    font-size: .85rem;
}

.forum-rich-editor__color input {
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

textarea.forum-rich-editor__textarea {
    border: 0;
    border-radius: 0;
    background: transparent;
    min-height: 9rem;
    resize: vertical;
    padding: .95rem .95rem 1rem;
    color: #0f172a;
    line-height: 1.6;
}

textarea.forum-rich-editor__textarea:focus {
    box-shadow: none;
}

.forum-rich-editor__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem 1rem;
    padding: .7rem .85rem .8rem;
    border-top: 1px solid #e3eaf2;
    background: rgba(248, 250, 252, .92);
}

.forum-rich-editor__hint {
    flex: 1 1 320px;
}

.forum-rich-editor__meta {
    display: inline-flex;
    align-items: center;
    gap: .9rem;
    white-space: nowrap;
}

.forum-rich-editor__counter {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.forum-rich-editor__status {
    min-width: 10rem;
    text-align: right;
}

.forum-rich-editor__status.is-error {
    color: var(--bs-danger);
}

.forum-rich-editor__status.is-success {
    color: var(--bs-success);
}

.forum-rich-editor__status.is-info {
    color: var(--bs-info);
}

.forum-rich-editor__file-input {
    display: none;
}

.thread-view .post .content {
    white-space: normal;
    line-height: 1.55;
}

.thread-view .post .content .forum-rich-image,
.thread-view .post .content .forum-rich-video,
.thread-view .post .content .forum-rich-embed {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: .75rem 0;
    border-radius: .6rem;
    background: #000;
}

.thread-view .post .content .forum-rich-image {
    width: auto;
    height: auto;
    max-height: 40rem;
    object-fit: contain;
    background: transparent;
}

.thread-view .post .content .forum-rich-video,
.thread-view .post .content .forum-rich-embed {
    aspect-ratio: 16 / 9;
}

.thread-view .post .content .forum-rich-embed {
    border: 0;
}

.thread-view .post .content .forum-rich-quote {
    margin: .75rem 0;
    padding: .6rem .9rem;
    border-left: .25rem solid #7c8aa5;
    background: rgba(148, 163, 184, .12);
    border-radius: .65rem;
    color: #334155;
}

.thread-view .post .content a {
    word-break: break-word;
}

.forum-rich-emoticon-dropdown {
    display: none;
    position: fixed;
    z-index: 1050;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    flex-wrap: wrap;
    gap: 2px;
    max-width: 260px;
    left: 0;
}

.forum-rich-emoticon-item:hover {
    border-color: #adb5bd !important;
    background: #f8f9fa !important;
}

@media (max-width: 768px) {
    .forum-rich-editor__toolbar {
        padding: .55rem .6rem;
    }

    .forum-rich-editor__footer {
        padding: .5rem .6rem .65rem;
    }

    .forum-rich-editor__meta {
        width: 100%;
        justify-content: space-between;
    }

    .forum-rich-editor__status {
        min-width: 0;
        text-align: left;
    }
}
