/* SunEditor — full width + ViralBuzz dark mode (all admin views) */
.vb-suneditor-field {
    width: 100%;
    min-width: 0;
}

.vb-suneditor-field > textarea,
.vb-suneditor-field .sun-editor {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.vb-dashboard .sun-editor {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.vb-dashboard .sun-editor .se-container {
    width: 100% !important;
}

.vb-suneditor-field .sun-editor {
    border: 1px solid var(--tblr-border-color, #d0d7de);
    border-radius: 0.5rem;
    background: var(--tblr-card-bg, #fff);
}

.vb-suneditor-field .sun-editor .se-container {
    width: 100% !important;
}

.vb-suneditor-field .sun-editor-editable {
    font-family: inherit !important;
    font-size: 0.9375rem !important;
    line-height: 1.65 !important;
}

.vb-suneditor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.vb-suneditor-toolbar-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tblr-secondary, #57606a);
}

.vb-suneditor-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

html[data-bs-theme=dark] .vb-suneditor-field .sun-editor {
    background: var(--vb-surface-2, #1e1e22);
    border-color: var(--vb-border, #3d3d45);
}

html[data-bs-theme=dark] .vb-suneditor-field .sun-editor .se-toolbar {
    background: var(--vb-surface, #252529);
    outline-color: var(--vb-border, #3d3d45);
}

html[data-bs-theme=dark] .vb-suneditor-field .sun-editor .se-btn-module-border {
    border-color: var(--vb-border, #3d3d45);
}

html[data-bs-theme=dark] .vb-suneditor-field .sun-editor button {
    color: var(--vb-text, #e8e8ed);
}

html[data-bs-theme=dark] .vb-suneditor-field .sun-editor button:hover,
html[data-bs-theme=dark] .vb-suneditor-field .sun-editor button:focus {
    background-color: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme=dark] .vb-suneditor-field .sun-editor-editable {
    background: var(--vb-surface-2, #1e1e22) !important;
    color: var(--vb-text, #e8e8ed) !important;
}

html[data-bs-theme=dark] .vb-suneditor-field .sun-editor .se-placeholder {
    color: var(--vb-muted, #9ca3af) !important;
}

html[data-bs-theme=dark] .vb-suneditor-field .se-selector-table {
    background: var(--vb-surface, #252529);
    color: var(--vb-text, #e8e8ed);
}

html[data-bs-theme=dark] .vb-suneditor-field .se-list-layer {
    background: var(--vb-surface, #252529);
    color: var(--vb-text, #e8e8ed);
    border-color: var(--vb-border, #3d3d45);
}

/* Fallback: any SunEditor inside admin dashboard */
html[data-bs-theme=dark] .vb-dashboard .sun-editor {
    background: var(--vb-surface-2, #1e1e22);
    border-color: var(--vb-border, #3d3d45);
}

html[data-bs-theme=dark] .vb-dashboard .sun-editor .se-toolbar {
    background: var(--vb-surface, #252529);
    outline-color: var(--vb-border, #3d3d45);
}

html[data-bs-theme=dark] .vb-dashboard .sun-editor button {
    color: var(--vb-text, #e8e8ed);
}

html[data-bs-theme=dark] .vb-dashboard .sun-editor-editable {
    background: var(--vb-surface-2, #1e1e22) !important;
    color: var(--vb-text, #e8e8ed) !important;
}

html[data-bs-theme=dark] .vb-dashboard .sun-editor .se-placeholder {
    color: var(--vb-muted, #9ca3af) !important;
}
