/* ===========================
   COMMENT BUTTON
=========================== */

.comment-btn-wrap{
    display:flex;
    justify-content:center;
    margin:20px 0;
}

.comment-btn{
    display:flex;
    align-items:center;
    gap:8px;

    padding:13px 15px;

    border:none;
    border-radius:40px;

    background:linear-gradient(135deg,#0d6efd,#3b82f6);
    color:#fff;

    font-size:15px;
    font-weight:600;

    cursor:pointer;

    transition:.3s;

    box-shadow:0 10px 25px rgba(13,110,253,.25);

    animation:pulse 2s infinite;
    white-space: nowrap;
}

.comment-btn:hover{
    transform:translateY(-2px) scale(1.03);
}

.comment-btn .icon{
    font-size:18px;
    animation:bounce 1.2s infinite;
}

@keyframes pulse{

    0%,100%{
        box-shadow:0 0 0 0 rgba(13,110,253,.45);
    }

    70%{
        box-shadow:0 0 0 16px rgba(13,110,253,0);
    }

}

@keyframes bounce{

    0%,100%{
        transform:translateY(0);
    }

    50%{
        transform:translateY(-3px);
    }

}

/* ===========================
   COMMENT BOX
=========================== */
.comment-container{
    
    margin:10px 0;

    padding:20px 10px;

    background:#fff;

    border:1px solid #e8e8e8;

    border-radius:18px;

    box-shadow:
        0 4px 12px rgba(0,0,0,.04),
        0 12px 30px rgba(0,0,0,.06);

    overflow:hidden;
}
.comment-box{

    display:none;


}

.comment-box.show{

    display:block;

    animation:commentFade .35s ease;

}

@keyframes commentFade{

    from{

        opacity:0;

        transform:translateY(15px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}


@keyframes fade{

    from{
        opacity:0;
        transform:translateY(10px);
    }

    to{
        opacity:1;
        transform:none;
    }

}

/* ===========================
   COMMENT
=========================== */

.comment{

    position:relative;

    padding:10px 0;
    
    transition:.25s;

}
.comment:hover{
    background:#fafcff;
}
.comment:not(:last-child){

    border-bottom:1px solid #f1f1f1;

}

.comment .name{

    display:flex;
    align-items:center;
    gap:8px;

    font-size:16px;
    font-weight:700;

    color:#111;

}

.comment .time{

    font-size:12px;
    color:#888;

    font-weight:400;

}

.comment .text{

    margin:5px 0;

    line-height:1.5;

    color:#333;

    font-size:15px;

    word-break:break-word;

}

/* ===========================
   ACTION BUTTONS
=========================== */

.action{

    display:flex;
    align-items:center;

    gap:18px;

}

.action button{
    display:flex;
    align-items:center;
    gap:5px;

    padding:6px 12px;

    border:1px solid transparent;
    border-radius:50px;

    background:transparent;

    color:#666;

    font-size:13px;
    font-weight:600;

    cursor:pointer;

    transition:all .25s ease;
}

.action button:hover{

    background:#f5f8ff;
    color:#0d6efd;

    border-color:#d7e7ff;

    transform:translateY(-1px);

}

.action button.active{

    background:linear-gradient(135deg,#0d6efd,#3b82f6);

    color:#fff;

    border-color:#0d6efd;

    box-shadow:
        0 4px 12px rgba(13,110,253,.25),
        inset 0 1px 0 rgba(255,255,255,.25);

    transform:translateY(-1px);

}

.action button.active:hover{

    transform:translateY(-2px) scale(1.03);

    box-shadow:
        0 8px 20px rgba(13,110,253,.35),
        inset 0 1px 0 rgba(255,255,255,.3);

}
/* ===========================
   PINNED
=========================== */

.comment.pinned::after{
    content:"📌";
    position:absolute;
    top:18px;
    right:0;
    font-size:18px;
}

/* ===========================
   REPLY
=========================== */

.reply{
    position:relative;
    margin-top: 10px;
    padding-left:20px;
}

.reply::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:18px;
    width:2px;
    background:#e8e8e8;
}


/* Reply Start Dot */

.reply>.comment::before{
    content:"";
    position:absolute;
    left:-20px;
    top:20px;
    width:10px;
    height:2px;
    background:#e8e8e8;
}

.reply>.comment>.reply>.comment>.reply>.comment>.reply>.comment .replyBtn{
    display: none;
}
/* ===========================
   MOBILE
=========================== */

@media(max-width:600px){

    .action{

        gap:12px;

    }

    .action button{

        font-size:12px;

    }

}








/*reply css*/
.reply-form{
    margin-top:8px;

    overflow:hidden;

    animation:replyOpen .25s ease;
}
@keyframes replyOpen{

    from{

        opacity:0;

        transform:translateY(-8px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}
.reply-form textarea{

    width:calc(100% - 22px);
    min-height:70px;

    padding:10px;

    border:1px solid #ddd;
    border-radius:10px;

    resize:vertical;

    outline:none;

}

.reply-action{

    margin-top:8px;

    display:flex;
    justify-content:flex-end;
    gap:10px;

}

.reply-action button{

    padding:8px 16px;

    border:none;
    border-radius:20px;

    cursor:pointer;

}

.cancelReply{

    background:#eee;

}

.sendReply{

    background:#0d6efd;
    color:#fff;

}



/*main comment css*/
.main-comment{
    margin-top:25px;

    padding-top:20px;

    border-top:1px solid #eee;

}

.main-comment textarea{

    width:calc(100% - 26px);
    min-height:90px;

    padding:12px;

    border:1px solid #ddd;
    border-radius:12px;

    resize:vertical;

    outline:none;

    font-size:15px;

}

.main-comment textarea:focus{

    border-color:#0d6efd;

}

.main-comment button{

    margin-top:10px;

    float:right;

    padding:10px 22px;

    border:none;

    border-radius:25px;

    background:#0d6efd;

    color:#fff;

    cursor:pointer;

}

#postComment:disabled,
.sendReply:disabled{
    opacity:.6;
    cursor:not-allowed;
    pointer-events:none;
}

.comment-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;

    margin:0 0 18px;
    padding-bottom:10px;

    font-size:22px;
    font-weight:700;
    color:#222;

    border-bottom:2px solid #f1f1f1;

    position:relative;
}

.comment-title::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-2px;

    width:80px;
    height:3px;

    background:#0d6efd;
    border-radius:10px;
}

.comment-title span:first-child{
    font-size:22px;
    font-weight:700;
}

.comment-title .count{
    background:#0d6efd;
    color:#fff;
    padding:4px 12px;
    border-radius:30px;
    font-size:13px;
}

.no-comment{
    text-align:center;
    padding:40px 20px;
    color:#888;
}

.no-comment h4{
    margin:10px 0 5px;
}





.skeleton{

    pointer-events:none;

}
.sk-head{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
}

.sk-avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    background:#eee;
    position:relative;
    overflow:hidden;
}
.sk-name,
.sk-line{

    border-radius:8px;

    background:#eee;

    position:relative;

    overflow:hidden;

}

.sk-name{

    width:160px;

    height:18px;

    margin-bottom:12px;

}

.sk-line{

    height:14px;

    margin-bottom:10px;

}

.w80{

    width:80%;

}

.w60{

    width:60%;

}

.sk-name::before,
.sk-line::before{

    content:"";

    position:absolute;

    inset:0;

    transform:translateX(-100%);

    background:linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.8),
        transparent
    );

    animation:loading 1.2s infinite;

}

@keyframes loading{

    100%{

        transform:translateX(100%);

    }

}
