/* ========================================
   Comment Section — Notion-Style Design
   ======================================== */

/* --- Quote Block --- */
.quote {
    background: rgba(212, 168, 83, 0.08);
    border: 1px solid rgba(212, 168, 83, 0.25);
    border-right: 4px solid var(--accent-primary);
    border-radius: 0px;
    margin: 10px 0;
    overflow: hidden;
}

.quote-header {
    border-top: 1px solid rgba(212, 168, 83, 0.08);
    padding: 6px 12px;
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.quote-body {
    padding: 10px 14px;
    color: var(--text-secondary, #94a3b8);
    font-size: 14px;
}

/* --- New Comment Container --- */
.comment-new {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    margin: 16px 10px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    min-height: 100px;
}

/* --- Individual Comment Row --- */
.comment {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin: 0 10px;
    padding: 16px 10px;
    transition: background 0.2s ease;
}

.comment:hover {
    background: rgba(255, 255, 255, 0.015);
}

.comment:last-child {
    border-bottom: none;
}

/* --- Comment Bottom Bar --- */
.comment-bottom {
    height: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.comment-bottom div {
    display: inline-block;
}

.comment-bottom .comment-date {
    float: left;
    font-size: 12px;
    color: var(--text-muted, var(--text-secondary));
}

/* --- Comment Public Bar --- */
.comment-public {
    text-align: left;
}

.comment-public div {
    display: inline-block;
    margin: 0;
}

/* --- "New Comment" Title (visible label) --- */
.comment-new .title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

/* --- Text Editor Container --- */
.text-editor {
    margin: 8px 0;
}

.comment-new .modern-editor-wrapper .ql-container.ql-snow,
.comment-body .ql-container.ql-snow {
    height: auto !important;
    min-height: 200px;
}

#CommentPanel .comment-new .modern-editor-wrapper {
    isolation: isolate;
    contain: paint;
}

#CommentPanel .comment-new .modern-editor-wrapper .ql-toolbar.ql-snow,
#CommentPanel .comment-new .modern-editor-wrapper .ql-container.ql-snow {
    transform: translateZ(0);
    backface-visibility: hidden;
}

#CommentPanel .comment-new .modern-editor-wrapper.is-pasting,
#CommentPanel .comment-new .modern-editor-wrapper.is-pasting:focus-within {
    transition: none;
    border-color: rgba(212, 168, 83, 0.3);
    box-shadow: 0 0 15px rgba(212, 168, 83, 0.05);
}

.comment-new .modern-editor-wrapper .ql-editor,
.comment-body .ql-container.ql-snow .ql-editor {
    height: auto !important;
    min-height: 200px;
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}

.comment-body.ql-editor {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hide {
    display: none;
}

/* --- "New Comment" Pill Button (collapsed state) --- */
.comment-new .title.beforeopen {
    border: none;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    margin: auto;
    display: table;
    margin-top: 20px;
    cursor: pointer;
    color: var(--text-primary, #ffffff);
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 24px;
    border-radius: 20px;
    transition: all 0.25s ease;
    border-bottom: none;
}

.comment-new .title.beforeopen:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Action Buttons: Edit, Close, Quote — Glass 50% --- */
.comment-edit,
.comment-close {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-right: 0;
    margin-top: 0;
}

.comment-edit:hover,
.comment-close:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--border-glass);
}

/* Edit Active (Publishing) — 50% Teal Glass */
.comment-edit.onedit {
    background: rgba(212, 168, 83, 0.4);
    border-color: rgba(212, 168, 83, 0.25);
    color: var(--text-primary);
    font-weight: 600;
    margin-right: 0;
}

.comment-edit.onedit:hover {
    background: rgba(212, 168, 83, 0.5);
}

/* Quote Button — Glass */
.comment-quote {
    float: left;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 0;
    margin-top: 0;
}

.comment-quote:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--border-glass);
}

#CommentPanel .comment-post-disabled,
#CommentPanel .comment-post-disabled:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.45) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

#CommentPanel .comment-blocked-hint {
    margin-top: 10px;
    color: #d8b16a;
    font-size: 14px;
    text-align: right;
}

/* --- Comment Date --- */
.comment-date {
    font-size: 12px;
    color: var(--text-muted, var(--text-secondary));
}

/* --- Comment Count Header --- */
.comment-length {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    padding: 0 10px;
    margin-bottom: 8px;
}
