@import url('https://fonts.googleapis.com/css2?family=Wix+Madefor+Text:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

.gcm-chatbot {
    /* brand */
    --brand: #2563eb;

    /* base palette */
    --white: #fff;
    --bg: #f7f8fb;
    --panel: #fff;
    --text: #4d4d4d;
    --muted: #6b7280;
    --border: #e5e7eb;
    --text-strong: #374151;
    --ink-900: #111827;

    /* UI specifics */
    --icon: #304da1;
    --typing-dot: #c7cad1;
    --user-bubble-bg: #eff6ff;
    --user-bubble-border: #dbeafe;
    --bot-bubble-bg: #ebebeb;
    --hover-bg: #f3f4f6;
    --footer-bg: #f5f5f5;
    --nudge-icon-bg: #ebebeb;

    /* effects */
    --ring: rgba(37, 99, 235, 0.35);
    --shadow-color-1: #00000026;
    --shadow-color-2: #0000004d;
    --shadow-color-3: rgba(18, 45, 102, 0.2);

    /* composed shadows (use color vars above) */
    --shadow: 0 20px 50px var(--shadow-color-1);

    /* radii */
    --radius: 24px;
    --font-family: "Wix Madefor Text", system-ui, sans-serif;
    --accent-start: #e6007e;
    --accent-end: #8051ff;
    --main-background: linear-gradient(108.67deg, var(--accent-start) 0%, var(--accent-end) 100%);
    --main-color: #fff;
}

.gcm-chatbot .chatbot-chat-toggle {
    opacity: 1;
    transform: none;
}

.gcm-chatbot .chatbot-chat-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: grid;
    width: 60px;
    height: 60px;
    font-family: var(--font-family);
    border: 1px solid #fff;
    border-radius: 50%;
    background: var(--main-background);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    place-items: center;
}

.gcm-chatbot .chatbot-chat-toggle:hover {
    background: var(--white);
    box-shadow: 0 24px 60px var(--shadow-color-2);
}

.gcm-chatbot .chatbot-chat-toggle:hover svg {
    fill: var(--main-color);
}

.gcm-chatbot .chatbot-chat-toggle:hover #icon_outline {
    fill: var(--accent-end);
}

.gcm-chatbot .chatbot-chat-toggle:hover #icon {
    fill: url(#chatbotGrad);
}

.gcm-chatbot .chatbot-chat-toggle:active {
    border-radius: 21px;
}

.gcm-chatbot .chatbot-chat-panel {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 10000;
    display: none;
    opacity: 0;
    flex-direction: column;
    width: 100%;
    max-width: 413px;
    height: 650px;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    font-family: var(--font-family);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
    transform: none;
    transition: none;

    /* Mobile */
    @media screen and (max-width: 449px), screen and (max-height: 449px) {
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100dvw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;

        .chatbot-chat-header {
            padding: 8px 8px 8px 16px !important;
        }

        .chatbot-chat-log {
            padding: 16px 20px !important;
            gap: 12px;
        }

        .chatbot-bubble {
            padding: 10px 12px !important;
        }

        .chatbot-chat-input {
            padding: 10px 20px !important;
        }

        .chatbot-brand-footer {
            padding: 4px 10px !important;
        }
    }

    /* Full height */
    @media screen and (min-width: 450px) and (min-height: 450px) and (max-height: 699px) {
        top: 8px !important;
        right: 4px !important;
        bottom: 8px !important;
        height: 100% !important;
        max-height: calc(100vh - 16px) !important;

        .chatbot-chat-header {
            padding: 8px 8px 8px 16px !important;
        }

        .chatbot-chat-log {
            padding: 16px 20px !important;
            gap: 12px !important;
        }

        .chatbot-bubble {
            padding: 10px 12px !important;
        }

        .chatbot-msg {
            gap: 12px !important;
        }

        .chatbot-chat-input {
            padding: 10px 20px !important;
        }

        .chatbot-brand-footer {
            padding: 4px 10px !important;
        }
    }
}

