﻿/* ===========================
   EzeeLab AI Chat
===========================*/

#ez-ai-btn {
    position: fixed;
    right: 10px;
    bottom: 20%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0d6efd;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,.25);
    z-index: 999999;
    transition: .3s;
    animation: pulse 2s infinite;
}

    #ez-ai-btn:hover {
        transform: scale(1.08);
    }

    #ez-ai-btn img {
        width: 38px;
        height: 38px;
    }

@keyframes pulse {

    0% {
        box-shadow: 0 0 0 0 rgba(13,110,253,.5);
    }

    70% {
        box-shadow: 0 0 0 18px rgba(13,110,253,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(13,110,253,0);
    }
}

/*========================*/

#ez-ai-chat {
    position: fixed;
    right: 25px;
    bottom: 100px;
    width: 390px;
    height: 550px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: none;
    z-index: 999999;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
}

/*========================*/

.ez-header {
    height: 70px;
    background: linear-gradient(90deg,#0d6efd,#2563eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    color: white;
}

    .ez-header img {
        background: white;
        padding: 5px;
        border-radius: 10px;
    }

    .ez-header b {
        font-size: 18px;
    }

    .ez-header small {
        font-size: 12px;
    }

#closeChat {
    cursor: pointer;
    font-size: 22px;
}

/*========================*/

#ez-chat-body {
    height: 400px;
    overflow-y: auto;
    background: #f7f8fc;
    padding: 15px;
    scroll-behavior: smooth;
}

/*========================*/

.ai-message {
    background: white;
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 85%;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    font-size: 14px;
    line-height: 24px;
}

.user-message {
    background: #0d6efd;
    color: white;
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 85%;
    margin-left: auto;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 24px;
}

/*========================*/

.ez-footer {
    display: flex;
    padding: 12px;
    gap: 10px;
    background: white;
    border-top: 1px solid #eee;
}

    .ez-footer input {
        height: 45px;
        border-radius: 25px;
    }

    .ez-footer button {
        border-radius: 25px;
        padding-left: 25px;
        padding-right: 25px;
    }

/*========================*/

.typing {
    display: flex;
    gap: 5px;
    padding: 12px;
    background: white;
    width: 70px;
    border-radius: 20px;
    margin-bottom: 15px;
}

    .typing span {
        width: 8px;
        height: 8px;
        background: #999;
        border-radius: 50%;
        animation: typing .8s infinite;
    }

        .typing span:nth-child(2) {
            animation-delay: .2s;
        }

        .typing span:nth-child(3) {
            animation-delay: .4s;
        }

@keyframes typing {

    0% {
        opacity: .2;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px);
    }

    100% {
        opacity: .2;
        transform: translateY(0);
    }
}

/*========================*/

.quick-btn {
    display: inline-block;
    padding: 8px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 13px;
    margin: 4px;
    cursor: pointer;
    transition: .3s;
}

    .quick-btn:hover {
        background: #0d6efd;
        color: white;
    }

/*========================*/

@media(max-width:768px) {

    #ez-ai-chat {
        width: 100%;
        height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    #ez-chat-body {
        height: calc(100% - 140px);
    }
}
