/**
 * WG Comments - Comments Display Styles
 * Modernes, schickes Design für Kommentare mit Voting
 *
 * @package WG_Comments
 * @version 1.0.0
 */

/* ===========================
   Comments Section
   =========================== */

.wgc-comments-section {
    margin: 40px 0;
    padding: 0;
}

.wgc-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.wgc-comments-title {
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    margin: 0;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   Single Comment - Modern Card
   =========================== */

.wgc-comment {
    position: relative;
    margin-bottom: 24px;
}

.wgc-comment-body {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.wgc-comment-body:hover {
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
}

/* Replies - Children Container */
.wgc-comment-children {
    margin-left: 40px;
    margin-top: 16px;
    padding-left: 20px;
    border-left: 3px solid #e9ecef;
    position: relative;
}

.wgc-comment-children::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    width: 3px;
    height: 40px;
    background: linear-gradient(to bottom, #8b5cf6, transparent);
}

/* Nested Reply Styling */
.wgc-comment-children > .wgc-comment .wgc-comment-body {
    background: #f8f9fa;
    border-left: 3px solid #8b5cf6;
}

/* Depth indicators */
.wgc-comment-children .wgc-comment-children {
    border-left-color: #d1d5db;
}

.wgc-comment-children .wgc-comment-children .wgc-comment-children {
    border-left-color: #c7cdd4;
}

/* Reply indicator badge */
.wgc-comment-children > .wgc-comment::before {
    content: '↳ Antwort';
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #8b5cf6;
    background: #f3f0ff;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    margin-left: 24px;
}

/* ===========================
   Comment Header
   =========================== */

.wgc-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.wgc-comment-author-info {
    display: flex;
    gap: 14px;
    flex: 1;
}

.wgc-comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
}

.wgc-comment-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wgc-comment-author {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wgc-author-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wgc-comment-date {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wgc-edited-badge {
    display: inline-flex;
    color: #adb5bd;
}

/* ===========================
   Three-Dots Menu - Funktional
   =========================== */

.wgc-comment-actions {
    position: relative;
}

.wgc-comment-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.wgc-comment-menu-btn:hover {
    background: #8b5cf6;
    color: #ffffff;
    border-color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.wgc-comment-menu-btn svg {
    width: 22px;
    height: 22px;
}

.wgc-comment-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.wgc-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #212529;
    font-size: 14px;
    font-weight: 500;
}

.wgc-menu-item:hover {
    background: #f8f9fa;
    color: #8b5cf6;
}

.wgc-menu-item svg {
    flex-shrink: 0;
    color: #6c757d;
}

.wgc-menu-item:hover svg {
    color: currentColor;
}

.wgc-menu-item.wgc-edit-btn:hover {
    background: #f0f4ff;
    color: #8b5cf6;
}

.wgc-menu-item.wgc-delete-btn:hover {
    background: #fff5f5;
    color: #ef4444;
}

/* ===========================
   Comment Content
   =========================== */

.wgc-comment-content {
    font-size: 15px;
    line-height: 1.7;
    color: #212529;
    margin-bottom: 16px;
}

.wgc-comment-content p {
    margin: 0 0 12px 0;
}

.wgc-comment-content p:last-child {
    margin-bottom: 0;
}

.wgc-comment-content a {
    color: #8b5cf6;
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    transition: all 0.2s ease;
}

.wgc-comment-content a:hover {
    border-bottom-color: #8b5cf6;
}

/* ===========================
   Comment Footer - Actions Row
   =========================== */

.wgc-comment-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f3f5;
}

.wgc-comment-actions-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Direct Reply Button */
.wgc-reply-btn,
.comment-reply-link {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #8b5cf6;
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    text-decoration: none;
    visibility: visible !important;
    opacity: 1 !important;
}

.wgc-reply-btn:hover,
.comment-reply-link:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    color: white !important;
}

.wgc-reply-btn:active,
.comment-reply-link:active {
    transform: translateY(0);
}

.wgc-reply-btn svg {
    flex-shrink: 0;
}

/* Cancel Reply Link */
#cancel-comment-reply-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

#cancel-comment-reply-link:hover {
    background: #e9ecef;
    color: #495057;
}

/* ===========================
   Vote Container - Horizontal (Compact)
   =========================== */

.wgc-vote-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.wgc-vote-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
}

.wgc-vote-btn:hover {
    background: #ffffff;
    transform: scale(1.05);
}

/* Vote Up */
.wgc-vote-up {
    border-color: rgba(16, 185, 129, 0.3);
}

.wgc-vote-up:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: #10b981;
    color: #10b981;
}

.wgc-vote-up.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.wgc-vote-up.active svg {
    animation: voteUp 0.3s ease;
}

@keyframes voteUp {
    0% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}

/* Vote Down */
.wgc-vote-down {
    border-color: rgba(239, 68, 68, 0.3);
}

.wgc-vote-down:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
    color: #ef4444;
}

.wgc-vote-down.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.wgc-vote-down.active svg {
    animation: voteDown 0.3s ease;
}

@keyframes voteDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(4px); }
    100% { transform: translateY(0); }
}

.wgc-vote-count {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    text-align: center;
}

/* ===========================
   Comments Closed
   =========================== */

.wgc-comments-closed {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 16px;
    color: #6c757d;
}

.wgc-comments-closed svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
    .wgc-comment-children {
        margin-left: 16px;
        padding-left: 12px;
    }

    .wgc-comment-avatar img {
        width: 36px;
        height: 36px;
    }

    .wgc-comment-body {
        padding: 16px;
    }

    .wgc-comment-actions-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .wgc-vote-container {
        order: 1;
    }

    .wgc-reply-btn {
        order: 2;
    }

    /* Limit nesting on mobile */
    .wgc-comment-children .wgc-comment-children .wgc-comment-children {
        margin-left: 8px;
        padding-left: 8px;
    }
}

/**
 * Dateiname: wgc-comments.css
 * Pfad: /wp-content/plugins/wg-comments/assets/css/wgc-comments.css
 *
 * Features:
 * ✅ Modernes Card-Design für Kommentare
 * ✅ Vertikale Vote-Buttons (Daumen hoch/runter)
 * ✅ Prominenter "Direkt antworten" Button
 * ✅ Funktionales Drei-Punkte-Menü
 * ✅ Schicke Hover-Effekte und Animationen
 * ✅ Eingerückte Antworten mit visueller Markierung
 * ✅ Responsive Design
 */
