/* StratexControls rz-editor — shared style tweaks for the Quill 2 editor. */

/* Keep Quill's link tooltip inside narrow containers (e.g. Bootstrap offcanvas panels).
   Quill positions the tooltip at the cursor, which can overflow and get clipped near
   the right edge; pin it to the editor's left edge instead. */
.rz-editor .ql-tooltip {
    left: 0 !important;
    max-width: 100%;
}

/* Hard cap on editor height, whatever a page asks for.
   An editor taller than the viewport pushes its own Save button off screen, which
   reads as "there is no Save button". Content scrolls inside instead — Quill's
   .ql-editor already handles overflow. max-height beats the inline height, so this
   applies even to pages that pass a large height=""; no per-page change needed. */
.rz-editor {
    max-height: 75vh;
}

/* Formatting hint under the editor. Deliberately quiet — it should be findable when a
   user wonders where their pasted table went, not compete with the field label. */
.rz-editor-hint {
    margin-top: .25rem;
    font-size: .8125rem;
    line-height: 1.35;
    opacity: .85;
}

/* Dark mode (Bootstrap data-bs-theme) — Quill snow hardcodes light-theme grays. */
[data-bs-theme="dark"] .ql-toolbar.ql-snow,
[data-bs-theme="dark"] .ql-container.ql-snow {
    border-color: #495057;
}

[data-bs-theme="dark"] .ql-snow .ql-stroke {
    stroke: #adb5bd;
}

[data-bs-theme="dark"] .ql-snow .ql-fill,
[data-bs-theme="dark"] .ql-snow .ql-stroke.ql-fill {
    fill: #adb5bd;
}

[data-bs-theme="dark"] .ql-snow .ql-tooltip {
    background-color: #212529;
    color: #dee2e6;
    border-color: #495057;
    box-shadow: none;
}

[data-bs-theme="dark"] .ql-snow .ql-tooltip input[type=text] {
    background-color: #2b3035;
    color: #dee2e6;
    border-color: #495057;
}
