/**
 * Rating Comments CSS
 * Wiederverwendbare Styles für Rating-Kommentare
 *
 * Verwendung:
 * <link rel="stylesheet" href="{% static 'assets/css/rating-comments.css' %}">
 */

/* Comment Container */
.comment {
    position: relative;
    width: 100%;
}

.comment__row {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.comment__meta {
    margin-bottom: 0.5rem;
}

.comment__body {
    flex: 1;
    width: 100%;
}

.comment__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Comment Children (Replies) */
.comment__children {
    margin-left: 2.5rem;
    margin-top: 1rem;
    padding-left: 1rem;
    /* Thread-Rail entfernt (passt zur view.html Vorlage) */
    /* border-left: 2px solid #e9ecef; */
}

.comment__children-list {
    margin-top: 1rem;
}

.comment--reply {
    margin-bottom: 1rem;
}

.comment--load-more {
    margin-top: 1rem;
}

/* Thread Toggle Button */
.thread-toggle-combined {
    cursor: pointer;
    background: transparent;
    transition: all 0.2s ease;
}

.thread-toggle-combined:hover {
    opacity: 0.7;
}

.thread-toggle-combined .toggle-icon {
    transition: transform 0.2s ease;
}

.thread-toggle-combined .toggle-icon.rotated {
    transform: rotate(90deg);
}

/* Icon Hover Effects */
.icon-hover-group {
    position: relative;
    transition: all 0.2s ease;
}

.icon-hover-group .icon-default {
    display: inline;
}

.icon-hover-group .icon-hover {
    display: none;
}

.icon-hover-group:hover .icon-default {
    display: none;
}

.icon-hover-group:hover .icon-hover {
    display: inline;
}

/* Forms - minimalistisch ohne Styling */
form.reply-form,
form.edit-form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

form.reply-form textarea,
form.edit-form textarea {
    resize: vertical;
    min-height: 60px;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Rating Replies Container */
.rating-replies {
    margin-top: 1rem;
    /* Keine horizontale Linie und kein padding-top */
}

/* User Avatar */
.user-avatar {
    flex-shrink: 0;
}

/* Edited Label */
.edited-label {
    font-style: italic;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Action Links */
.comment__actions a,
.comment__actions button {
    cursor: pointer;
    font-size: 0.875rem;
}

.comment__actions a:hover,
.comment__actions button:hover {
    text-decoration: underline;
}

/* Expert Badge */
.badge.bg-info {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comment__children {
        margin-left: 1rem;
        padding-left: 0.5rem;
    }

    .comment__actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .comment__children {
        border-left-color: #495057;
    }

    .rating-replies {
        border-top-color: #495057;
    }
}

/* Accessibility - Focus-Outline für interaktive Elemente entfernen */
.comment__actions a:focus,
.comment__actions button:focus,
.comment-like-dislike-container button:focus,
.htmx-replies-toggle:focus {
    outline: none;
    box-shadow: none;
}

/* Animation for showing/hiding elements */
.d-none {
    display: none !important;
}

/* Smooth transitions */
.comment,
.reply-form,
.edit-form {
    transition: opacity 0.2s ease;
}

/* Empty State */
.text-center.py-4.text-muted {
    padding: 2rem 1rem;
}

.text-center.py-4.text-muted i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Rating Item Hover Actions */
.rating-item-container .rating-hover-action {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.rating-item-container:hover .rating-hover-action {
    opacity: 1;
}

/* Rating Item Footer Icons - einheitliche Größe */
.rating-item-container .rating-like-dislike-container i,
.rating-item-container .rating-hover-action i,
.rating-item-container .report-rating-trigger i,
.rating-item-container > div > div > span.text-muted i {
    font-size: 1rem;
}

/* Like/Dislike Buttons - gleiche Größe wie andere Footer-Elemente */
.rating-item-container .rating-like-dislike-container button.btn-link {
    font-size: 0.875rem;
    line-height: 1.5;
}

.rating-item-container .rating-like-dislike-container button.btn-link i {
    font-size: 1rem;
}
