﻿/* =========================================================
   WEB & SEO AI CHAT
   ========================================================= */

#webseo-ai-chat,
#webseo-ai-chat * {
    box-sizing: border-box;
}

#webseo-ai-chat {
    --wsa-purple: #725cff;
    --wsa-blue: #3178ff;
    --wsa-dark: #101522;
    --wsa-dark-soft: #171e2d;
    --wsa-text: #202637;
    --wsa-muted: #737b8c;
    --wsa-border: #e8eaf0;
    --wsa-background: #ffffff;
    --wsa-soft: #f7f8fb;

    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 2147483000;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.5;
}


/* =========================================================
   LAUNCH BUTTON
   ========================================================= */

#webseo-ai-chat .wsa-launcher {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-width: 145px;
    height: 56px;

    margin: 0;
    padding: 0 18px;

    border: 0;
    border-radius: 18px;

    outline: none;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            var(--wsa-purple),
            var(--wsa-blue)
        );

    box-shadow:
        0 14px 40px rgba(49, 120, 255, .28),
        0 6px 18px rgba(15, 23, 42, .15);

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


#webseo-ai-chat .wsa-launcher:hover {
    transform: translateY(-2px);

    box-shadow:
        0 18px 46px rgba(49, 120, 255, .33),
        0 7px 20px rgba(15, 23, 42, .17);
}


#webseo-ai-chat .wsa-launcher-icon {
    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;
}


#webseo-ai-chat .wsa-launcher-icon svg {
    width: 24px;
    height: 24px;

    display: block;
}


#webseo-ai-chat .wsa-launcher-text {
    color: #fff;

    font-size: 14px;
    font-weight: 700;

    white-space: nowrap;
}


#webseo-ai-chat .wsa-launcher-status {
    position: absolute;

    top: -3px;
    right: -3px;

    width: 13px;
    height: 13px;

    border: 3px solid #fff;
    border-radius: 50%;

    background: #22c55e;

    animation:
        wsaPulse 2s infinite;
}


@keyframes wsaPulse {

    0% {
        box-shadow:
            0 0 0 0
            rgba(34, 197, 94, .5);
    }

    70% {
        box-shadow:
            0 0 0 9px
            rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow:
            0 0 0 0
            rgba(34, 197, 94, 0);
    }
}


/* =========================================================
   WINDOW
   ========================================================= */

#webseo-ai-chat .wsa-window {
    position: absolute;

    right: 0;
    bottom: 72px;

    width: 390px;
    max-width: calc(100vw - 32px);

    height: 625px;
    max-height: calc(100vh - 115px);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 24px;

    background: #fff;

    box-shadow:
        0 30px 80px rgba(15, 23, 42, .22),
        0 10px 30px rgba(15, 23, 42, .10);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform:
        translateY(18px)
        scale(.97);

    transform-origin:
        bottom right;

    transition:
        opacity .22s ease,
        visibility .22s ease,
        transform .22s ease;
}


#webseo-ai-chat .wsa-window.wsa-open {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   HEADER
   ========================================================= */

#webseo-ai-chat .wsa-header {
    position: relative;

    min-height: 76px;

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 13px 15px;

    background:
        radial-gradient(
            circle at 90% 0%,
            rgba(114, 92, 255, .45),
            transparent 45%
        ),
        linear-gradient(
            135deg,
            #101522,
            #182235
        );

    color: #fff;
}


#webseo-ai-chat .wsa-header::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(114, 92, 255, .8),
            transparent
        );
}


#webseo-ai-chat .wsa-agent {
    display: flex;
    align-items: center;

    gap: 10px;
}


#webseo-ai-chat .wsa-avatar {
    position: relative;

    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            var(--wsa-purple),
            var(--wsa-blue)
        );

    color: #fff;

    font-size: 13px;
    font-weight: 800;

    box-shadow:
        0 7px 20px
        rgba(49, 120, 255, .25);
}


#webseo-ai-chat .wsa-avatar span {
    position: absolute;

    right: -2px;
    bottom: -2px;

    width: 11px;
    height: 11px;

    border:
        2px solid
        var(--wsa-dark-soft);

    border-radius: 50%;

    background: #22c55e;
}


#webseo-ai-chat .wsa-agent-text {
    display: flex;
    flex-direction: column;
}


#webseo-ai-chat .wsa-agent-text strong {
    color: #fff;

    font-size: 15px;
    font-weight: 700;

    line-height: 1.3;
}


