/* =========================================================
   WEB MIGRATION EXPERT
   PREMIUM FREE CHATBOT
========================================================= */

.web-chatbot,
.web-chatbot *,
.web-chatbot *::before,
.web-chatbot *::after {
    box-sizing: border-box;
}


/* =========================================================
   VARIABLES
========================================================= */

.web-chatbot {
    --chat-primary: #0A84FF;
    --chat-deep: #0052CC;
    --chat-light: #E9F3FF;

    --chat-dark: #081A3A;
    --chat-text: #52627A;
    --chat-muted: #8B98AA;

    --chat-border: #DCE8F7;
    --chat-white: #FFFFFF;

    position: fixed;

    right: 22px;
    bottom: 22px;

    z-index: 999999;

    font-family:
        "Poppins",
        Inter,
        Arial,
        sans-serif;
}


/* =========================================================
   FLOATING BUTTON
========================================================= */

.web-chatbot__launcher {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 62px;
    height: 62px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--chat-primary),
            var(--chat-deep)
        );

    box-shadow:
        0 12px 35px
        rgba(0, 82, 204, .28);

    cursor: pointer;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}


.web-chatbot__launcher:hover {
    transform: translateY(-4px);

    box-shadow:
        0 18px 45px
        rgba(0, 82, 204, .35);
}


.web-chatbot__launcher-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
}


.web-chatbot__launcher-icon svg {
    width: 100%;
    height: 100%;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Notification dot */

.web-chatbot__notification {
    position: absolute;

    top: 2px;
    right: 1px;

    width: 14px;
    height: 14px;

    border-radius: 50%;

    background: #18B979;

    border: 3px solid #fff;

    animation:
        webChatbotPulse 2s infinite;
}


@keyframes webChatbotPulse {

    0%,
    100% {
        box-shadow:
            0 0 0 0
            rgba(24, 185, 121, .35);
    }

    50% {
        box-shadow:
            0 0 0 7px
            rgba(24, 185, 121, 0);
    }

}


/* =========================================================
   CHAT WINDOW
========================================================= */

.web-chatbot__window {
    position: absolute;

    right: 0;
    bottom: 76px;

    display: flex;

    flex-direction: column;

    width: 370px;

    height: 560px;

    max-height:
        calc(100vh - 120px);

    overflow: hidden;

    background: #fff;

    border:
        1px solid
        var(--chat-border);

    border-radius: 18px;

    box-shadow:
        0 25px 80px
        rgba(8, 26, 58, .20);

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(15px)
        scale(.96);

    transform-origin:
        bottom right;

    transition:
        opacity .25s ease,
        visibility .25s ease,
        transform .25s ease;
}


.web-chatbot.is-open
.web-chatbot__window {
    opacity: 1;

    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   HEADER
========================================================= */

.web-chatbot__header {
    flex: 0 0 auto;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 17px 17px 16px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #0052CC,
            #0A84FF
        );
}


.web-chatbot__brand {
    display: flex;

    align-items: center;

    gap: 11px;
}


.web-chatbot__avatar {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    border-radius: 50%;

    color: var(--chat-deep);

    background: #fff;

    font-size: 13px;
    font-weight: 800;
}


.web-chatbot__brand-text strong {
    display: block;

    font-size: 12px;

    font-weight: 600;
}


.web-chatbot__brand-text span {
    display: flex;

    align-items: center;

    gap: 5px;

    margin-top: 3px;

    color:
        rgba(255,255,255,.78);

    font-size: 8px;
}


.web-chatbot__online-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #49E39D;
}


.web-chatbot__close {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    color: #fff;

    background:
        rgba(255,255,255,.14);

    cursor: pointer;

    font-size: 20px;

    line-height: 1;

    transition:
        background .25s ease;
}


.web-chatbot__close:hover {
    background:
        rgba(255,255,255,.25);
}


/* =========================================================
   MESSAGES
========================================================= */

.web-chatbot__messages {
    flex: 1 1 auto;

    overflow-y: auto;

    padding: 18px 14px;

    background:
        linear-gradient(
            180deg,
            #F8FBFF,
            #FFFFFF
        );

    scroll-behavior: smooth;
}


.web-chatbot__messages::-webkit-scrollbar {
    width: 5px;
}


.web-chatbot__messages::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background: #C9DDF5;
}


/* Message row */

.web-chatbot__message {
    display: flex;

    margin-bottom: 11px;
}


.web-chatbot__message--bot {
    justify-content: flex-start;
}


.web-chatbot__message--user {
    justify-content: flex-end;
}


/* Bubble */

.web-chatbot__bubble {
    max-width: 84%;

    padding:
        10px 12px;

    border-radius: 13px;

    font-size: 10px;

    line-height: 1.7;

    word-break: break-word;
}


.web-chatbot__message--bot
.web-chatbot__bubble {
    color: var(--chat-dark);

    background:
        var(--chat-light);

    border-bottom-left-radius: 4px;
}


.web-chatbot__message--user
.web-chatbot__bubble {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--chat-primary),
            var(--chat-deep)
        );

    border-bottom-right-radius: 4px;
}


