.ar-ai-chat {
    --ar-ai-ink: #18212f;
    --ar-ai-soft: #667085;
    --ar-ai-line: #e7edf3;
    --ar-ai-main: #176b87;
    --ar-ai-main-2: #21a0a0;
    --ar-ai-deep: #0f4255;
    --ar-ai-accent: #f59e42;
    --ar-ai-bg: #f8fbfd;
    font-family: inherit;
    position: fixed;
    right: 36px;
    bottom: 133px;
    z-index: 9999;
}

.ar-ai-launcher {
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f7fcff 100%);
    border: 1px solid rgba(23, 107, 135, .18);
    border-radius: 999px;
    box-shadow: 0 16px 42px rgba(16, 24, 40, .18);
    color: var(--ar-ai-ink);
    cursor: pointer;
    display: flex;
    gap: 10px;
    min-height: 58px;
    padding: 10px 18px 10px 10px;
    position: relative;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    animation: arAiLauncherFloat 3.4s ease-in-out infinite;
}

.ar-ai-launcher:before {
    border: 1px solid rgba(23, 107, 135, .28);
    border-radius: 999px;
    content: "";
    inset: -8px;
    opacity: 0;
    position: absolute;
    animation: arAiLauncherPulse 2.8s ease-out infinite;
}

.ar-ai-launcher:hover {
    border-color: rgba(33, 160, 160, .45);
    box-shadow: 0 20px 54px rgba(16, 24, 40, .22);
    transform: translateY(-3px) scale(1.02);
}

.ar-ai-launcher__spark {
    align-items: center;
    background: linear-gradient(135deg, var(--ar-ai-main), var(--ar-ai-main-2));
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 38px;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, .12), 0 8px 18px rgba(23, 107, 135, .28);
}

.ar-ai-launcher__text {
    font-weight: 700;
}

.ar-ai-launcher__dot {
    background: var(--ar-ai-accent);
    border: 3px solid #fff;
    border-radius: 50%;
    height: 14px;
    margin-left: -4px;
    width: 14px;
    animation: arAiDotPulse 1.8s ease-in-out infinite;
}

.ar-ai-panel {
    background: #fff;
    border: 1px solid var(--ar-ai-line);
    border-radius: 18px;
    bottom: 68px;
    box-shadow: 0 24px 70px rgba(16, 24, 40, .24);
    display: none;
    flex-direction: column;
    height: 680px;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    position: absolute;
    right: 83px;
    width: 410px;
    transform-origin: bottom right;
}

.ar-ai-chat.is-open .ar-ai-panel {
    animation: arAiPanelIn .28s cubic-bezier(.2, .9, .2, 1.08);
    display: flex;
}

.ar-ai-header {
    align-items: center;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, .22), transparent 24%),
        linear-gradient(135deg, var(--ar-ai-deep), var(--ar-ai-main));
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 18px 20px;
    position: relative;
}

.ar-ai-avatar {
    align-items: center;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
    display: flex;
    font-size: 13px;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    margin-right: 12px;
    width: 42px;
}

.ar-ai-title {
    font-size: 18px;
    font-weight: 800;
}

.ar-ai-status {
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    margin-top: 3px;
}

.ar-ai-close {
    background: rgba(255, 255, 255, .14);
    border: 0;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    height: 34px;
    line-height: 1;
    width: 34px;
    transition: background .2s ease, transform .2s ease;
}

.ar-ai-close:hover {
    background: rgba(255, 255, 255, .24);
    transform: rotate(90deg);
}