#webseo-ai-chat .wsa-agent-text small {
    display: flex;
    align-items: center;

    gap: 5px;

    margin-top: 3px;

    color: #b8c1d0;

    font-size: 11px;
}


#webseo-ai-chat .wsa-agent-text small i {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #22c55e;
}


#webseo-ai-chat .wsa-header-buttons {
    display: flex;
    align-items: center;

    gap: 3px;
}


#webseo-ai-chat .wsa-header-buttons button {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 10px;

    background: transparent;

    color: #b9c2d1;

    cursor: pointer;

    appearance: none;

    transition:
        color .18s ease,
        background .18s ease;
}


#webseo-ai-chat .wsa-header-buttons button:hover {
    color: #fff;

    background:
        rgba(255, 255, 255, .08);
}


#webseo-ai-chat .wsa-header-buttons svg {
    width: 19px;
    height: 19px;
}


/* =========================================================
   BODY
   ========================================================= */

#webseo-ai-chat .wsa-body {
    flex: 1 1 auto;

    min-height: 0;

    overflow-x: hidden;
    overflow-y: auto;

    padding: 17px 14px 14px;

    background:
        linear-gradient(
            180deg,
            #f8f9fc 0%,
            #fff 45%
        );

    overscroll-behavior: contain;

    scrollbar-width: thin;
    scrollbar-color:
        #d7dbe5 transparent;
}


#webseo-ai-chat .wsa-body::-webkit-scrollbar {
    width: 5px;
}


#webseo-ai-chat .wsa-body::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background: #d7dbe5;
}


/* =========================================================
   MESSAGES
   ========================================================= */

#webseo-ai-chat .wsa-message {
    width: 100%;

    display: flex;

    margin-bottom: 13px;

    animation:
        wsaMessageIn .2s ease both;
}


@keyframes wsaMessageIn {

    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


#webseo-ai-chat .wsa-assistant {
    align-items: flex-start;

    gap: 8px;
}


#webseo-ai-chat .wsa-user {
    justify-content: flex-end;
}


#webseo-ai-chat .wsa-mini-avatar {
    width: 29px;
    height: 29px;

    flex: 0 0 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 2px;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            var(--wsa-purple),
            var(--wsa-blue)
        );

    color: #fff;

    font-size: 9px;
    font-weight: 800;
}


#webseo-ai-chat .wsa-bubble {
    max-width: 82%;

    padding: 10px 13px;

    word-break: break-word;

    font-size: 13.5px;
    line-height: 1.55;
}


#webseo-ai-chat .wsa-assistant .wsa-bubble {
    border:
        1px solid
        var(--wsa-border);

    border-radius:
        5px 16px 16px 16px;

    background: #fff;

    color: #303849;

    box-shadow:
        0 3px 12px
        rgba(15, 23, 42, .04);
}


#webseo-ai-chat .wsa-user .wsa-bubble {
    border-radius:
        16px 5px 16px 16px;

    background:
        linear-gradient(
            135deg,
            var(--wsa-purple),
            var(--wsa-blue)
        );

    color: #fff;

    box-shadow:
        0 6px 16px
        rgba(76, 80, 200, .16);
}


#webseo-ai-chat .wsa-bubble strong {
    font-weight: 700;
}


#webseo-ai-chat .wsa-bubble a {
    color: #5546d7;

    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 2px;
}


#webseo-ai-chat .wsa-user .wsa-bubble a {
    color: #fff;
}


/* =========================================================
   SUGGESTIONS
   ========================================================= */

#webseo-ai-chat .wsa-suggestions {
    margin:
        4px
        0
        14px
        37px;
}


#webseo-ai-chat .wsa-suggestions[hidden] {
    display: none !important;
}


#webseo-ai-chat .wsa-suggestions-title {
    margin-bottom: 7px;

    color: #8a92a2;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .05em;

    text-transform: uppercase;
}


#webseo-ai-chat .wsa-suggestion-list {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;
}


#webseo-ai-chat .wsa-suggestion-list button {
    margin: 0;

    padding: 7px 10px;

    border: 1px solid #e1e5ed;
    border-radius: 10px;

    background: #fff;

    color: #4d5667;

    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;

    cursor: pointer;

    appearance: none;

    transition:
        transform .17s ease,
        border-color .17s ease,
        color .17s ease,
        background .17s ease;
}


