/* ===============================
   Tax Bazar AI Chatbot
================================== */

#chat-toggle {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
    z-index: 99999;
    transition: .3s;
}

#chat-toggle:hover {
    transform: scale(1.08);
}

#chat-box {
    position: fixed;
    right: 25px;
    bottom: 95px;
    width: 370px;
    height: 520px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;

    display: none;
    /* ✔ Sirf ye */

    flex-direction: column;

    box-shadow: 0 15px 40px rgba(0, 0, 0, .18);
    z-index: 99999;
}

@keyframes chatOpen {

    0% {
        opacity: 0;
        transform: translateY(20px) scale(.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

/* HEADER */

.chat-header {

    background: linear-gradient(135deg, #0d6efd, #2563eb);

    padding: 16px 18px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    color: #fff;

}

.chat-user {

    display: flex;

    align-items: center;

    gap: 12px;

}

.chat-avatar {

    width: 45px;

    height: 45px;

    border-radius: 50%;

    background: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 22px;

    color: #0d6efd;

}

.chat-header h6 {

    margin: 0;

    font-size: 17px;

    font-weight: 600;

}

.chat-header small {

    opacity: .9;

    font-size: 12px;

}

#close-chat {

    cursor: pointer;

    font-size: 20px;

}

/* BODY */

#chat-body {

    flex: 1;

    overflow-y: auto;

    padding: 15px;

    background: #f5f7fb;

}

#chat-body::-webkit-scrollbar {

    width: 5px;

}

#chat-body::-webkit-scrollbar-thumb {

    background: #c8d1db;

    border-radius: 20px;

}

/* BOT */

.bot-wrapper {

    display: flex;

    gap: 10px;

    margin-bottom: 15px;

    align-items: flex-start;

}

.bot-avatar {

    width: 36px;

    height: 36px;

    border-radius: 50%;

    background: #0d6efd;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #fff;

    flex-shrink: 0;

}

.bot-message {

    background: #fff;

    padding: 12px 15px;

    border-radius: 15px 15px 15px 3px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, .06);

    font-size: 14px;

    line-height: 1.6;

    max-width: 82%;

}

/* USER */

.user-message {

    display: inline-block;

    background: linear-gradient(135deg, #0d6efd, #3b82f6);

    padding: 12px 15px;

    border-radius: 15px 15px 3px 15px;

    color: #fff;

    font-size: 14px;

    max-width: 80%;

    word-break: break-word;

}

/* MESSAGE */

.message {

    margin-bottom: 15px;

}

.message.user {

    text-align: right;

}

.message.bot {

    text-align: left;

}

.msg-time {

    font-size: 11px;

    color: #888;

    margin-top: 4px;

    white-space: nowrap;

}

/* QUICK BUTTON */

.quick-btns {

    padding: 10px;

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    border-top: 1px solid #eee;

    background: #fff;

}

.quick-btns button {

    border: none;

    padding: 7px 12px;

    border-radius: 20px;

    background: #eef4ff;

    color: #0d6efd;

    font-size: 13px;

    cursor: pointer;

    transition: .3s;

}

.quick-btns button:hover {

    background: #0d6efd;

    color: #fff;

}

/* EXTRA */

.chat-extra {

    padding: 10px;

    border-top: 1px solid #eee;

    background: #fff;

}

/* FOOTER */

.chat-footer {

    display: flex;

    border-top: 1px solid #eee;

    background: #fff;

}

.chat-footer input {

    flex: 1;

    border: none;

    outline: none;

    padding: 15px;

    font-size: 14px;

}

.chat-footer button {

    width: 60px;

    border: none;

    background: #0d6efd;

    color: #fff;

    cursor: pointer;

    transition: .3s;

}

.chat-footer button:hover {

    background: #0b5ed7;

}

/* TYPING */

.typing {

    display: flex;

    gap: 5px;

    background: #fff;

    padding: 12px;

    border-radius: 10px;

    width: 60px;

    margin-bottom: 15px;

}

.typing span {

    width: 8px;

    height: 8px;

    background: #0d6efd;

    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%,
    100% {
        transform: translateY(0);
        opacity: .4;
    }

    50% {
        transform: translateY(-6px);
        opacity: 1;
    }

}

/* MOBILE */

@media(max-width:576px) {

    #chat-box {

        left: 10px;

        right: 10px;

        width: auto;

        height: 80vh;

        bottom: 85px;

    }

    #chat-toggle {

        right: 15px;

        bottom: 15px;

    }

}