/* =========================================================
   QUICK QUESTIONS
========================================================= */

.web-chatbot__quick {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: 8px;
}


.web-chatbot__quick-btn {
    padding:
        7px 9px;

    color:
        var(--chat-deep);

    background:
        #fff;

    border:
        1px solid
        #CFE1F6;

    border-radius:
        20px;

    cursor:
        pointer;

    font-family: inherit;

    font-size:
        8px;

    line-height:
        1.3;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease;
}


.web-chatbot__quick-btn:hover {
    color: #fff;

    background:
        var(--chat-primary);

    border-color:
        var(--chat-primary);
}


/* =========================================================
   LEAD FORM
========================================================= */

.web-chatbot__lead {
    display: none;

    margin-top: 10px;

    padding: 12px;

    border:
        1px solid
        var(--chat-border);

    border-radius:
        12px;

    background:
        #fff;
}


.web-chatbot__lead.is-visible {
    display: block;
}


.web-chatbot__lead-title {
    margin: 0 0 8px;

    color: var(--chat-dark);

    font-size: 10px;

    font-weight: 600;
}


.web-chatbot__lead input,
.web-chatbot__lead textarea,
.web-chatbot__lead select {
    width: 100%;

    margin-bottom: 7px;

    padding:
        9px 10px;

    color: var(--chat-dark);

    background: #fff;

    border:
        1px solid
        var(--chat-border);

    border-radius:
        7px;

    outline: none;

    font-family: inherit;

    font-size: 9px;
}


.web-chatbot__lead input:focus,
.web-chatbot__lead textarea:focus,
.web-chatbot__lead select:focus {
    border-color:
        var(--chat-primary);

    box-shadow:
        0 0 0 3px
        rgba(10,132,255,.08);
}


.web-chatbot__lead textarea {
    min-height: 65px;

    resize: vertical;
}


.web-chatbot__lead-submit {
    width: 100%;

    min-height: 35px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--chat-primary),
            var(--chat-deep)
        );

    border: 0;

    border-radius: 7px;

    cursor: pointer;

    font-family: inherit;

    font-size: 8px;

    font-weight: 600;

    letter-spacing: .6px;

    text-transform: uppercase;
}


/* =========================================================
   TYPING
========================================================= */

.web-chatbot__typing {
    display: none;

    margin-bottom: 10px;
}


.web-chatbot__typing.is-visible {
    display: flex;
}


.web-chatbot__typing-bubble {
    display: flex;

    align-items: center;

    gap: 4px;

    padding:
        10px 12px;

    border-radius:
        13px;

    border-bottom-left-radius:
        4px;

    background:
        var(--chat-light);
}


.web-chatbot__typing-bubble span {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background:
        var(--chat-primary);

    animation:
        webChatbotTyping 1s infinite;
}


.web-chatbot__typing-bubble span:nth-child(2) {
    animation-delay:
        .15s;
}


.web-chatbot__typing-bubble span:nth-child(3) {
    animation-delay:
        .3s;
}


@keyframes webChatbotTyping {

    0%,
    60%,
    100% {
        transform:
            translateY(0);

        opacity: .45;
    }

    30% {
        transform:
            translateY(-3px);

        opacity: 1;
    }

}


/* =========================================================
   INPUT
========================================================= */

.web-chatbot__input-wrap {
    flex: 0 0 auto;

    display: flex;

    align-items: center;

    gap: 7px;

    padding:
        10px;

    border-top:
        1px solid
        var(--chat-border);

    background:
        #fff;
}


.web-chatbot__input {
    min-width: 0;

    flex: 1;

    height: 39px;

    padding:
        0 11px;

    border:
        1px solid
        var(--chat-border);

    border-radius:
        9px;

    outline: none;

    color:
        var(--chat-dark);

    background:
        #F9FBFE;

    font-family:
        inherit;

    font-size:
        9px;
}


.web-chatbot__input:focus {
    border-color:
        var(--chat-primary);

    background:
        #fff;
}


.web-chatbot__send {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 39px;
    height: 39px;

    flex: 0 0 39px;

    border: 0;

    border-radius: 9px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--chat-primary),
            var(--chat-deep)
        );

    cursor: pointer;
}


.web-chatbot__send svg {
    width: 16px;
    height: 16px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.8;

    stroke-linecap: round;

    stroke-linejoin: round;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .web-chatbot {
        right: 12px;

        bottom: 12px;
    }


    .web-chatbot__launcher {
        width: 56px;

        height: 56px;
    }


    .web-chatbot__window {
        right: 0;

        bottom: 68px;

        width:
            min(
                calc(100vw - 24px),
                370px
            );

        height:
            min(
                610px,
                calc(100vh - 95px)
            );

        border-radius:
            16px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .web-chatbot__window {
        width:
            calc(100vw - 16px);

        right: -4px;

        height:
            calc(100vh - 90px);
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .web-chatbot *,
    .web-chatbot *::before,
    .web-chatbot *::after {

        animation: none !important;

        transition: none !important;
    }

}