/* Restricted-toolbar rich text editor - shared by Community (About/page body/officers note/
   bylaws), Classifieds, Events and Provider descriptions. See assets/js/rich-editor.js and
   utils/RichText.cfc. Loaded on any page that mounts a [data-rich-field] (new/edit forms) or
   renders RichText.render() output (.rich-prose, on show pages). */

.rich-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; background: #f3f4f7; border: 1px solid #dde3ee; border-bottom: none; border-radius: .4rem .4rem 0 0; }
.rich-toolbar button { border: 1px solid transparent; background: transparent; border-radius: .3rem; width: 30px; height: 30px; font-size: .8rem; font-weight: 600; cursor: pointer; }
.rich-toolbar button:hover { background: #fff; border-color: #dde3ee; }
.rich-toolbar .rich-sep { width: 1px; background: #dde3ee; margin: 3px 2px; }

.rich-editor-surface { min-height: 160px; padding: .6rem .75rem; border: 1px solid #dde3ee; border-radius: 0 0 .4rem .4rem; line-height: 1.6; }
.rich-editor-surface:focus { outline: none; border-color: var(--cm-primary, #0d6efd); box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15); }
.rich-editor-surface p { margin: 0 0 .6em; }
.rich-editor-surface ul, .rich-editor-surface ol { margin: 0 0 .6em; padding-left: 1.4em; }
.rich-editor-surface h2 { font-size: 1.2rem; margin: .6em 0 .3em; }
.rich-editor-surface h3 { font-size: 1.05rem; margin: .6em 0 .3em; }
.rich-editor-surface blockquote { margin: 0 0 .6em; padding: .2em .9em; border-left: 3px solid #adb5bd; color: #555; }

.rich-editor-surface figure[data-block="image"] { position: relative; display: inline-block; max-width: 100%; margin: .4em 0; }
.rich-editor-surface figure[data-block="image"] img { max-width: 100%; max-height: 260px; border-radius: .4rem; display: block; }
.rich-editor-surface .rich-img-remove {
    position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: none;
    background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
}
.rich-editor-surface figure[data-block="image"]:hover .rich-img-remove { background: #dc3545; }

.rich-status { font-size: .8rem; padding: 4px 2px 0; min-height: 18px; }
.rich-status.uploading { color: #6c757d; }
.rich-status.error { color: #dc3545; }
.rich-status.ok { color: #198754; }

/* Reading view for RichText.render() output - Community's own show page keeps using .cm-prose;
   this is the same ruleset under a generic name for Classifieds/Events/Providers show pages. */
.rich-prose { line-height: 1.65; overflow-wrap: anywhere; }
.rich-prose h2 { font-size: 1.25rem; margin: 1em 0 .4em; }
.rich-prose h3 { font-size: 1.05rem; margin: 1em 0 .4em; }
.rich-prose p { margin: 0 0 .75em; }
.rich-prose ul, .rich-prose ol { margin: 0 0 .75em; padding-left: 1.4em; }
.rich-prose blockquote { margin: 0 0 .75em; padding: .2em 1em; border-left: 3px solid #6c757d; color: #555; }
.rich-prose a { color: #0d6efd; }
.rich-prose figure[data-block="image"] { margin: .6em 0; }
.rich-prose figure[data-block="image"] img { max-width: 100%; border-radius: .5rem; }
