/* Shared WYSIWYG for posts, comments, replies and direct messages. */
.bbbs-rich-editor { min-width:0; width:100%; max-width:100%; border:1px solid #d9d5e4; border-radius:16px; overflow:hidden; background:rgba(255,255,255,.92); margin:0 0 12px; }
.bbbs-rich-toolbar { display:flex; flex-wrap:wrap; gap:5px; align-items:center; padding:8px; border-bottom:1px solid #e6e1eb; background:linear-gradient(120deg,#fff9e9,#f4eefb); }
.bbbs-rich-toolbar button, .bbbs-rich-toolbar select { font:inherit; font-size:13px; line-height:1.3; min-height:32px; min-width:32px; padding:5px 9px; border:1px solid #ded9e6; border-radius:8px; background:#fffdfd; color:#514c69; cursor:pointer; flex:0 0 auto; }
.bbbs-rich-toolbar button:hover, .bbbs-rich-toolbar select:hover { border-color:#e2c477; background:#fff2cd; }
.bbbs-rich-toolbar button:focus-visible, .bbbs-rich-toolbar select:focus-visible { outline:2px solid #ceaa4e; outline-offset:1px; }
.bbbs-rich-toolbar button:disabled, .bbbs-rich-toolbar select:disabled { opacity:.45; cursor:not-allowed; }
.bbbs-rich-toolbar .rich-bold {font-weight:800;}
.bbbs-rich-toolbar .rich-italic {font-style:italic;}
.bbbs-rich-toolbar .rich-underline {text-decoration:underline;}
.bbbs-rich-toolbar .rich-strike {text-decoration:line-through;}
.bbbs-rich-toolbar .bbbs-source-toggle {margin-left:auto;background:#fff1c5;min-width:54px;}
.bbbs-rich-surface { min-width:0; min-height:120px; max-height:50vh; overflow-y:auto; overflow-x:hidden; padding:13px 15px; outline:none; white-space:pre-wrap; line-height:1.6; overflow-wrap:anywhere; color:#303146; }
.bbbs-rich-surface:focus { box-shadow:inset 0 0 0 2px #f0c96d; }
.bbbs-rich-surface:empty:before { content:attr(data-placeholder); color:#97909f; pointer-events:none; }
.bbbs-rich-surface[contenteditable=false] {background:#f5f3f7;cursor:not-allowed;}
.bbbs-rich-surface img {max-width:100%;height:auto;}
.bbbs-rich-surface .bbcode-caption {display:inline!important;font-size:inherit!important;color:inherit!important;}
.bbbs-rich-editor textarea.bbbs-rich-source {display:none!important; box-sizing:border-box; width:100%; max-width:100%; margin:0; min-height:160px; border:0; border-radius:0; resize:vertical; font:13px/1.55 ui-monospace,monospace; white-space:pre-wrap;}
.bbbs-rich-editor.is-source .bbbs-rich-surface {display:none;}
.bbbs-rich-editor.is-source textarea.bbbs-rich-source {display:block!important;}
.bbbs-rich-footer {display:flex; justify-content:space-between; gap:12px; padding:5px 11px; border-top:1px solid #ebe7ef; color:#90889b; font-size:11px;}
.bbbs-rich-footer .is-over-limit {color:#a31b35;font-weight:700;}
.feed-composer .bbbs-rich-editor {margin-top:6px;}
.feed-composer .bbbs-rich-surface {min-height:210px;}
.feed-focus-comment-form .bbbs-rich-surface,.feed-focus-reply-form .bbbs-rich-surface {min-height:85px;max-height:260px;}
.message-list .msg-body.markdown-body {white-space:normal;}
.msg-body.markdown-body {white-space:normal;}
.dm-compose .bbbs-rich-surface,.message-list + .composer-card .bbbs-rich-surface {min-height:105px;}
@media (max-width:720px) {
  .bbbs-rich-toolbar {gap:4px;padding:7px;}
  .bbbs-rich-toolbar button,.bbbs-rich-toolbar select {min-width:32px;min-height:34px;padding:5px 8px;font-size:12px;}
  .bbbs-rich-surface {min-height:105px;padding:12px;max-height:38vh;font-size:16px;}
  .feed-composer .bbbs-rich-surface {min-height:170px;}
  .bbbs-rich-editor {border-radius:14px;}
  .bbbs-rich-toolbar .bbbs-source-toggle {margin-left:0;}
}
