/* =========================================
   ZETTAHIRES CHATBOT
========================================= */

#zh-chatbot {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    font-family: "Poppins", sans-serif;
}


/* =========================================
   CHAT BUTTON
========================================= */

#zh-chatbot-toggle {
    width: 58px;
    height: 58px;

    border: 0;
    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #5b4df8,
        #7c3aed
    );

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(91, 77, 248, 0.28);

    transition: all 0.25s ease;
}

#zh-chatbot-toggle:hover {
    transform: translateY(-3px) scale(1.03);
}

.zh-chatbot-icon {
    font-size: 24px;
    line-height: 1;
}


/* =========================================
   CHAT WINDOW
========================================= */

.zh-chatbot-window {
    position: absolute;

    right: 0;
    bottom: 72px;

    width: 370px;
    height: 560px;

    background: #ffffff;

    border: 1px solid #e8e8f2;

    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0 20px 60px rgba(25, 20, 60, 0.16);

    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(15px)
        scale(0.97);

    transform-origin: bottom right;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.zh-chatbot-window.zh-chatbot-open {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================
   HEADER
========================================= */

.zh-chatbot-header {
    min-height: 70px;

    padding: 14px 16px;

    background:
        linear-gradient(
            135deg,
            #5b4df8,
            #7048e8
        );

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;
}

.zh-chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 11px;
}

.zh-chatbot-avatar,
.zh-chatbot-message-avatar {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.18);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 700;
}

.zh-chatbot-header strong {
    display: block;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.3;
}

.zh-chatbot-header span {
    display: block;

    margin-top: 3px;

    font-size: 10px;

    color: rgba(255, 255, 255, 0.85);
}

#zh-chatbot-close {
    border: 0;
    background: transparent;

    color: #ffffff;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    opacity: 0.85;
}

#zh-chatbot-close:hover {
    opacity: 1;
}


/* =========================================
   MESSAGES
========================================= */

.zh-chatbot-messages {
    flex: 1;

    padding: 16px;

    overflow-y: auto;

    background: #fafaff;

    box-sizing: border-box;
}

.zh-chatbot-message {
    display: flex;
    align-items: flex-start;

    gap: 8px;

    margin-bottom: 13px;
}

.zh-chatbot-message-avatar {
    flex: 0 0 28px;

    width: 28px;
    height: 28px;

    font-size: 10px;

    background: #eeeaff;

    color: #5b4df8;
}

.zh-chatbot-bubble {
    max-width: 78%;

    padding: 10px 12px;

    background: #ffffff;

    border: 1px solid #ececf4;

    border-radius: 4px 13px 13px 13px;

    color: #292936;

    font-size: 12px;

    line-height: 1.6;

    box-shadow:
        0 2px 8px rgba(20, 20, 50, 0.03);

    box-sizing: border-box;
}


/* =========================================
   QUICK QUESTIONS
========================================= */
/* =========================================
   QUICK QUESTIONS
========================================= */

.zh-chatbot-quick-questions {
    display: flex !important;
    flex-direction: column !important;

    gap: 8px !important;

    margin: 12px 0 14px 36px !important;

    width: calc(100% - 48px) !important;

    max-width: calc(100% - 48px) !important;

    box-sizing: border-box !important;
}


.zh-chatbot-quick-question {
    display: block !important;

    width: 100% !important;

    max-width: 100% !important;

    min-width: 0 !important;

    height: auto !important;

    min-height: 0 !important;

    max-height: none !important;

    padding: 8px 12px !important;

    margin: 0 !important;

    border: 1px solid #ddd9ff !important;

    border-radius: 14px !important;

    background: #ffffff !important;

    color: #594ce8 !important;

    font-family: "Poppins", sans-serif !important;

    font-size: 11px !important;

    font-weight: 500 !important;

    line-height: 1.4 !important;

    text-align: left !important;

    white-space: normal !important;

    overflow: visible !important;

    overflow-wrap: anywhere !important;

    word-break: normal !important;

    box-sizing: border-box !important;

    cursor: pointer !important;

    appearance: none !important;

    -webkit-appearance: none !important;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease !important;
}


.zh-chatbot-quick-question:hover {
    background: #f2efff !important;

    border-color: #c9c1ff !important;

    color: #4d3fe0 !important;

    transform: translateY(-1px) !important;
}


.zh-chatbot-quick-question:active {
    transform: translateY(0) !important;
}


.zh-chatbot-quick-question:focus {
    outline: none !important;

    box-shadow:
        0 0 0 2px rgba(91, 77, 248, 0.12) !important;
}

/* =========================================
   USER MESSAGE
========================================= */

.zh-user-message {
    justify-content: flex-end;
}

.zh-user-message .zh-chatbot-bubble {
    background: #5b4df8;

    border: 0;

    color: #ffffff;

    border-radius: 13px 4px 13px 13px;
}


/* =========================================
   TYPING
========================================= */

.zh-chatbot-typing {
    display: none;

    align-items: center;

    gap: 4px;

    padding:
        0
        16px
        8px;
}

.zh-chatbot-typing.active {
    display: flex;
}

.zh-chatbot-typing span {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #8d87b5;

    animation:
        zh-chatbot-bounce 1.2s infinite;
}

.zh-chatbot-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.zh-chatbot-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes zh-chatbot-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}


/* =========================================
   INPUT
========================================= */

.zh-chatbot-input-area {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px;

    background: #ffffff;

    border-top: 1px solid #eeeef5;

    box-sizing: border-box;
}

#zh-chatbot-input {
    flex: 1;

    min-width: 0;

    height: 40px;

    padding: 0 12px;

    border: 1px solid #e2e2ec;

    border-radius: 11px;

    outline: none;

    font-family: inherit;

    font-size: 11px;

    color: #25252f;

    background: #fafaff;

    box-sizing: border-box;
}

#zh-chatbot-input:focus {
    border-color: #9c94ff;

    background: #ffffff;
}

#zh-chatbot-send {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    border: 0;

    border-radius: 11px;

    background: #5b4df8;

    color: #ffffff;

    cursor: pointer;

    font-size: 16px;

    display: flex;
    align-items: center;
    justify-content: center;
}

#zh-chatbot-send:hover {
    background: #4c40dd;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    #zh-chatbot {
        right: 14px;
        bottom: 14px;
    }


    #zh-chatbot-toggle {
        width: 54px;
        height: 54px;
    }


    .zh-chatbot-window {
        position: fixed;

        right: 10px;
        left: 10px;

        bottom: 76px;

        width: auto;

        height: min(
            70vh,
            560px
        );

        border-radius: 16px;
    }


       .zh-chatbot-quick-questions {
        margin:
            12px
            0
            14px
            30px !important;

        width:
            calc(100% - 40px) !important;

        max-width:
            calc(100% - 40px) !important;

        gap: 7px !important;
    }


    .zh-chatbot-quick-question {
        width: 100% !important;

        max-width: 100% !important;

        font-size: 10px !important;

        line-height: 1.4 !important;

        padding: 8px 10px !important;

        white-space: normal !important;

        overflow-wrap: anywhere !important;
    }
}