/* LightRP Rich Editor */

.rich-editor-shell {
    background: rgba(7, 10, 18, 0.72);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.editor-topbar {
    min-height: 58px;
    padding: 10px;
    background: rgba(12, 16, 28, 0.96);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.editor-tool,
.editor-mode-btn,
.editor-upload-btn {
    height: 36px;
    min-width: 38px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 9px;
    background: rgba(28, 34, 45, 0.92);
    color: rgba(255,255,255,0.88);
    font-size: 13px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    cursor: pointer;
}

.editor-tool:hover,
.editor-mode-btn:hover,
.editor-upload-btn:hover,
.editor-tool.active,
.editor-mode-btn.active {
    background: rgba(79, 69, 230, 0.92);
    color: white;
    box-shadow: 0 0 18px rgba(79,69,230,0.25);
}

.editor-sep {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.12);
    margin: 0 3px;
}

.editor-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
}

.editor-main.editor-single {
    grid-template-columns: 1fr;
}

.editor-write,
.editor-preview-panel {
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.editor-write {
    border-right: 1px solid rgba(255,255,255,0.10);
}

.editor-hidden-textarea {
    display: none;
}

.editor-input {
    flex: 1;
    width: 100%;
    min-height: 420px;
    border: none;
    border-radius: 0;
    background: rgba(4, 6, 12, 0.80);
    color: white;
    padding: 20px;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 700;
    outline: none;
    resize: vertical;
}

.editor-input::placeholder {
    color: rgba(255,255,255,0.38);
}

.editor-preview-panel {
    background: rgba(9, 13, 22, 0.80);
}

.editor-panel-title {
    height: 42px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.58);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.editor-preview {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    color: rgba(255,255,255,0.88);
    line-height: 1.65;
    font-size: 15px;
}

.editor-status {
    min-height: 36px;
    padding: 9px 14px;
    background: rgba(12, 16, 28, 0.96);
    border-top: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.56);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.editor-dropzone {
    margin: 12px;
    padding: 16px;
    border-radius: 14px;
    border: 1px dashed rgba(255,255,255,0.20);
    background: rgba(255,255,255,0.035);
    color: rgba(255,255,255,0.62);
    text-align: center;
    font-size: 13px;
    font-weight: 900;
}

.editor-dropzone.drag-over {
    border-color: rgba(57,255,85,0.70);
    background: rgba(57,255,85,0.08);
    color: white;
}

.editor-panel {
    position: absolute;
    z-index: 2000;
    width: min(420px, calc(100vw - 30px));
    max-height: 360px;
    overflow-y: auto;
    background: rgba(9, 12, 20, 0.98);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.62);
    padding: 12px;
    display: none;
}

.editor-panel.open {
    display: block;
}

.editor-panel h4 {
    margin: 0 0 10px;
    color: white;
}

.emoji-grid,
.gif-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}

.emoji-item,
.gif-item {
    min-height: 36px;
    border-radius: 9px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.emoji-item:hover,
.gif-item:hover {
    background: rgba(79, 69, 230, 0.70);
}

.gif-grid {
    grid-template-columns: repeat(2, 1fr);
}

.gif-item {
    min-height: 72px;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    padding: 8px;
}

.editor-gif-search {
    margin-bottom: 10px;
}

/* Rendered content styling */
.content-body .forum-image,
.editor-preview .forum-image {
    max-width: 100%;
    border-radius: 14px;
    margin: 10px 0;
    border: 1px solid rgba(255,255,255,0.10);
}

.forum-quote {
    margin: 12px 0;
    padding: 14px 16px;
    border-left: 4px solid rgba(79, 69, 230, 0.95);
    background: rgba(79,69,230,0.10);
    border-radius: 0 12px 12px 0;
    color: rgba(255,255,255,0.78);
}

.forum-code {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 16px;
    overflow-x: auto;
    color: #d7e3ff;
}

.forum-inline-code {
    background: rgba(0,0,0,0.40);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 2px 6px;
    color: #bcd1ff;
}

.forum-spoiler {
    background: rgba(255,255,255,0.20);
    color: transparent;
    border-radius: 6px;
    padding: 2px 6px;
    cursor: pointer;
}

.forum-spoiler.revealed {
    color: white;
    background: rgba(255,255,255,0.08);
}

.forum-mention {
    color: #8fa2ff;
    font-weight: 900;
    background: rgba(79,69,230,0.18);
    border-radius: 999px;
    padding: 2px 7px;
}

.youtube-wrap {
    position: relative;
    width: 100%;
    max-width: 780px;
    aspect-ratio: 16 / 9;
    background: rgba(0,0,0,0.45);
    border-radius: 14px;
    overflow: hidden;
    margin: 14px 0;
    border: 1px solid rgba(255,255,255,0.10);
}

.youtube-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Quote reply block */
.quote-reply-btn {
    margin-top: 10px;
}

@media (max-width: 900px) {
    .editor-main {
        grid-template-columns: 1fr;
    }

    .editor-write {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.10);
    }

    .editor-input,
    .editor-write,
    .editor-preview-panel {
        min-height: 300px;
    }

    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}



/* V5 forced rich editor visibility/fixes */
.lrp-rich-editor {
    display: block !important;
    width: 100%;
    margin: 12px 0;
}

.lrp-rich-editor .editor-input {
    display: block !important;
    width: 100% !important;
    min-height: 420px !important;
    height: auto !important;
    background: rgba(4, 6, 12, 0.88) !important;
    border: none !important;
    border-radius: 0 !important;
    color: white !important;
    padding: 20px !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
}

.lrp-rich-editor .editor-topbar button,
.lrp-rich-editor .editor-upload-btn {
    padding: 0 11px !important;
    height: 36px !important;
    width: auto !important;
}

.lrp-rich-editor .editor-preview {
    min-height: 360px;
}

.lrp-rich-editor textarea.editor-input {
    font-family: Arial, Helvetica, sans-serif;
}


/* V6 local image display fallback */
.forum-image-link {
    display: block;
    max-width: 100%;
}
