/* Comments panel */

article.comments-panel{

    background:#fff;

}

article.comments-panel #comments{

    padding:0;

}


/* Comment editor */

.comment-editor-title,.comment-list-title{

    margin:100px 0 1rem;

    padding-bottom:.4rem;

    border-bottom:1px solid #e5e5e5;

}

.comment-write{

    padding:1rem 1.2rem;

    margin-bottom:1rem;


}

.comment-user{

    margin-bottom:.8rem;

    padding:.5rem .75rem;

    background:#f8f8f8;

    border-left:4px solid #888;

    color:#555;

    font-size:.95rem;

}

.comment-user strong{

    color:#222;

    margin-right:.4rem;

}

.comment-user-input{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:.75rem;

    margin-bottom:.75rem;

}

.comment-write input{

    width:100%;

    padding:.65rem .8rem;

    border:1px solid #d8d8d8;

    font:inherit;

}

.comment-write textarea{

    width:100%;

    min-height:140px;

    padding:.8rem;

    border:1px solid #d8d8d8;

    line-height:1.7;

    font:inherit;

    resize:vertical;

}


.comment-write button{

    display:block;
    margin-left:auto;
    padding:.4rem;

    background:#fff;

    border:1px solid #bbb;

    font:inherit;

    cursor:pointer;

}

/* Reply form styles */

.reply-info{

    display:flex;
    justify-content:space-between;
    align-items:center;

    margin-bottom:1rem;
    padding:.7rem 1rem;

    background:#f5f5f5;
    border-left:4px solid #888;

}

.reply-info.hidden{

    display:none;

}

.reply-info button{

    background:none;
    border:none;

    font:inherit;
    color:#666;
    cursor:pointer;

}

.reply-info button:hover{

    text-decoration:underline;

}

.reply{

    display:grid;

    grid-template-columns:1.5rem 1fr;
    column-gap:.75rem;

    margin-left:1rem;

}

.reply-mark{

    font-size:1.15rem;

    color:#000;

    line-height:2.2rem;

    text-align:center;

}

.reply-body{

    min-width:0;

}

.reply .comment-content{

    position:relative;

    background:#fcfcfc;

}


/* Comment list */

.comment{
    border-bottom:1px solid #ddd;
    padding:1.2rem 0;
    margin-inline: 2rem;
}

.comment-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:.8rem;
}

.comment-author{

    font-weight:600;

}

.comment-author a{

    color:inherit;

    text-decoration:none;

}

.comment-author a:hover{

    text-decoration:underline;

}

.comment-date{

    color:#888;
    font-size:.9rem;

}

.comment-edited{

    margin-left:.4rem;

    color:#999;
    font-style:italic;

}

.comment-content{

    margin:.8rem 0 1rem;
    padding:0.75rem;

    background:#fafafa;
    border:1px solid #e6e6e6;
    border-radius:4px;


    white-space: pre-wrap;
    overflow-wrap: anywhere;
    
}

.comment-footer{

    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:1rem;

}

.comment-options{

    min-height:1.5rem;

}

.comment-secret{

    display:flex;
    align-items:center;
    gap:.5rem;

    white-space: nowrap;

}

.comment-secret-message{

    display:flex;
    flex-direction:column;

    align-items:center;

    justify-content:center;

    gap:.6rem;
    padding-block:.8rem;

    text-align:center;

    color:#666;
    line-height:1.6;
    font-style:italic;

}
.comment-secret-message button{

    margin-top:.8rem;
    padding: .4rem;

}

/* Comment action buttons */

.comment-actions{

    display:flex;
    justify-content:space-between;
    align-items:center;

    margin-top:.6rem;

    padding-inline:1.25rem;

}

.comment-actions button{
    background:none;
    border:none;
    padding:0;

    font:inherit;
    font-size:.9rem;
    color:#666;

    cursor:pointer;
}

.comment-actions button:hover{
    color:#000;
    text-decoration:underline;
}

.comment-owner-actions{

    display:flex;
    gap:.6rem;

}


.comment.deleted{

    opacity:.8;

}

.comment.deleted .comment-content{

    color:#777;

    font-style:italic;

}



/* Edit area styles */

.edit-area{

    margin-top: .5rem;

}

.edit-area textarea{

    width:100%;

    min-height:100px;

    box-sizing:border-box;

}

.edit-buttons{
    display:flex;
    justify-content:flex-end;
    gap:.5rem;
    margin-top:.5rem;
}

.edit-buttons button{
    padding:.35rem .8rem;
}

/* Pagination */

.comment-pagination{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:.5rem;

    margin:2rem 0;

    flex-wrap:wrap;

}

.comment-page-button{

    padding:0 .3rem;

    border:none;

    background:none;

    color:#555;

    font:inherit;

    cursor:pointer;

    letter-spacing:-0.15em;

}

.comment-page-button:hover:not(:disabled):not(.current){

    text-decoration:underline;

}

.comment-page-button.current{

    font-weight:bold;

    color:#000;

}

.comment-page-button.current::before{

    content:"[";

    margin-right:.05rem;

}

.comment-page-button.current::after{

    content:"]";

    margin-left:.05rem;

}

.comment-page-button:disabled{

    color:#ccc;

    cursor:default;

}

/* badge styles */

.owner-badge,
.member-badge{
    display:inline-block;
    margin-left:.4em;
    padding:.1em .5em;
    border-radius:999px;
    font-size:.72rem;
    font-weight:600;
    line-height:1.4;
}

.owner-badge{
    background:#b91c1c;
    color:#fff;
}

.member-badge{
    background:#2563eb;
    color:#fff;
}

@media (max-width:768px){

    .comment{

    margin-inline: 0;
}

    .comment-content{

        padding:.85rem .9rem;

}
    

    .comment-actions{

        padding-inline: 0;

    }

    .comment-page-button{

        padding:0 .1rem;

    }

}