.gcm-chatbot .chatbot-chat-panel.chatbot-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.gcm-chatbot .chatbot-chat-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 16px 16px 16px 20px;
    background: var(--white);
}

.gcm-chatbot .chatbot-brand {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    gap: 16px;
}

.gcm-chatbot .chatbot-logo {
    display: grid;
    flex: 0 0 44px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    place-items: center;
}

.gcm-chatbot .chatbot-logo img {
    width: auto;
    max-width: 100px;
    height: 44px;
}

.gcm-chatbot .chatbot-chat-title {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.25;
    white-space: normal;
    color: var(--text);
    overflow-wrap: normal;
    word-break: break-word;
}

.gcm-chatbot .chatbot-spacer {
    flex: 0 0 12px;
}

.gcm-chatbot .chatbot-icon-btn {
    display: flex;
    flex: 0 0 44px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--text);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.gcm-chatbot .chatbot-icon-btn svg {
    display: block;
    width: auto;
    height: 22px;
    fill: var(--text);
}

.gcm-chatbot .chatbot-icon-btn:hover {
    border: 1px solid #949494;
    border-radius: 50%;
}

.gcm-chatbot .chatbot-icon-btn:active {
    border: 1px solid #949494;
    border-radius: 18px;
    background: #f5f5f5 url("bg-pressed-small-336c66fca3bd846b258644c377347043.svg") no-repeat center center;
    background-size: contain;
}

.gcm-chatbot .chatbot-date-sep {
    margin: 10px 0;
    font-weight: 600;
    text-align: center;
    color: var(--muted);
}

.gcm-chatbot .chatbot-chat-log {
    position: relative;
    z-index: 10000;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
    overflow: auto;
    background: var(--white);
    box-shadow: 0 4px 30px var(--shadow-color-3);
    gap: 20px;
}

.gcm-chatbot .chatbot-today-date {
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    color: var(--text);
}

.gcm-chatbot .chatbot-msg {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.gcm-chatbot .chatbot-msg .chatbot-bubble {
    min-width: 0;
    max-width: calc(100% - 56px);
    padding: 16px;
    font-size: 16px;
    line-height: 1.35;
    color: var(--text);
    border-radius: 20px;
}

.gcm-chatbot .chatbot-msg-time {
    display: block;
    flex: 0 0 100%;
    flex-basis: 100%;
    order: 99;
    clear: both;
    width: 100%;
    margin-left: 16px;
    font-size: 16px;
    color: var(--text);
}

.gcm-chatbot .chatbot-msg.chatbot-user .chatbot-msg-time {
    width: 100%;
    text-align: right;
}

.gcm-chatbot .chatbot-msg.chatbot-bot .chatbot-msg-time {
    text-align: left;
}

.gcm-chatbot .chatbot-msg.chatbot-user {
    justify-content: flex-end;
}

.gcm-chatbot .chatbot-msg.chatbot-user .chatbot-bubble {
    color: var(--main-color);
    background: var(--main-background);
}

.gcm-chatbot .chatbot-msg.chatbot-bot {
    justify-content: flex-start;
}

.gcm-chatbot .chatbot-msg.chatbot-bot .chatbot-bubble {
    background: var(--bot-bubble-bg);
}

.gcm-chatbot .chatbot-bubble {
    overflow-wrap: normal;
    word-break: break-word;
    hyphens: auto;
}

.gcm-chatbot .chatbot-bubble > *:not(.chatbot-typing-dots) {
    position: relative;
    overflow: hidden;
}

.gcm-chatbot .chatbot-bubble ul,
.gcm-chatbot .chatbot-bubble ol {
    padding-left: 1.6em;
    margin: 0.4em 0 0.6em;
    list-style-position: outside;
}

.gcm-chatbot .chatbot-bubble ul ul,
.gcm-chatbot .chatbot-bubble ol ol {
    padding-left: 1em;
    margin: 0.25em 0 0.4em;
}

.gcm-chatbot .chatbot-bubble ul { list-style-type: disc; }
.gcm-chatbot .chatbot-bubble ul ul { list-style-type: circle; }
.gcm-chatbot .chatbot-bubble ol { list-style-type: decimal; }

.gcm-chatbot .chatbot-bubble li {
    margin: 0.15em 0;
    line-height: 1.35;
}

.gcm-chatbot .chatbot-bubble li::marker {
    font-weight: bold;
}

.gcm-chatbot .chatbot-bubble pre,
.gcm-chatbot .chatbot-bubble code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.gcm-chatbot .chatbot-bubble a {
    color: var(--brand);
}

.gcm-chatbot .chatbot-bubble p {
    margin: 0;
}

.gcm-chatbot .chatbot-bubble h1,
.gcm-chatbot .chatbot-bubble h2,
.gcm-chatbot .chatbot-bubble h3,
.gcm-chatbot .chatbot-bubble h4,
.gcm-chatbot .chatbot-bubble h5,
.gcm-chatbot .chatbot-bubble h6 {
    margin: 0.6em 0 0.35em;
    line-height: 1.25;
}

.gcm-chatbot .chatbot-msg.chatbot-bot .chatbot-bot-avatar {
    display: grid;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-top: auto;
    border-radius: 50%;
    background: var(--bot-bubble-bg);
    place-items: center;
}

.gcm-chatbot .chatbot-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 2px;
}