#webseo-ai-chat .wsa-suggestion-list button:hover {
    transform: translateY(-1px);

    color: var(--wsa-purple);

    border-color:
        rgba(114, 92, 255, .35);

    background: #f9f8ff;
}


/* =========================================================
   TYPING
   ========================================================= */

#webseo-ai-chat .wsa-typing {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 10px;
}


#webseo-ai-chat .wsa-typing[hidden] {
    display: none !important;
}


#webseo-ai-chat .wsa-typing-bubble {
    min-width: 55px;
    min-height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    padding: 9px 12px;

    border: 1px solid var(--wsa-border);

    border-radius:
        5px 15px 15px 15px;

    background: #fff;
}


#webseo-ai-chat .wsa-typing-bubble span {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #949cac;

    animation:
        wsaTyping 1.1s
        infinite ease-in-out;
}


#webseo-ai-chat .wsa-typing-bubble span:nth-child(2) {
    animation-delay: .13s;
}


#webseo-ai-chat .wsa-typing-bubble span:nth-child(3) {
    animation-delay: .26s;
}


@keyframes wsaTyping {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: .45;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}


/* =========================================================
   FOOTER
   ========================================================= */

#webseo-ai-chat .wsa-footer {
    flex: 0 0 auto;

    padding: 11px 12px 9px;

    border-top:
        1px solid #eceef3;

    background: #fff;
}


#webseo-ai-chat .wsa-input-box {
    display: flex;
    align-items: flex-end;

    gap: 7px;

    padding:
        6px
        6px
        6px
        12px;

    border:
        1px solid #dde1e9;

    border-radius: 15px;

    background: #f9fafb;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}


#webseo-ai-chat .wsa-input-box:focus-within {
    border-color:
        rgba(114, 92, 255, .55);

    background: #fff;

    box-shadow:
        0 0 0 3px
        rgba(114, 92, 255, .07);
}


#webseo-ai-chat .wsa-input {
    width: 100%;

    min-width: 0;
    min-height: 36px;
    max-height: 120px;

    margin: 0;
    padding: 8px 0;

    overflow-y: auto;

    resize: none;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--wsa-text);

    font-family: inherit;
    font-size: 13.5px;
    line-height: 20px;

    box-shadow: none;
}


#webseo-ai-chat .wsa-input::placeholder {
    color: #9aa1ae;
}


#webseo-ai-chat .wsa-input:disabled {
    opacity: .65;
}


#webseo-ai-chat .wsa-send {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--wsa-purple),
            var(--wsa-blue)
        );

    color: #fff;

    cursor: pointer;

    appearance: none;

    box-shadow:
        0 5px 13px
        rgba(79, 70, 229, .2);

    transition:
        transform .18s ease,
        opacity .18s ease;
}


#webseo-ai-chat .wsa-send:hover:not(:disabled) {
    transform: translateY(-1px);
}


#webseo-ai-chat .wsa-send:disabled {
    opacity: .45;

    cursor: default;
}


#webseo-ai-chat .wsa-send svg {
    width: 21px;
    height: 21px;
}


#webseo-ai-chat .wsa-disclaimer {
    margin-top: 7px;

    color: #9ba2ae;

    font-size: 9.5px;
    line-height: 1.4;

    text-align: center;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    #webseo-ai-chat {
        right: 12px;
        bottom: 12px;
    }


    #webseo-ai-chat .wsa-launcher {
        min-width: 54px;
        width: 54px;
        height: 54px;

        padding: 0;

        border-radius: 17px;
    }


    #webseo-ai-chat .wsa-launcher-text {
        display: none;
    }


    #webseo-ai-chat .wsa-window {
        position: fixed;

        left: 8px;
        right: 8px;

        top: auto;
        bottom: 8px;

        width: auto;

        max-width: none;

        height:
            calc(100dvh - 16px);

        max-height:
            calc(100dvh - 16px);

        border-radius: 21px;

        transform-origin:
            bottom center;
    }


    #webseo-ai-chat .wsa-header {
        min-height: 72px;

        padding:
            12px 13px;
    }


    #webseo-ai-chat .wsa-body {
        padding:
            15px 11px
            12px;
    }


    #webseo-ai-chat .wsa-bubble {
        max-width: 86%;

        font-size: 13px;
    }


    #webseo-ai-chat .wsa-suggestions {
        margin-left: 37px;
    }


    #webseo-ai-chat .wsa-footer {
        padding:
            10px
            10px
            max(
                9px,
                env(safe-area-inset-bottom)
            );
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    #webseo-ai-chat *,
    #webseo-ai-chat *::before,
    #webseo-ai-chat *::after {
        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            .01ms !important;
    }
}

