/* Studyroom wrapper, after the unmodified SunEditor 3.3.3 CSS. */
.study-rich-editor { min-width:0; max-width:100%; display:block; color:#172033; background:#fff; border:1px solid #cbd5e1; border-radius:7px; }
.rich-editor-label { padding:.5rem .75rem; font-size:.9rem; font-weight:600; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.study-rich-editor .rich-editor-quickbar { display:flex; flex-wrap:wrap; gap:4px; padding:6px; background:#f8fafc; border-bottom:1px solid #e2e8f0; max-width:100%; }
.study-rich-editor .rich-editor-tool { display:inline-flex; align-items:center; justify-content:center; gap:5px; background:white; color:#334155; border:1px solid #cbd5e1; border-radius:4px; min-height:32px; padding:4px 8px; font-size:12px; line-height:1.3; cursor:pointer; white-space:nowrap; }
.study-rich-editor .rich-editor-tool:hover:not(:disabled) { background:#eff6ff; border-color:#60a5fa; }
.study-rich-editor .rich-editor-tool:focus-visible { outline:2px solid #2563eb; outline-offset:1px; }
.study-rich-editor .rich-editor-tool:disabled { opacity:.55; cursor:not-allowed; }
.rich-editor-swatch::before { content:''; width:12px; height:12px; flex:none; border-radius:2px; background:currentColor; border:1px solid #0002; }
.rich-editor-warning { margin:8px; padding:8px; background:#f1f5f9; color:#334155; font-size:.85rem; }
.study-rich-editor [hidden] { display:none !important; }
.rich-editor-engine { min-width:0; max-width:100%; }
.rich-editor-fallback { padding:12px; min-height:90px; overflow-wrap:anywhere; }
.study-rich-editor .sun-editor { border:0; border-radius:0; max-width:100%; min-width:0; background:#fff; }
.study-rich-editor .sun-editor,.sun-editor.study-rich-editor-carrier { font-family:var(--font); }
.study-rich-editor .se-toolbar { outline:none; background:#f8fafc; max-width:100%; }
/* Disable the vendor's window/fixed sticky manager, not CSS sticky. The owning
   work-panel scrollport supplies the top edge; the editor bounds its lifetime.
   The quickbar is inside this toolbar, so all tools stick and return together.
   Do not add overflow:auto/hidden on an ancestor between here and work-panel. */
.study-rich-editor:not(.rich-editor-fullscreen) .se-toolbar { position:sticky; top:var(--study-tabs-height,0px); z-index:7; }
.study-rich-editor .se-toolbar .se-btn-tray { display:flex; flex-wrap:wrap; max-width:100%; height:auto; }
.study-rich-editor .se-toolbar .se-btn-module { flex-shrink:1; max-width:100%; }
.study-rich-editor .se-toolbar .se-menu-list { display:flex; flex-wrap:wrap; min-width:0; max-width:100%; }
/* The quickbar belongs to the fullscreen toolbar, not the covered page. */
.study-rich-editor.rich-editor-fullscreen .se-container { display:flex; flex-direction:column; height:100%; }
.study-rich-editor.rich-editor-fullscreen .se-toolbar { flex:none; }
.study-rich-editor.rich-editor-fullscreen .se-wrapper { flex:1; min-height:0; height:auto !important; }
/* Global form rules must not turn the vendor's inline size input into a field. */
.study-rich-editor .sun-editor .se-btn-tool-font-size input.__se__font_size { display:inline-block; box-sizing:border-box; width:50px; min-width:0; max-width:50px; height:28px; min-height:0; margin:0; padding:0 4px; border:1px solid transparent; border-radius:4px; background:transparent; color:inherit; font-size:12px; line-height:1.25; box-shadow:none; }
.study-rich-editor .sun-editor-editable { overflow-wrap:anywhere; min-width:0; background:white; color:#172033; font-family:var(--font); font-size:16px; line-height:1.65; }
.study-rich-editor .sun-editor-editable img,.rich-editor-fallback img { max-width:100%; object-fit:contain; }
.study-rich-editor .sun-editor-editable table,.rich-editor-fallback table { max-width:100%; }
.study-rich-editor .sun-editor-editable pre,.rich-editor-fallback pre { max-width:100%; overflow:auto; }
.study-rich-editor .se-container { min-width:0; max-width:100%; }
.study-rich-editor .se-wrapper { min-width:0; max-width:100%; overflow-x:auto; }
.rich-editor-source { display:block; width:100%; min-width:0; box-sizing:border-box; font:13px/1.5 ui-monospace,monospace; resize:vertical; }
.rich-editor-image-form { display:flex; flex-direction:column; gap:10px; min-width:0; }
.rich-editor-image-form input { min-width:0; max-width:100%; box-sizing:border-box; }
.rich-editor-image-receipt { font-size:.85rem; overflow-wrap:anywhere; color:#1d4ed8; }
@media (max-width:600px) {
 /* Override v3's inline menu offsets only for the adapter-owned mobile tray. */
 .study-rich-editor-carrier .rich-editor-mobile-menu { position:fixed !important; left:var(--rich-menu-left,8px) !important; right:auto !important; top:var(--rich-menu-top,8px) !important; height:auto !important; max-height:var(--rich-menu-max-height,calc(100dvh - 16px)) !important; max-width:calc(100vw - 16px); overflow:auto; overscroll-behavior:contain; }
 .sun-editor.study-rich-editor-carrier .se-form-group input.se-color-input { display:inline-block; flex:1; width:0; min-width:0; min-height:0; height:32px; margin:1px 0; padding:0 4px; border-radius:4px; font-size:16px; line-height:1.25; }
 .study-rich-editor .rich-editor-quickbar { gap:4px; padding:5px; }
 .study-rich-editor .rich-editor-swatch { min-height:36px; padding:5px; gap:3px; }
 .study-rich-editor .se-toolbar .se-btn { min-width:30px; }
 .study-rich-editor .sun-editor .se-btn-tool-font-size input.__se__font_size { width:56px; max-width:56px; height:32px; font-size:16px; }
 .study-rich-editor .sun-editor-editable { padding:10px; }
}