.gcm-chatbot .chatbot-typing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4d4d4d;
    transform: none;
    animation: none;
}

.gcm-chatbot .chatbot-typing-dots span:nth-child(1) { opacity: 0.4; }
.gcm-chatbot .chatbot-typing-dots span:nth-child(2) { opacity: 0.6; }
.gcm-chatbot .chatbot-typing-dots span:nth-child(3) { opacity: 1; }

.gcm-chatbot .chatbot-chat-input {
    position: relative;
    z-index: 100001;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--white);
}

.gcm-chatbot .chatbot-input-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gcm-chatbot .chatbot-input-wrap {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    background: var(--white);
    gap: 8px;
}

.gcm-chatbot .chatbot-chat-input input {
    width: 100%;
    padding: 9px 16px;
    font-size: 16px;
    color: var(--text);
    border: 1px solid var(--text);
    border-radius: 23px;
    background: transparent;
    outline-color: var(--icon);
}

.gcm-chatbot .chatbot-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    fill: var(--text);
}

.gcm-chatbot .chatbot-btn-icon svg {
    width: 12px;
    height: 16px;
}

.gcm-chatbot .chatbot-btn-icon:hover {
    color: var(--text-strong);
    background: var(--hover-bg);
}

.gcm-chatbot .chatbot-btn-send {
    position: relative;
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--main-color);
    border: none;
    border-radius: 50%;
    background: var(--main-background);
    cursor: pointer;
    transition: none;
}

.gcm-chatbot .chatbot-btn-send::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent;
}

.gcm-chatbot .chatbot-btn-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gcm-chatbot .chatbot-btn-send:hover::before,
.gcm-chatbot .chatbot-btn-send:disabled::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    z-index: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--white);
}

.gcm-chatbot .chatbot-btn-send:hover svg,
.gcm-chatbot .chatbot-btn-send:disabled svg,
.gcm-chatbot .chatbot-btn-send:not(:disabled):active svg {
    fill: url(#chatbotGrad);
}

.gcm-chatbot .chatbot-btn-send .chatbot-chat-send {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    margin: 0;
    fill: var(--white);
}

.gcm-chatbot .chatbot-btn-send:not(:disabled):active {
    border-radius: 18px;
}

.gcm-chatbot .chatbot-btn-send:not(:disabled):active::before {
    border-radius: 16px;
    background: var(--white) url("bg-pressed-small-336c66fca3bd846b258644c377347043.svg") no-repeat center center;
    background-size: contain;
}

.gcm-chatbot .chatbot-brand-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    font-size: 16px;
    color: var(--text);
    border-top: 1px solid var(--border);
    background: var(--footer-bg);
    gap: 6px;
}