/* =========================================================
   AI LEAD FORM
   ========================================================= */

#webseo-ai-chat .wsa-lead-card {
    margin:
        8px
        0
        18px
        37px;

    padding: 15px;

    border:
        1px solid
        rgba(114, 92, 255, .18);

    border-radius: 17px;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #faf9ff
        );

    box-shadow:
        0 8px 30px
        rgba(15, 23, 42, .07);

    animation:
        wsaMessageIn
        .25s ease both;
}


#webseo-ai-chat .wsa-lead-head {
    display: flex;
    flex-direction: column;

    margin-bottom: 13px;
}


#webseo-ai-chat .wsa-lead-head strong {
    color: #202637;

    font-size: 15px;
    font-weight: 750;
}


#webseo-ai-chat .wsa-lead-head span {
    margin-top: 3px;

    color: #725cff;

    font-size: 11px;
    font-weight: 650;
}


#webseo-ai-chat .wsa-lead-form {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


#webseo-ai-chat .wsa-lead-form label {
    display: flex;
    flex-direction: column;

    gap: 4px;

    margin: 0;
}


#webseo-ai-chat .wsa-lead-form label > span {
    color: #6d7482;

    font-size: 10.5px;
    font-weight: 650;
}


#webseo-ai-chat .wsa-lead-form input,
#webseo-ai-chat .wsa-lead-form textarea {
    width: 100%;

    margin: 0;

    padding:
        10px
        11px;

    border:
        1px solid #dfe3eb;

    border-radius: 10px;

    outline: 0;

    background: #fff;

    color: #202637;

    font-family: inherit;
    font-size: 12.5px;

    box-shadow: none;

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}


#webseo-ai-chat .wsa-lead-form textarea {
    min-height: 65px;

    resize: vertical;
}


#webseo-ai-chat .wsa-lead-form input:focus,
#webseo-ai-chat .wsa-lead-form textarea:focus {
    border-color:
        rgba(
            114,
            92,
            255,
            .65
        );

    box-shadow:
        0 0 0 3px
        rgba(
            114,
            92,
            255,
            .07
        );
}


#webseo-ai-chat .wsa-lead-submit {
    width: 100%;

    margin-top: 2px;

    padding:
        11px
        15px;

    border: 0;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #725cff,
            #3178ff
        );

    color: #fff;

    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 7px 18px
        rgba(
            79,
            70,
            229,
            .18
        );

    transition:
        transform .18s ease,
        opacity .18s ease;
}


#webseo-ai-chat .wsa-lead-submit:hover:not(:disabled) {
    transform:
        translateY(-1px);
}


#webseo-ai-chat .wsa-lead-submit:disabled {
    opacity: .6;

    cursor: default;
}


#webseo-ai-chat .wsa-lead-note {
    color: #9aa1ae;

    font-size: 9.5px;

    text-align: center;
}


#webseo-ai-chat .wsa-hp {
    position: absolute !important;

    left: -99999px !important;

    width: 1px !important;
    height: 1px !important;

    opacity: 0 !important;

    pointer-events: none !important;
}


#webseo-ai-chat .wsa-lead-result {
    padding: 8px 10px;

    border-radius: 8px;

    font-size: 11px;
}


#webseo-ai-chat .wsa-lead-error {
    color: #b42318;

    background: #fff1f0;
}


#webseo-ai-chat .wsa-lead-success {
    padding:
        8px
        5px;

    text-align: center;
}


#webseo-ai-chat .wsa-lead-success-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin:
        0 auto
        10px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #22c55e,
            #16a34a
        );

    color: #fff;

    font-size: 21px;
    font-weight: 800;

    box-shadow:
        0 7px 20px
        rgba(
            34,
            197,
            94,
            .2
        );
}


#webseo-ai-chat .wsa-lead-success strong {
    display: block;

    color: #202637;

    font-size: 15px;
}


#webseo-ai-chat .wsa-lead-success p {
    margin:
        5px 0 0;

    color: #737b8c;

    font-size: 11.5px;
}


@media (max-width: 600px) {

    #webseo-ai-chat .wsa-lead-card {
        margin-left: 37px;

        padding: 13px;
    }

}