/* Open comment rows retain native moderation, rich text and attachment controls. */
.loop-shell .loop-feed-column .comment-container.bg-light,.loop-shell .comment-container.bg-light,.loop-shell .loop-comment-row,.loop-shell .loop-comment-row>.loop-comment-body,.loop-shell .loop-comment-row .comment_edit_content,.loop-shell .loop-comment-row .comment-message{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.loop-shell .comment-container.bg-light{padding-inline:0!important}
.loop-shell .comment-container{background:transparent!important;border:0;border-radius:0}
.loop-shell .comment-separator,.loop-shell .comment_create>hr{display:none!important}
.loop-shell .loop-comment-row{position:relative;gap:12px;padding:8px 0!important;margin:0;border:0;background:transparent}
.loop-comment-row>.comment-header-image{margin:0!important;width:40px;flex:0 0 40px}
.loop-comment-row>.comment-header-image img{width:40px;height:40px;border-radius:50%;object-fit:cover}
.loop-comment-body{min-width:0;padding-right:22px}
.loop-shell .loop-comment-row .comment-heading{font-size:12px;line-height:18px;margin:0;font-weight:600;color:var(--loop-text)}
.loop-shell .loop-comment-row .comment-heading a{color:var(--loop-text);text-decoration:none}
.loop-shell .loop-comment-row .comment-heading small{font-size:11px;color:var(--loop-muted);font-weight:400}
.loop-shell .loop-comment-row .comment-message{font-size:14px;line-height:1.45;color:var(--loop-text);overflow-wrap:anywhere}
.loop-comment-row .comment-message p{margin:0 0 3px}
.loop-shell .loop-comment-row .wall-entry-controls{display:flex;align-items:center;gap:14px;margin:3px 0 0;padding:0;border:0;min-height:27px;font-size:12px}
.loop-shell .loop-comment-row .wall-entry-controls .wall-entry-links{display:flex;align-items:center;gap:14px;margin:0;padding:0;border:0;min-height:27px}
.loop-comment-row .wall-entry-controls .likeLinkContainer{display:inline-flex;align-items:center;margin:0}
.loop-comment-row .wall-entry-controls .loop-reaction-trigger{padding:0;min-height:27px;height:27px;color:var(--loop-muted)}
.loop-comment-row .wall-entry-controls .loop-post-action-icon{width:18px!important;height:18px!important;display:block}
.loop-comment-row .loop-comment-reply{display:inline-flex;align-items:center;min-height:27px;font-size:12px;font-weight:600;color:var(--loop-muted)!important}
.loop-comment-reply .comment-count{display:none!important}
.loop-shell .loop-comment-row>ul{position:absolute;top:4px;right:0;margin:0;padding:0}
.loop-comment-thread{margin:2px 0 0}
.loop-comment-thread>summary{display:list-item;cursor:pointer;width:fit-content;padding:3px 0;font-size:12px;line-height:22px;font-weight:600;color:var(--loop-muted)}
.loop-thread-empty>summary{display:none}
.loop-comment-thread .comment-container{padding:0!important;margin-top:3px!important}
.loop-comment-thread .loop-comment-row{gap:9px}
.loop-comment-thread .comment-header-image{width:30px;flex-basis:30px}
.loop-comment-thread .comment-header-image img{width:30px;height:30px}
.loop-shell .comment_create{padding-top:8px}
.loop-shell .comment_create .richtext-create-input-group{border-radius:19px;background:var(--loop-soft);padding:5px 8px;border:0}
.loop-shell .comment_create .ProseMirror{background:transparent!important;border:0!important;box-shadow:none!important;font-size:14px;min-height:38px;padding:7px 8px;color:var(--loop-text)}
.loop-shell .comment_create .richtext-create-buttons{align-items:center}
.loop-shell .comment_create .richtext-create-buttons .btn{background:transparent!important;color:var(--loop-muted)!important;border:0;box-shadow:none}
.loop-shell .modal-dialog:has(.loop-comments-dialog){max-width:700px;width:calc(100% - 24px)}
.loop-shell .modal-content:has(.loop-comments-dialog){border:1px solid var(--loop-border);border-radius:14px;overflow:hidden;background:var(--loop-surface)}
.loop-shell .modal-content:has(.loop-comments-dialog) .modal-header{padding:15px 20px;justify-content:center;position:relative;border-bottom:1px solid var(--loop-border)}
.loop-shell .modal-content:has(.loop-comments-dialog) .modal-header .modal-title{font-size:18px;font-weight:600}
.loop-shell .loop-comments-dialog{padding:0 16px!important;max-height:none!important;overflow:hidden!important}
.loop-comments-layout{display:flex;flex-direction:column;max-height:calc(100dvh - 190px);min-height:160px}
.loop-comments-list{overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;padding:10px 0}
.loop-comments-layout>.comment_create{flex:0 0 auto;padding:10px 0 14px;border-top:1px solid var(--loop-border);background:var(--loop-surface)}
@media(max-width:600px){.loop-shell .modal-dialog:has(.loop-comments-dialog){width:calc(100% - 12px);margin:8px auto}.loop-comments-layout{max-height:calc(100dvh - 100px)}.loop-shell .loop-comments-dialog{padding:0 12px!important}.loop-comment-row{gap:9px}.loop-comment-body{padding-right:17px}.loop-comment-row>.comment-header-image{width:34px;flex-basis:34px}.loop-comment-row>.comment-header-image img{width:34px;height:34px}}
/* Keep avatar status badges and long comment content inside the list. */
.loop-comments-list{overflow-x:hidden}
.loop-comment-row>.comment-header-image img{border-radius:50%!important}
.loop-comment-row .comment-header-image .has-online-status{max-width:100%}
.loop-comment-row .wall-entry-controls{font-size:0!important;gap:12px!important}
.loop-comment-row .wall-entry-controls>.loop-reactions{order:0;font-size:12px}
.loop-comment-row .wall-entry-controls>.loop-comment-reply{order:1;font-size:12px}
.loop-comment-row .wall-entry-controls{line-height:1.3}
.loop-comment-row .comment_edit_content{margin-bottom:0!important;padding:0!important;min-height:0!important}
.loop-comment-thread[open]>.nested-comments-root>.comment-container{display:block!important}
.loop-comment-row .wall-entry-controls>.loop-reactions{height:27px;min-height:27px;line-height:1;margin:0!important}
.loop-shell .loop-comment-row .wall-entry-controls{height:27px;min-height:27px}
.loop-shell .loop-comment-row .comment-heading{margin-bottom:0!important;padding-top:0!important}
.loop-shell .loop-comment-row .comment-header-image img.rounded{border-radius:50%!important}
.loop-shell .loop-comment-thread>.nested-comments-root>.comment-container{background:transparent!important;border:0!important;border-radius:0!important}
/* Simple comment composer: emoji and insert only, no text-formatting toolbar. */
.loop-shell .comment_create .ProseMirror-menu-main-menu-group>.ProseMirror-menuitem:not(:has(.ProseMirror-menu-insertEmoji)):not(:has(.ProseMirror-menu-insert-dropdown)){display:none!important}
.loop-shell .comment_create .ProseMirror-menubar{background:transparent!important;border:0!important;box-shadow:none!important;min-height:0;padding:0 5px}
.loop-shell .comment_create .ProseMirror-menubar-wrapper{border:0!important;box-shadow:none!important;display:flex;flex-direction:column}
.loop-shell .comment_create .ProseMirror-menubar-wrapper>.ProseMirror-menubar{order:2}
.loop-shell .comment_create .ProseMirror-menubar .ProseMirror-icon{background:transparent!important;border:0!important;color:var(--loop-muted)}
.loop-shell .comment_create .ProseMirror-menu-trigger.seperator{border:0!important}
/* URLs are linked automatically; no manual hyperlink button. */
.loop-shell .comment_create .ProseMirror-menu-marks-group{display:none!important}
.loop-shell .loop-comments-list hr,.loop-shell .loop-comment-thread hr{display:none!important}
/* Inline rich text defaults pull the menu up into the text; give it its own row. */
.loop-shell .comment_create .richtext-create-input-group{display:block;position:relative}
.loop-shell .comment_create .ProsemirrorEditor,.loop-shell .comment_create .ProseMirror-menubar-wrapper{height:auto!important;min-width:0;width:100%}
.loop-shell .comment_create .ProseMirror-menubar-wrapper>.ProseMirror{flex:none;min-width:0;width:100%}
.loop-shell .comment_create .ProseMirror-menubar-wrapper>.ProseMirror-menubar{flex:none;margin:0!important;min-height:30px;padding:2px 100px 2px 5px}
.loop-shell .comment_create .richtext-create-buttons{position:absolute;right:8px;bottom:6px;display:flex;align-items:center;gap:2px;z-index:2}
.loop-shell .modal-content:has(.loop-comments-dialog) .btn-close{filter:invert(1);opacity:.85}
.loop-comments-layout.loop-comments-empty{min-height:0}
.loop-comments-empty>.loop-comments-list{display:none}
.loop-comments-empty>.comment_create{border-top:0}
/* Menus must extend beyond a short, empty comments dialog. */
.loop-shell .modal-content:has(.loop-comments-dialog),.loop-shell .loop-comments-dialog{overflow:visible!important}
.loop-shell .comment_create .ProseMirror-menu-dropdown-menu,.loop-shell .comment_create .dropdown-menu{background:var(--loop-surface);color:var(--loop-text);border:1px solid var(--loop-border);border-radius:10px;box-shadow:0 8px 25px #0005;z-index:1080}
.loop-shell .comment_create .ProseMirror-menu-dropdown-menu a{display:block;color:var(--loop-text);padding:8px 12px;text-decoration:none;white-space:nowrap}
.loop-shell .comment_create .ProseMirror-menu-dropdown-menu a:hover{background:var(--loop-soft)}
.loop-comments-scroll{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;min-height:0;flex:1}
.loop-comments-scroll>.loop-comments-list{overflow:visible;flex:none}
.loop-comment-post-preview .wall-entry{margin:0!important;border-radius:0!important;border:0!important}
.loop-comment-post-preview .loop-post-media-1 img,.loop-comment-post-preview .loop-post-media-1 video{max-height:350px!important}
.loop-comments-empty-notice{display:none;padding:22px 12px;text-align:center;color:var(--loop-muted)}
.loop-comments-empty-notice strong,.loop-comments-empty-notice span{display:block}
.loop-comments-empty-notice strong{color:var(--loop-text);font-size:14px;margin-bottom:4px}
.loop-comments-empty .loop-comments-empty-notice{display:block}
.loop-comments-empty .loop-comments-list{display:none}
.loop-comments-empty>.comment_create{border-top:1px solid var(--loop-border)}
/* The editor toolbar must not intercept clicks on upload/send at the right. */
.loop-shell .comment_create .ProseMirror-menubar-wrapper>.ProseMirror-menubar{width:calc(100% - 100px)!important;padding-right:5px}
.loop-shell .comment_create .richtext-create-buttons{z-index:11}
.loop-shell .comment_create .ProseMirror-menubar-wrapper{z-index:auto!important}
.loop-shell .comment_create .ProseMirror-menubar-wrapper>.ProseMirror-menubar{display:block!important}

/* HumHub panel paragraphs use its dark palette even inside a light comment editor. */
.loop-shell :is(.comment_create,.comment_edit_content) .ProseMirror,
.loop-shell :is(.comment_create,.comment_edit_content) .ProseMirror :where(p,li,blockquote,pre,code){
 color:var(--loop-text)!important;
 caret-color:var(--loop-text)!important;
}
.loop-shell :is(.comment_create,.comment_edit_content) .ProseMirror .placeholder{
 color:var(--loop-muted)!important;
}
/* Native insert menus are mounted only while open. Let them escape the post's
   rounded clipping wrappers, then restore clipping when the menu is dismissed. */
.loop-shell .wall-entry:has(:is(.comment_create,.comment_edit_content) :is(.ProseMirror-menu-dropdown-menu,.dropdown-menu.show)),
.loop-shell .wall-entry>.panel:has(:is(.comment_create,.comment_edit_content) :is(.ProseMirror-menu-dropdown-menu,.dropdown-menu.show)){
 overflow:visible!important;
}
.loop-shell .wall-entry:has(:is(.comment_create,.comment_edit_content) :is(.ProseMirror-menu-dropdown-menu,.dropdown-menu.show)){
 z-index:30;
}
