/* ============================================================
   МОДУЛЬ КОММЕНТАРИЕВ - ИСПРАВЛЕННЫЕ СТИЛИ
   ============================================================ */

/* OVERLAY */
.comments-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* КОНТЕЙНЕР */
.comments-modal-container {
    background: #ffffff !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 650px !important;
    max-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ШАПКА */
.comments-modal-header {
    padding: 16px 20px !important;
    border-bottom: 1px solid #e4e6eb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important;
    background: #fafafa !important;
}

.comments-modal-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.comments-total-count {
    color: #65676b !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.comments-close-btn {
    background: #f1f3f5 !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 22px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #65676b !important;
    padding: 0 !important;
}

/* СПИСОК */
.comments-list {
    padding: 20px !important;
    overflow-y: auto !important;
    flex: 1 !important;
    min-height: 200px !important;
    max-height: 500px !important;
    background: #ffffff !important;
}

.comments-list-empty {
    text-align: center !important;
    color: #65676b !important;
    padding: 40px 20px !important;
}

/* КОММЕНТАРИЙ */
.comment-item {
    display: flex !important;
    gap: 12px !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #f0f2f5 !important;
}

.comment-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    background: #e4e6eb !important;
}

.comment-body {
    flex: 1 !important;
    min-width: 0 !important;
}

.comment-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
    flex-wrap: wrap !important;
}

.comment-author {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
}

.comment-date {
    color: #65676b !important;
    font-size: 11px !important;
}

.comment-content {
    margin: 0 !important;
    font-size: 14px !important;
    color: #1c1e21 !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
}

.comment-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 4px !important;
}

.comment-action-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 12px !important;
    padding: 2px 4px !important;
    color: #65676b !important;
}

.comment-replies {
    margin-left: 52px !important;
    border-left: 2px solid #e4e6eb !important;
    padding-left: 12px !important;
}

/* ФОРМА */
.comments-form {
    padding: 16px 20px !important;
    border-top: 1px solid #e4e6eb !important;
    background: #f7f8fa !important;
    flex-shrink: 0 !important;
}

.comments-form-inner {
    display: flex !important;
    gap: 12px !important;
}

.comments-input {
    flex: 1 !important;
    padding: 10px 16px !important;
    border: 1px solid #ccd0d5 !important;
    border-radius: 24px !important;
    font-size: 14px !important;
    background: #ffffff !important;
    color: #1c1e21 !important;
    outline: none !important;
}

.comments-submit-btn {
    padding: 10px 20px !important;
    background: #1877f2 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 24px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
}

/* ИНДИКАТОР ОТВЕТА */
.comments-reply-indicator {
    display: none !important;
    background: #e7f3ff !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    font-size: 13px !important;
    color: #1877f2 !important;
}

.comments-reply-indicator.active {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* ГОСТЬ */
.comments-guest {
    text-align: center !important;
    padding: 10px !important;
    color: #65676b !important;
}

.comments-guest a {
    color: #1877f2 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ============================================================ */
@media (max-width: 768px) {
    .comments-modal-overlay {
        padding: 0 !important;
        background: rgba(0, 0, 0, 0.6) !important;
    }

    .comments-modal-container {
        border-radius: 16px 16px 0 0 !important;
        max-height: 95vh !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .comments-modal-header {
        padding: 14px 16px !important;
    }

    .comments-list {
        padding: 16px !important;
        max-height: none !important;
    }

    .comments-form {
        padding: 12px 16px !important;
    }
}

@media (max-width: 480px) {
    .comments-modal-title {
        font-size: 15px !important;
    }

    .comment-avatar {
        width: 32px !important;
        height: 32px !important;
    }

    .comment-content {
        font-size: 13px !important;
    }

    .comment-replies {
        margin-left: 28px !important;
        padding-left: 6px !important;
    }
}