/* Container for the comments section */
.comments-container {
    margin-top: 15px;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
}

/* Individual comment styling */
.comment {
    padding: 8px;
    margin-bottom: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
    position: relative;
}

/* Truncated text style */
.comment.truncated {
    max-height: 3em; /* Adjust for the number of lines you want */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Comment footer with metadata */
.comment-footer {
    display: flex;
    justify-content: flex-end; /* Aligns items to the right */
    gap: 5px;
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}

.comment-footer .icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.likes-count {
    align-self: center; /* Keeps like count aligned vertically with icons */
}

/* Expand button style */
.expand-button {
    color: #007bff;
    cursor: pointer;
    font-weight: bold;
}

/* Add transition for smooth text expansion */
.comments-container .comment {
    transition: max-height 0.2s ease;
}

/* Full text display (expanded view) */
.comment.expanded {
    white-space: normal;
    overflow: visible;
}


/* Overlay background */
.comment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Ensures it appears on top */
}

/* Modal container */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* Above the overlay */
    width: 80%;
    max-width: 400px;
}

/* Modal title */
.modal h3 {
    margin-top: 0;
}

/* Comment input area */
.comment-input {
    width: 100%;
    height: 80px;
    margin: 10px 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
}

.comment-button-container {
    display: flex;
    justify-content: flex-end; /* Aligns buttons to the right */
    gap: 10px; /* Adds spacing between buttons */
    margin-top: 15px;
}

/* Optional button styling */
.comment-button-container button {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
}

/* Buttons */
.modal button {
    margin-top: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal button:first-of-type {
    background: #f0f0f0;
    margin-right: 10px;
}

.modal button:last-of-type {
    background: #007bff;
    color: white;
}