.gcm-chatbot .chatbot-brand-footer a {
    color: inherit;
    text-underline-offset: 2px;
}

.gcm-chatbot .chatbot-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.gcm-chatbot .chatbot-chat-nudge {
    position: fixed;
    right: 4px;
    bottom: 115px;
    z-index: 1001;
    display: none;
    visibility: hidden;
    opacity: 1;
    max-width: 320px;
    padding: 12px 14px 12px 12px;
    margin: 0 36px;
    font-family: var(--font-family);
    color: var(--ink-900);
    border-radius: 16px 16px 0 16px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.gcm-chatbot .chatbot-chat-nudge.chatbot-show {
    display: flex;
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    animation: none;
}

.gcm-chatbot .chatbot-chat-nudge .chatbot-nudge-icon {
    display: flex;
    flex: 0 0 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 16px;
    border-radius: 50%;
    background: var(--nudge-icon-bg);
}

.gcm-chatbot .chatbot-chat-nudge .chatbot-nudge-icon svg {
    height: 27px;
}

.gcm-chatbot .chatbot-chat-nudge .chatbot-nudge-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    line-height: 1.4;
    color: var(--text);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.gcm-chatbot .chatbot-chat-nudge .chatbot-nudge-close {
    position: absolute;
    top: -10px;
    right: -10px;
    display: grid;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 2px 8px var(--shadow-color-1);
    cursor: pointer;
    place-items: center;
}

.gcm-chatbot .chatbot-chat-nudge .chatbot-nudge-close svg {
    fill: var(--text);
}

.gcm-chatbot .chatbot-chat-nudge .chatbot-nudge-close svg {
    width: auto;
    height: 18px;
}

.gcm-chatbot .chatbot-chat-nudge .chatbot-nudge-close:hover {
    background: var(--main-background);
    box-shadow: 0 1px 4px var(--shadow-color-2);
}

.gcm-chatbot .chatbot-chat-nudge .chatbot-nudge-close:hover svg {
    fill: var(--white);
}

.gcm-chatbot .chatbot-chat-nudge::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -20px;
    width: 35px;
    height: 26px;
    border-radius: 2px;
    background: var(--white);
    filter: drop-shadow(0 2px 2px var(--shadow-color-1));
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.gcm-chatbot .chatbot-sources {
    padding-top: 8px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.gcm-chatbot .chatbot-sources__title {
    margin-bottom: 4px;
    font-weight: 600;
}

.gcm-chatbot .chatbot-sources__link {
    display: block;
    margin-bottom: 5px;
    text-decoration: underline;
    color: var(--brand);
}

html.gcm-chatbot-lock-scroll,
body.gcm-chatbot-lock-scroll {
    overflow: hidden !important;
    overscroll-behavior: contain;
    touch-action: none;
}

@media screen and (max-width: 449px), screen and (max-height: 449px) {
    html.gcm-chatbot-lock-scroll,
    body.gcm-chatbot-lock-scroll {
        height: 100%;
    }
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes gcm-bounceInUp {
        0% { opacity: 0; transform: translateY(140%) scale(0.98); }
        60% { opacity: 1; transform: translateY(-6px); }
        80% { transform: translateY(3px); }
        100% { opacity: 1; transform: translateY(0); }
    }

    @keyframes bubble-wipe {
        to { opacity: 0; transform: translateX(110%); }
    }

    @keyframes chatbot-bounce {
        0%,
        80%,
        100% { transform: translateY(0); }
        40% { transform: translateY(-4px); }
    }

    @keyframes chatbot-cursorBlink {
        0%,
        49% { opacity: 1; }

        50%,
        100% { opacity: 0; }
    }

    @keyframes gcm-popIn {
        0% { opacity: 0; transform: scale(0.98); }
        100% { opacity: 1; transform: scale(1); }
    }

    @keyframes gcm-pop40 {
        0% { opacity: 0; transform: translate3d(0, 30px, 0) scale(0.98); }
        60% { opacity: 1; transform: translate3d(0, -2px, 0) scale(1.02); }
        100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    }

    @keyframes gcm-fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes gcm-fadeOut {
        from { opacity: 1; }
        to { opacity: 0; }
    }

    .gcm-anim__bounceInUp {
        animation: gcm-bounceInUp var(--gcm-bounce-dur, 1s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .gcm-chatbot .chatbot-chat-toggle {
        transform: translateY(140%);
        transition: transform 0.15s ease, box-shadow 0.2s ease;
    }

    .gcm-chatbot .chatbot-chat-toggle:hover {
        transform: translateY(-2px);
    }

    .gcm-chatbot .chatbot-chat-toggle:active {
        background: #fff url("bg-pressed-medium-7d641659d7b8b136994e7e26531906d5.svg") no-repeat center center;
        background-size: contain;
    }

    .gcm-chatbot .chatbot-msg.chatbot-bot .chatbot-bubble > *:not(.chatbot-typing-dots)::before {
        content: "";
        position: absolute;
        opacity: 1;
        background:
            linear-gradient(
                90deg,
                var(--bot-bubble-bg) 0%,
                var(--bot-bubble-bg) calc(100% - 42px),
                rgba(255, 255, 255, 0) 100%
            );
        filter: blur(10px);
        transform: translateX(0);
        pointer-events: none;
        animation: bubble-wipe 1.65s cubic-bezier(0.25, 0.7, 0.4, 1) forwards;
        inset: 0;
        will-change: transform, opacity;
    }

    @keyframes bubble-wipe {
        to {
            opacity: 0;
            transform: translateX(110%);
        }
    }

    .gcm-chatbot .chatbot-typing-dots span {
        animation: chatbot-bounce 1.2s infinite ease-in-out;
    }
    .gcm-chatbot .chatbot-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
    .gcm-chatbot .chatbot-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

    .gcm-chatbot .chatbot-btn-send {
        transition: transform 0.15s ease;
    }

    .gcm-chatbot .chatbot-rest--show {
        animation: gcm-popIn 0.22s ease forwards;
    }

    .gcm-chatbot .chatbot-chat-nudge.chatbot-show {
        animation: gcm-bounceInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .gcm-chatbot .chatbot-chat-nudge {
        opacity: 0;
        transform: translate3d(0, 40px, 0) scale(0.98);
        transform-origin: bottom right;
        pointer-events: none;
        will-change: transform, opacity;
    }

    .gcm-rm-fadeIn { animation: gcm-fadeIn 0.28s ease forwards; }
    .gcm-rm-fadeOut { animation: gcm-fadeOut 0.25s ease forwards; }

    .gcm-chatbot .chatbot-chat-panel {
        transform: translateY(12px) scale(0.98);
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .gcm-chatbot .chatbot-chat-panel.chatbot-open {
        transform: translateY(0) scale(1);
    }

    @keyframes gcm-pop40 {
        0% { opacity: 0; transform: translate3d(0, 30px, 0) scale(0.98); }
        60% { opacity: 1; transform: translate3d(0, -2px, 0) scale(1.02); }
        100% { opacity: 1; transform: translate3d(0, 0, 0)  scale(1); }
    }
}

.gcm-chatbot .chatbot-typing-status {
    display: block;
    width: 100%;
    padding: 0 16px;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.25;
    color: var(--muted);
    animation: gcm-fadeIn 0.25s ease;
    word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
    .gcm-chatbot .chatbot-typing-status {
        animation: none;
    }
}
