/* Mobile Comments Styles */
@media (max-width: 768px) {

    /* Container adjustments */
    .comments-section {
        padding: 0 10px;
    }

    /* Force container to allow simple flex column layout */
    .comment {
        padding: 12px 0 12px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: 12px !important;
        position: relative !important;
        /* Prevent hover jumps */
        transition: none !important;
    }

    .comment:hover {
        padding: 12px 0 12px 0 !important;
        background: transparent !important;
        transform: none !important;
    }

    /* Remove excessive indentation for replies on mobile to save space */
    .reply-comment {
        margin-left: 0 !important;
        padding-left: 0 !important;
        border-left: none !important;
    }

    /* RESET container spacing to prevent accumulation */
    .tgrenply,
    .replies-container {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Shallow indentation for ALL replies (Flat Nesting) */
    .replies-container .comment,
    .replies-container .replies-container .comment {
        padding-left: 20px !important;
        /* "Un poco a la derecha" */
    }

    /* User Avatar */
    .user-avatar {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        border: none !important;
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
        /* Fix for mobile clipping artifacts */
        clip-path: circle(50%) !important;
        -webkit-clip-path: circle(50%) !important;
        z-index: 10 !important;
        isolation: isolate;
        transform: translateZ(0);
        box-shadow: none !important;
        flex-shrink: 0 !important;
        /* Never shrink */
    }

    /* Content Area */
    .comment-content {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: calc(100% - 40px) !important;
        /* Leave space for like btn */
        padding-right: 35px !important;
        padding-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        min-height: 40px !important;
    }

    /* Header: Username + Date */
    .comment-header-info {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin-bottom: 2px !important;
        flex-wrap: wrap !important;
    }

    .username {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #e1e1e1 !important;
        line-height: normal !important;
    }

    .mod-badge,
    .reply-indicator {
        font-size: 10px !important;
        padding: 1px 4px !important;
        border-radius: 4px !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    /* Comment Text */
    .comment-text {
        color: #fff !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin: 0 0 6px 0 !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }

    /* Actions: Reply, etc */
    .comment-actions {
        display: flex !important;
        gap: 16px !important;
        align-items: center !important;
        font-size: 12px !important;
        color: #888 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .action-btn {
        background: none !important;
        border: none !important;
        color: #888 !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        padding: 0 !important;
        cursor: pointer !important;
        margin: 0 !important;
    }

    /* Like Button - Absolute positioned TOP RIGHT of .comment container */
    .like-btn {
        position: absolute !important;
        top: 15px !important;
        right: 0 !important;
        left: auto !important;
        bottom: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        color: #888 !important;
        gap: 2px !important;
        width: 30px !important;
        margin: 0 !important;
    }

    .like-btn i {
        font-size: 18px !important;
    }

    .like-btn .like-count {
        font-size: 10px !important;
    }

    .like-btn.active {
        color: #fe2c55 !important;
        animation: heart-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .like-btn.active i::before {
        content: "\f004";
        font-weight: 900;
    }

    /* Reply Toggle Button */
    .toggle-replies-btn {
        margin-left: 45px !important;
        /* Align with text path (approx avatar width + gap) */
        padding: 8px 0 !important;
        width: auto !important;
        text-align: left !important;
        color: #888 !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        transform: translateZ(0);
    }

    .toggle-replies-btn:hover,
    .toggle-replies-btn:focus {
        background: none !important;
        padding: 8px 0 !important;
    }

    .toggle-replies-btn::before {
        display: none !important;
    }

    /* Input Area - Sticky Bottom if desired, or just cleaner */
    /* Check actual ID/Class for the main input container */
    #comment-form-container {
        /* Optional: make it sticky or just cleaner padding */
        padding: 10px;
        background: #1a1a1a;
        /* Match theme */
    }
}

@keyframes heart-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}