/* Shared editor layout for posts, comments, replies and edits. */
.rhk-composer.rhk-unified{border:0;background:transparent;border-radius:0;margin:8px 0 18px;font:14px/1.6 var(--sans);color:#294138}
.rhk-unified [hidden]{display:none!important}
.rhk-unified .rhk-composer-surface{border:1px solid #cbd7cd;border-radius:8px;background:#fff;min-width:0}
.rhk-unified .rhk-composer-surface:focus-within{border-color:#8fa895}
.rhk-unified .rhk-format-panel{border-bottom:1px solid #dce3d8;border-radius:8px 8px 0 0;background:#f0f3eb}
.rhk-unified .rhk-toolbar{border-bottom:0;padding:6px 10px;background:transparent}
.rhk-unified .rhk-toolbar>button,.rhk-unified .rhk-extra-tools>button,.rhk-unified .rhk-extra-tools select,.rhk-unified .rhk-more-tools>summary{min-height:40px;font-size:13px}
.rhk-unified .rhk-linkfield{border-top:1px solid #dce3d8;border-bottom:0}
.rhk-unified .rhk-editor{border-radius:8px 8px 0 0;overflow:hidden}
.rhk-unified .rhk-editor .ql-editor{min-height:220px;max-height:50dvh;padding:18px;font-size:16px;line-height:1.8}
.rhk-unified.rhk-compact .rhk-editor .ql-editor{min-height:140px;max-height:40dvh}
.rhk-unified .rhk-editor .ql-editor.ql-blank:before{left:18px;right:18px;color:#809187;font-size:14px;line-height:1.8}
.rhk-unified .rhk-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border-top:1px solid #dce3d8;background:#fbfcf9;border-radius:0 0 8px 8px}
.rhk-unified .rhk-compose-tools{display:flex;align-items:center;gap:3px;min-width:0}
.rhk-unified .rhk-compose-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;padding:8px 10px;margin:0;border:0;border-radius:5px;background:transparent;color:#526d5f;font:13px/1.4 var(--sans);white-space:nowrap;cursor:pointer;text-decoration:none;letter-spacing:normal}
.rhk-unified .rhk-compose-actions button:hover,.rhk-unified .rhk-compose-actions button[aria-pressed=true],.rhk-unified .rhk-compose-actions button[aria-expanded=true]{background:#eaf0e6;color:#2f5544}
.rhk-unified .rhk-compose-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;flex:none}
.rhk-unified .rhk-compose-actions .rhk-gif-trigger{font-weight:500!important;position:relative}
.rhk-unified .rhk-gif-trigger.has-selection:after{content:'';width:4px;height:4px;border-radius:50%;background:#a45e43;position:absolute;right:5px;top:8px}
.rhk-unified .rhk-preview-toggle{flex:none}
.rhk-unified .rhk-composer-meta{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin-top:8px}
.rhk-unified .rhk-caption,.rhk-unified .rhk-counter{padding:0;margin:0;color:#697e70;font:12px/1.6 var(--sans)}
.rhk-unified .rhk-counter{margin-left:auto;white-space:nowrap;font-variant-numeric:tabular-nums}
.rhk-unified .rhk-status{padding:0;min-height:0;margin-top:4px;color:#697e70;font-size:12px}
.rhk-unified .rhk-status:empty{display:none}
.rhk-unified .rhk-att-list{margin:0;padding:0 16px 14px;gap:8px}
.rhk-unified .rhk-att{width:144px;padding:7px;font-size:12px;line-height:1.5;background:#f8faf5}
.rhk-unified .rhk-att button{min-height:36px;font-size:12px}
.rhk-unified .rhk-gif-picker{margin:0;font-size:13px}
.rhk-unified .rhk-gif-panel{margin:0 16px 14px;max-width:none;border-radius:7px}
.rhk-unified .rhk-gif-selected{margin:0 16px 14px;display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap}
.rhk-unified .rhk-gif-selected .rhk-gif-media{width:240px;margin:0}
.rhk-unified .rhk-gif-selected .rhk-gif-remove{margin:0;min-height:40px}
.rhk-unified .rhk-gif-panel button{min-height:40px}
.rhk-unified .rhk-preview{min-height:220px;padding:18px;border:0;background:#fff;border-radius:8px 8px 0 0;overflow-wrap:anywhere}
.rhk-unified.rhk-compact .rhk-preview{min-height:140px}
.rhk-unified .rhk-preview .article-body{font-size:16px;line-height:1.8;max-width:100%}
.rhk-unified .rhk-preview .rhk-att-list{padding:0;margin-top:12px}
.rhk-unified .rhk-preview .rhk-att-list:empty{display:none}
.rhk-unified .rhk-banner{border:1px solid #dbcba9;margin-bottom:8px;border-radius:6px}
.rhk-unified .rhk-banner button{min-height:40px}

/* The post dialog uses the same paper, spacing and supporting controls. */
dialog.compose-dialog{width:min(760px,calc(100% - 32px));padding:28px 32px;background:#f5f6f0;border-radius:10px}
.compose-dialog .dialog-top{margin-bottom:8px}
.compose-dialog h2{font-family:var(--sans);font-size:25px;font-weight:600;line-height:1.5}
.compose-dialog .dialog-intro{font-size:14px;margin-top:6px;color:#64796c}
.compose-dialog #post-form{margin-top:22px}
.compose-dialog .optional-title{margin-bottom:12px}
.compose-dialog #post-form .rhk-unified{margin-bottom:12px}
.compose-dialog #post-form .rhk-unified .ql-editor{min-height:220px}
.compose-dialog .optional-tags{margin:12px 0 0}
.compose-dialog .optional-tags>summary,.compose-dialog .optional-title>summary{min-height:36px;padding:5px 0;color:#526d5f;font-size:13px}
.compose-dialog .writer-fields{margin-top:16px;border-top:1px solid #d8e0d4;padding-top:16px}
.compose-dialog .writer-memory-fields{margin:0;gap:16px}
.compose-dialog .form-footnote{margin:14px 0 0;font-size:12px;color:#64796c}
.compose-dialog .form-footnote .text-button{font-size:12px;min-height:40px}
.compose-dialog .form-notice{background:transparent;padding:0;margin-top:6px;font-size:12px;color:#64796c}
.compose-dialog .submit-button{width:auto;min-width:132px;display:flex;margin:18px 0 0 auto;padding:10px 20px}
.compose-dialog .form-error:empty{display:none}

@media(max-width:600px){
  dialog.compose-dialog{padding:22px 18px;width:calc(100% - 24px)}
  .compose-dialog h2{font-size:22px}
  .compose-dialog .writer-memory-fields{grid-template-columns:1fr;gap:14px}
  .compose-dialog .submit-button{min-width:120px}
  .rhk-unified .rhk-editor .ql-editor,.compose-dialog #post-form .rhk-unified .ql-editor{min-height:190px;padding:14px}
  .rhk-unified.rhk-compact .rhk-editor .ql-editor{min-height:140px}
  .rhk-unified .rhk-editor .ql-editor.ql-blank:before{left:14px;right:14px}
  .rhk-unified .rhk-att-list{padding:0 12px 12px}
  .rhk-unified .rhk-att{width:calc(50% - 4px)}
  .rhk-unified .rhk-gif-panel,.rhk-unified .rhk-gif-selected{margin:0 12px 12px}
  .rhk-unified .rhk-compose-actions{padding:5px 6px;gap:2px}
  .rhk-unified .rhk-compose-tools{gap:0}
  .rhk-unified .rhk-compose-actions button{padding:8px;font-size:12px;gap:5px}
  .rhk-unified .rhk-preview{min-height:190px;padding:14px}
  .rhk-unified.rhk-compact .rhk-preview{min-height:140px}
}
@media(max-width:420px){
  .rhk-unified .rhk-preview-toggle .rhk-tool-label{display:none}
  .rhk-unified .rhk-caption,.rhk-unified .rhk-counter{font-size:11px}
  .rhk-unified .rhk-toolbar{padding:5px 6px;gap:0}
  .rhk-unified .rhk-toolbar>button{padding:5px 7px;font-size:12px}
  .rhk-unified .rhk-more-tools{width:100%;margin-left:0}
  .rhk-unified .rhk-more-tools>summary{justify-content:flex-end}
}
