/* static/css/comments.css */
.error-messages {
    color: #d9534f;
    background: #f2dede;
    border: 1px solid #ebccd1;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

.upvote-btn, .downvote-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    margin: 0 5px;
    transition: transform 0.2s ease-in-out;
}

.upvote-btn:hover {
    color: #4caf50;
    transform: translateY(-2px);
}

.downvote-btn:hover {
    color: #d9534f;
    transform: translateY(-2px);
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.voted-up {
    color: green;
    font-weight: bold;
}

.voted-down {
    color: red;
    font-weight: bold;
}

.active-vote {
    color: green;
    font-weight: bold;
}

.comment {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    padding: 10px;
    overflow: hidden;
    width: 100%;
    transition: box-shadow 0.2s ease-in-out;
}

/* Hover effect for comments */
.comment:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Styling for the comment header */
.comment-header strong { font-weight: bold; color: #333; }

.comment-body p {
    font-size: 0.8rem; color: #555; line-height: 1.5;
}

.comment-footer {
    display: flex;
    font-size: 0.9em;
    margin-top: 10px;
    align-items: center;
    gap: 15px;
}

.small-button {
    border: none;
    border-radius: 5px;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.small-button:hover {
    background: #e1e1e1;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

/* Styling for the comment body */
.comment-body {
    flex-grow: 1;
    padding: 8px 0;
    font-size: 0.8rem;
    color: #555;
    line-height: 0.5;
}

/* Active vote styling */
.upvote-btn.active {
   color: #4caf50;
}

.downvote-btn.active {
    color: #f44336;
}

.small-button {
    font-size: 0.8rem;
}

button.small-button:hover {
    transform: scale(1.2);
}

@media (max-width: 600px) {
    .comment-footer {
        flex-wrap: wrap;
        gap: 5px;
    }
}

button:focus {
    outline: none;
    box-shadow: none;
}

.reply-form-container {
    display: none;
    margin-top: 1rem;
    width: 100%;
}

.reply-form-container form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reply-form-container textarea {
    min-height: 100px;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    font-family: inherit;
}

.reply {
    background: #f9f9f9;
    padding: 5px;
    margin-bottom: 5px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Reply link styling */
.reply-link, .show-replies-link { color: #007bff; cursor: pointer; font-size: 0.8rem; }
.reply-link:hover, .show-replies-link:hover { text-decoration: underline; }

/* Styling for replies */
.replies {
    margin-left: 30px;
    border-left: 2px solid #ddd;
    padding-left: 10px;
    margin-top: 5px;
}

.comment-reply {
    border-left: 2px solid #ddd; padding-left: 10px; margin-top: 5px;
}

.show-replies {
    color: #0066cc;
    cursor: pointer;
    text-decoration: underline;
}
.show-replies-link:hover {
    text-decoration: underline;
}
.comment-reply {
    border-left: 2px solid #ddd;
    padding-left: 10px;
    margin-top: 5px;
}

.show-replies-link {
    color: blue;
    cursor: pointer;
}

.vote-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateX(120%);
    opacity: 0;
    transition:
        transform 0.3s ease-out,
        opacity 0.3s ease;
    z-index: 1000;
    font-size: 14px;
    border-left: 3px solid #ff4444;
}

.vote-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.comment-container.active-reply {
    border-left: 3px solid #4CAF50;
    padding-left: 10px;
    transition: all 0.3s ease;
}
/* Existing replies container styling */
.replies-container {
    border-left: 2px solid #eee;
    padding-left: 1rem;
    margin-left: 2rem;
}

.total-comments {
    transition: all 0.3s ease;
}

.total-comments.updating {
    color: #4CAF50;
    transform: scale(1.1);
}

html {
  scroll-behavior: smooth;
}

/* Better focus states for accessibility */
:focus {
  outline: 2px solid #3273dc;
  outline-offset: 2px;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}

.pagination {
    margin-top: 2rem;
}
.pagination-list {
    display: flex;
    list-style: none;
    padding-left: 0;
    justify-content: center;
    flex-wrap: wrap;
}
.pagination-link {
    padding: 0.5rem 0.75rem;
    margin: 0.25rem;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    color: #3273dc;
    text-decoration: none;
}
.pagination-link.is-current {
    background-color: #3273dc;
    color: white;
    border-color: #3273dc;
}
.pagination-link:hover {
    background-color: #f5f5f5;
}