.ar-ai-prechat {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.ar-ai-chat.is-ready .ar-ai-prechat {
    display: none;
}

.ar-ai-prechat label span {
    color: var(--ar-ai-soft);
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.ar-ai-prechat input,
.ar-ai-email-card input,
.ar-ai-email-card textarea,
.ar-ai-input {
    border: 1px solid var(--ar-ai-line);
    border-radius: 12px;
    box-sizing: border-box;
    color: var(--ar-ai-ink);
    font: inherit;
    outline: none;
    padding: 12px 13px;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.ar-ai-prechat input:focus,
.ar-ai-email-card input:focus,
.ar-ai-email-card textarea:focus,
.ar-ai-input:focus {
    border-color: rgba(23, 107, 135, .55);
    box-shadow: 0 0 0 4px rgba(23, 107, 135, .10);
}

.ar-ai-start,
.ar-ai-send,
.ar-ai-email-send {
    background: var(--ar-ai-main);
    border: 0;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    padding: 12px 16px;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ar-ai-start:hover,
.ar-ai-send:hover,
.ar-ai-email-send:hover {
    background: #0f5c75;
    box-shadow: 0 10px 22px rgba(23, 107, 135, .24);
    transform: translateY(-1px);
}

.ar-ai-conversation {
    display: none;
    flex: 1;
    min-height: 0;
    position: relative;
}

.ar-ai-chat.is-ready .ar-ai-conversation {
    display: flex;
    flex-direction: column;
}

.ar-ai-messages {
    background:
        linear-gradient(180deg, rgba(248, 251, 253, .92), rgba(239, 247, 249, .96)),
        radial-gradient(circle at 10% 10%, rgba(245, 158, 66, .10), transparent 28%);
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-anchor: none;
    padding: 18px;
}

.ar-ai-jump-bottom {
    align-items: center;
    background: var(--ar-ai-main);
    border: 0;
    border-radius: 999px;
    bottom: 114px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .22);
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 18px;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    left: 50%;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: translate(-50%, 8px);
    transition: opacity .18s ease, transform .18s ease, background .18s ease;
    width: 38px;
    z-index: 2;
}

.ar-ai-jump-bottom.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.ar-ai-jump-bottom:hover {
    background: #0f5c75;
    transform: translate(-50%, -1px);
}

.ar-ai-suggestions {
    clear: both;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 14px;
}

.ar-ai-suggestions button {
    background: #fff;
    border: 1px solid rgba(23, 107, 135, .18);
    border-radius: 999px;
    color: var(--ar-ai-main);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 11px;
    transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.ar-ai-suggestions button:hover {
    background: #eefafa;
    border-color: rgba(33, 160, 160, .4);
    transform: translateY(-1px);
}

.ar-ai-message {
    border-radius: 16px;
    clear: both;
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 10px;
    max-width: 88%;
    padding: 11px 13px;
    word-break: break-word;
    animation: arAiMessageIn .22s ease both;
}

.ar-ai-gap {
    height: 7px;
}

.ar-ai-message--bot,
.ar-ai-message--bot.loading {
    background: #fff;
    border: 1px solid var(--ar-ai-line);
    color: var(--ar-ai-ink);
    float: left;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .06);
}

.ar-ai-message--user {
    background: linear-gradient(135deg, var(--ar-ai-main), var(--ar-ai-main-2));
    color: #fff;
    float: right;
    box-shadow: 0 10px 22px rgba(23, 107, 135, .18);
}

.ar-ai-message--bot.loading {
    min-width: 58px;
}

.ar-ai-message--notice {
    border-color: rgba(245, 158, 66, .35);
}

.ar-ai-message--actions {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.ar-ai-message img {
    border: 1px solid var(--ar-ai-line);
    border-radius: 10px;
    display: block;
    margin: 8px 0 4px;
    max-height: 240px;
    max-width: 100%;
    width: auto;
    box-shadow: 0 6px 16px rgba(16, 24, 40, .10);
}

.ar-ai-chat-image {
    cursor: zoom-in;
    transition: transform .2s ease, box-shadow .2s ease;
}

.ar-ai-chat-image:hover {
    box-shadow: 0 14px 34px rgba(16, 24, 40, .18);
    transform: translateY(-2px);
}

.ar-ai-message a {
    color: #0d6380;
    font-weight: 700;
}

.ar-ai-message .ar-ai-link-button {
    align-items: center;
    background: #f0fafa;
    border: 1px solid rgba(23, 107, 135, .16);
    border-radius: 999px;
    color: var(--ar-ai-main);
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 700;
    gap: 5px;
    line-height: 1.2;
    margin: 3px 4px 3px 0;
    padding: 4px 10px;
    text-decoration: none;
    vertical-align: middle;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.ar-ai-message .ar-ai-link-button:before {
    content: "↗";
    font-size: 11px;
    opacity: .8;
}

.ar-ai-message .ar-ai-link-button:hover {
    background: #dff3f3;
    border-color: rgba(33, 160, 160, .45);
    transform: translateY(-1px);
}

.ar-ai-message .ar-ai-video-link {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(255, 0, 51, .35);
    border-radius: 999px;
    color: #d90429;
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 700;
    gap: 6px;
    line-height: 1.2;
    margin: 4px 4px 3px 0;
    padding: 4px 11px;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}

.ar-ai-message .ar-ai-video-link:hover {
    background: #fff1f3;
    border-color: rgba(255, 0, 51, .55);
}

.ar-ai-lightbox {
    align-items: center;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(8px);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 10020;
}

.ar-ai-lightbox.is-open {
    animation: arAiLightboxIn .18s ease;
    display: flex;
}

.ar-ai-lightbox img {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
    max-height: min(86vh, 900px);
    max-width: min(92vw, 1100px);
    object-fit: contain;
}

.ar-ai-lightbox__close {
    align-items: center;
    background: #fff;
    border: 0;
    border-radius: 999px;
    color: var(--ar-ai-ink);
    cursor: pointer;
    display: flex;
    font-size: 28px;
    height: 42px;
    justify-content: center;
    position: absolute;
    right: 24px;
    top: 24px;
    width: 42px;
}

.ar-ai-message .ar-ai-video-link:before {
    content: "▶";
    font-size: 12px;
}

.ar-ai-message--user a {
    color: #fff;
}

.ar-ai-message pre {
    background: #111827;
    border-radius: 10px;
    color: #e5e7eb;
    font-size: 12px;
    line-height: 1.5;
    margin: 8px 0 4px;
    overflow: auto;
    padding: 10px 12px;
}

.ar-ai-message pre code {
    background: transparent;
    border: 0;
    color: inherit;
    font-size: inherit;
    padding: 0;
}

.ar-ai-message code {
    background: #eef2f6;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #0f5c75;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 1px 5px;
}

.ar-ai-step {
    align-items: flex-start;
    display: flex;
    gap: 9px;
    margin: 6px 0;
}

.ar-ai-choice {
    align-items: flex-start;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(23, 107, 135, .14);
    border-radius: 8px;
    color: var(--ar-ai-ink);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 8px;
    line-height: 1.4;
    margin: 3px -2px;
    padding: 5px 7px;
    text-align: left;
    width: 100%;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.ar-ai-choice:hover {
    background: #eefafa;
    border-color: rgba(33, 160, 160, .38);
    box-shadow: 0 4px 12px rgba(16, 24, 40, .06);
    transform: translateY(-1px);
}

.ar-ai-choice:disabled {
    cursor: default;
    opacity: .58;
    transform: none;
}

.ar-ai-step-no {
    align-items: center;
    background: #e8f7f7;
    border-radius: 999px;
    color: var(--ar-ai-main);
    display: inline-flex;
    flex: 0 0 20px;
    font-size: 11px;
    font-weight: 800;
    height: 20px;
    justify-content: center;
    margin-top: 1px;
    width: 20px;
}

.ar-ai-bullet {
    margin: 7px 0;
    padding-left: 18px;
    position: relative;
}

.ar-ai-bullet:before {
    background: var(--ar-ai-accent);
    border-radius: 50%;
    content: "";
    height: 7px;
    left: 2px;
    position: absolute;
    top: .72em;
    width: 7px;
}

.ar-ai-message strong {
    color: #0f5c75;
    font-weight: 900;
}

.ar-ai-message--user strong {
    color: #fff;
}

.ar-ai-typing {
    align-items: center;
    display: inline-flex;
    gap: 5px;
    height: 18px;
}

.ar-ai-typing i {
    animation: arAiTyping 1s ease-in-out infinite;
    background: var(--ar-ai-main);
    border-radius: 50%;
    display: block;
    height: 7px;
    opacity: .45;
    width: 7px;
}

.ar-ai-typing i:nth-child(2) {
    animation-delay: .14s;
}

.ar-ai-typing i:nth-child(3) {
    animation-delay: .28s;
}

.ar-ai-email-card {
    display: grid;
    gap: 10px;
    max-width: 94%;
    width: 94%;
}

.ar-ai-email-title {
    font-weight: 800;
}

.ar-ai-composer {
    align-items: flex-end;
    background: #fff;
    border-top: 1px solid var(--ar-ai-line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
}

.ar-ai-input {
    flex: 1 1 0;
    max-height: 120px;
    min-height: 46px;
    min-width: 0;
    resize: none;
}

.ar-ai-send {
    flex: 0 0 auto;
    min-height: 46px;
}

.ar-ai-fallback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.ar-ai-after-actions {
    align-items: center;
    color: var(--ar-ai-soft);
    display: flex;
    flex-wrap: wrap;
    font-size: 11.5px;
    gap: 6px;
    margin-top: -2px;
}

.ar-ai-after-actions > span {
    flex-basis: 100%;
    margin-bottom: 1px;
}

.ar-ai-after-actions .ar-ai-fallback-action {
    font-size: 11.5px;
    padding: 4px 10px;
}

.ar-ai-after-actions .ar-ai-guide-action {
    background: #fff8ef;
    border: 1px solid rgba(245, 158, 66, .38);
    border-radius: 999px;
    color: #9a4f08;
    cursor: pointer;
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 4px 10px;
    text-align: left;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.ar-ai-after-actions .ar-ai-guide-action:hover {
    background: #ffead0;
    border-color: rgba(245, 158, 66, .55);
    transform: translateY(-1px);
}

.ar-ai-fallback-action {
    background: #eefafa;
    border: 1px solid rgba(23, 107, 135, .16);
    border-radius: 999px;
    color: var(--ar-ai-main);
    cursor: pointer;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    padding: 6px 12px;
    text-align: left;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.ar-ai-fallback-action:hover {
    background: #e2f6f6;
    border-color: rgba(33, 160, 160, .38);
    transform: translateY(-1px);
}

.ar-ai-guide-highlight {
    animation: arAiGuidePulse 1.2s ease-in-out 6;
    box-shadow: 0 0 0 4px rgba(245, 158, 66, .22), 0 14px 36px rgba(16, 24, 40, .12) !important;
    outline: 3px solid rgba(245, 158, 66, .85) !important;
    outline-offset: 4px;
    position: relative;
    z-index: 1000;
}

@media (max-width: 600px) {
    .ar-ai-chat {
        bottom: 16px;
        right: 16px;
    }

    .ar-ai-panel {
        /* Pin to the VIEWPORT, not to the launcher. On phones other app styles
           shift .ar-ai-chat to right:82px / bottom:90px (so the launcher sits
           beside the search button); a panel positioned relative to it was
           pushed off the top-left corner. position:fixed with explicit
           left/right/bottom keeps it fully on screen with even 16px margins,
           independent of wherever the launcher is placed. */
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 150px;                 /* clears the launcher + search buttons */
        top: auto;
        width: auto;
        max-width: none;
        height: calc(100vh - 166px);   /* leaves a 16px gap at the top */
        max-height: calc(100vh - 166px);
        box-sizing: border-box;
    }
}

@keyframes arAiLauncherFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes arAiLauncherPulse {
    0% { opacity: .55; transform: scale(.96); }
    80%, 100% { opacity: 0; transform: scale(1.14); }
}

@keyframes arAiDotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.22); }
}

@keyframes arAiPanelIn {
    from { opacity: 0; transform: translateY(14px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes arAiMessageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes arAiTyping {
    0%, 80%, 100% { opacity: .35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-4px); }
}

@keyframes arAiLightboxIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes arAiGuidePulse {
    0%, 100% { outline-color: rgba(245, 158, 66, .55); }
    50% { outline-color: rgba(33, 160, 160, .88); }
}

/* Blinking caret on the bubble while the answer is streaming in */
.ar-ai-message.ar-ai-streaming:after {
    animation: arAiCaretBlink .8s steps(1) infinite;
    background: var(--ar-ai-main-2);
    border-radius: 2px;
    content: "";
    display: inline-block;
    height: 13px;
    margin-left: 3px;
    vertical-align: -2px;
    width: 7px;
}

@keyframes arAiCaretBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: .15; }
}

/* Glow on the input after "Give more details" so the user knows where to type */
.ar-ai-input.ar-ai-input--nudge {
    animation: arAiInputNudge 1.2s ease 2;
    border-color: rgba(33, 160, 160, .6);
}

@keyframes arAiInputNudge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(33, 160, 160, 0); }
    40% { box-shadow: 0 0 0 6px rgba(33, 160, 160, .16); border-color: rgba(33, 160, 160, .8); }
}
