.comment-section {
    background-color: #16171ad0;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    gap: 10px; /* space between messages */
    max-height: 400px; /* adjust as necessary */
    overflow-y: auto; /* allows scrolling */
    margin-bottom: 50px;
}

.comment {
    display: flex;
    margin-left: 10px;
    margin-right: 10px;
    flex-direction: column;
    align-items: flex-start; /* aligns the comment blocks to the end side */
    margin-bottom: 4px;
}

.comment.user {
    align-items: flex-start; /* aligns user comments to the left */
}

.comment.editor {
    align-items: flex-end; /* aligns editor/author comments to the right */
}

.comment-header {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 4px; /* gives space between header and body */
}

.comment.user .comment-header {
    align-items: flex-start; /* aligns the user's header to the left */
}

.comment.editor .comment-header {
    align-items: flex-end; /* aligns the editor's header to the right */
}

.comment-header .name,
.comment-header .title {
    margin: 0; /* removes margin */
    display: block; /* allows for individual line breaks */
}

.comment.user .comment-header .name {
    margin-left: 10px;
}

.comment.editor .comment-header .name {
    margin-right: 10px;
}

.name {
    font-weight: bold;
    color: #FFF; /* Adjust as needed */
}

.title {
    font-style: italic;
    color: #FF4D4D;
}

.comment-body {
    border-radius: 15px;
    word-wrap: break-word;
    display: flex;
    overflow: hidden; /* ensures the background doesn't leak outside the border-radius */
    margin-top: 4px; /* gives space between header and body */
}

.comment-text {
    padding: 8px;
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.profile-image {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px; /* spacing between image and text for user */
    margin-left: 0; /* for editor, image is on the right */
}

.comment.user .comment-body {
    background-color: #f0f0f0;
    color: #333;
    align-self: flex-start;
}

.comment.editor .comment-body {
    background-color: #FF4D4D; /* Editor's comment bubble color */
    color: white;
    align-self: flex-end;
}

.comment.editor .comment-text {
    flex-direction: row-reverse; /* for placing image on the right */
}

.comment.editor .profile-image {
    margin-left: 10px; /* spacing between image and text for editor */
    margin-right: 0;
}

#comment-section{width:90%;margin:auto;}
#input-section{display:flex;flex-direction:column;align-items:flex-start;}
.fields{display:flex;justify-content:space-between;margin-bottom:20px;gap:20px;}
#comments{color:white;}
.fields button{width:100%;padding:10px;background-color:#ff8800;border:none;border-radius:5px;cursor:pointer;}
#input-section #animal,#input-section #post-comment,#input-section #toggle-comments,#input-section #toggle-refresh{width:100%;margin:5px 0;font-weight:bold;padding:10px;border-radius:5px;}
#toggle-refresh{font-size:1.7em;}
#input-section #animal{background-color:#1F2738;border:transparent;color:white;}
#input-section #comment{width:100%;min-height:100px;resize:vertical;margin:5px 0;padding:10px;border-radius:5px;}
#input-section #post-comment{background-color:#ff8800;border:none;border-radius:5px;cursor:pointer;}
.comment{background-color:#1F2738;padding:10px;margin-top:10px;border-radius:5px;border:transparent;color:white;text-align:left;}
.comment strong{color:rgb(255,119,0);}
#comment{background-color:#1F2738;padding:10px;margin-top:10px;border-radius:5px;border:transparent;color:white;text-align:left;}
.comment.right-align{text-align:right;}
#pagination{justify-content:center;}
#pagination button{background-color:transparent;border:none;color:white;font-weight:bold;cursor:pointer;font-size:1.5em;margin-bottom:10px;}
#pagination button:hover{color:rgb(255,119,0);}