/* Shared AI micro-badge (homepage bubble + corner float). */
.cc-ari-ai-mark {
    display: inline-block;
    padding: 0.06em 0.4em 0.08em;
    margin: 0 0.06em;
    border-radius: 0.38em;
    font-weight: 800;
    font-size: 0.9em;
    letter-spacing: 0.06em;
    line-height: 1.15;
    vertical-align: 0.05em;
    color: #0a6eb8;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, #8FD0FF 42%, #fff) 0%,
        color-mix(in srgb, #2F9BE8 28%, #e8f4fc) 100%
    );
    border: 1px solid color-mix(in srgb, #2F9BE8 45%, transparent);
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent),
        0 0 0 1px color-mix(in srgb, #8FD0FF 18%, transparent);
    text-shadow: none;
}
html[data-theme="dark"] .cc-ari-ai-mark {
    color: #d7efff;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, #5eb6f0 55%, #1a2f45) 0%,
        color-mix(in srgb, #2F9BE8 45%, #142338) 100%
    );
    border-color: color-mix(in srgb, #8FD0FF 42%, transparent);
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #8FD0FF 28%, transparent),
        0 0 10px color-mix(in srgb, #2F9BE8 28%, transparent);
}

.cc-ari-float {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 1040;
    font-family: inherit;
}
.cc-ari-float-launcher-wrap {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
    --cc-ari-hand-protrusion: 0.96rem;
    --cc-ari-hand-chip-gap: 0.88rem;
    --cc-ari-chip-viewport-max: min(18rem, calc(100vw - 8.75rem));
    gap: calc(var(--cc-ari-hand-protrusion) + var(--cc-ari-hand-chip-gap));
    overflow: visible;
}
.cc-ari-float-launcher {
    width: 3.4rem;
    height: 3.4rem;
    border: 0;
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    background: transparent;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    overflow: visible;
}
.cc-ari-hi-hand {
    position: absolute;
    left: calc(-1 * var(--cc-ari-hand-protrusion));
    right: auto;
    bottom: 0.16rem;
    width: 1.52rem;
    height: 2.12rem;
    pointer-events: none;
    z-index: 5;
    background: none;
    filter: drop-shadow(0 2px 4px rgba(11, 23, 36, 0.28));
    /* Wrist-at-cheek pivot. Rest is a light outward lean — never planted vertical. */
    transform-origin: 92% 86%;
    transform: rotate(-20deg);
    animation: cc-ari-hi-wave 6.4s ease-in-out infinite;
}
.cc-ari-hi-hand .cc-ari-hand {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    background: none;
}
/* ~1.4s active (3 wags around a -20deg rest) + 5s pause. Always stays angled; never 0deg. */
@keyframes cc-ari-hi-wave {
    0%, 21.875%, 100% { transform: rotate(-20deg); }
    2.43% { transform: rotate(-28deg); }
    4.86% { transform: rotate(-12deg); }
    7.29% { transform: rotate(-20deg); }
    9.72% { transform: rotate(-28deg); }
    12.15% { transform: rotate(-12deg); }
    14.58% { transform: rotate(-20deg); }
    17.01% { transform: rotate(-28deg); }
    19.44% { transform: rotate(-12deg); }
}
.cc-ari-float-chip-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.35rem;
    max-width: min(28rem, calc(100vw - 5.2rem));
    pointer-events: none;
    overflow: visible;
    position: relative;
    z-index: 3;
    min-height: 1.55em;
    transition: margin 0.35s ease, opacity 0.45s ease, max-width 0.45s ease, visibility 0.45s ease;
}
/* Intro/help bubbles sit left of the waving hand; tails stay on the bubble, not hidden inside it. */
.cc-ari-float-launcher-wrap:has(.cc-ari-hi-hand) .cc-ari-float-chip-stack {
    margin-inline-end: 0;
    padding-inline-end: 0;
}
.cc-ari-float-launcher-wrap:has(.cc-ari-hi-hand) .cc-ari-float-chip-intro::before,
.cc-ari-float-launcher-wrap:has(.cc-ari-hi-hand) .cc-ari-float-chip-help::before {
    right: -0.32rem;
}
/* “Hi - I'm Ari…” sits to the left of the corner chip (in-flow, not clipped).
   EN stays compact; HY/RU (and any long locale) must not truncate mid-word.
   Typewriter grows the bubble via width:max-content as characters appear. */
.cc-ari-float-chip-intro,
.cc-ari-float-chip-help {
    --home-ari-intro-bg: color-mix(in srgb, #eef5fb 82%, #fff 18%);
    --home-ari-intro-border: rgba(26, 47, 69, 0.14);
    position: relative;
    max-width: var(--cc-ari-chip-viewport-max);
    width: max-content;
    margin: 0;
    padding: 0.35rem 0.65rem;
    border-radius: 0.85rem;
    background: var(--home-ari-intro-bg);
    border: 1px solid var(--home-ari-intro-border);
    color: #5a6f86;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    overflow-wrap: normal;
    text-align: start;
    box-shadow: 0 6px 18px rgba(16, 36, 58, 0.12);
    flex: 0 1 auto;
    min-width: 0;
    transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
}
/* Wide screens: allow natural wrap; ticker is narrow-only fallback. */
@media (min-width: 721px) {
    .cc-ari-float:not(.is-open) .cc-ari-float-chip-intro,
    .cc-ari-float:not(.is-open) .cc-ari-float-chip-help {
        white-space: normal;
        overflow: visible;
        overflow-wrap: anywhere;
    }
    .cc-ari-float:not(.is-open) .cc-ari-float-chip-track {
        white-space: normal;
    }
}
.cc-ari-float-chip-intro.is-expanded-text,
.cc-ari-float-chip-help.is-expanded-text {
    white-space: normal;
    overflow-wrap: anywhere;
}
.cc-ari-float-chip-viewport {
    display: block;
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
}
.cc-ari-float-chip-track {
    display: inline-block;
    white-space: nowrap;
}
@keyframes cc-ari-chip-ticker {
    0%, 8% { transform: translateX(0); }
    46% { transform: translateX(var(--cc-ari-ticker-distance, 0px)); }
    54% { transform: translateX(var(--cc-ari-ticker-distance, 0px)); }
    92% { transform: translateX(0); }
    100% { transform: translateX(0); }
}
.cc-ari-float-chip-intro.is-ticker .cc-ari-float-chip-track,
.cc-ari-float-chip-help.is-ticker .cc-ari-float-chip-track {
    animation: cc-ari-chip-ticker var(--cc-ari-ticker-duration, 8s) linear infinite;
}
.cc-ari-float-chip-intro.is-ticker-paused .cc-ari-float-chip-track,
.cc-ari-float-chip-help.is-ticker-paused .cc-ari-float-chip-track {
    animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
    .cc-ari-float-chip-intro.is-ticker .cc-ari-float-chip-track,
    .cc-ari-float-chip-help.is-ticker .cc-ari-float-chip-track {
        animation: none;
    }
    .cc-ari-float-chip-intro.has-overflow,
    .cc-ari-float-chip-help.has-overflow {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
.cc-ari-float-chip-intro::before,
.cc-ari-float-chip-help::before {
    content: "";
    position: absolute;
    right: -0.32rem;
    width: 0.62rem;
    height: 0.62rem;
    background: var(--home-ari-intro-bg);
    border-right: 1px solid var(--home-ari-intro-border);
    border-bottom: 1px solid var(--home-ari-intro-border);
    transform: rotate(-45deg);
    pointer-events: none;
    z-index: 1;
}
.cc-ari-float-chip-intro::before {
    bottom: 0.38rem;
}
.cc-ari-float-chip-help::before {
    top: 50%;
    margin-top: -0.26rem;
}
:lang(en) .cc-ari-float-chip-intro,
:lang(en) .cc-ari-float-chip-help {
    white-space: nowrap;
    overflow-wrap: normal;
}
html[data-theme="dark"] .cc-ari-float-chip-intro,
html[data-theme="dark"] .cc-ari-float-chip-help {
    --home-ari-intro-bg: rgba(36, 52, 74, 0.92);
    --home-ari-intro-border: rgba(101, 173, 243, 0.24);
    color: #9aadc4;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.cc-ari-float-chip-intro .cc-ari-ai-mark,
.cc-ari-float-chip-help .cc-ari-ai-mark {
    opacity: 1;
    filter: none;
    transform: translateY(-0.02em);
}
.cc-ari-float-chip-intro.is-typing,
.cc-ari-float-chip-help.is-typing {
    min-height: 1.55em;
}
/* Dim via text color — not parent opacity — so the AI badge stays a readable
   “AI” pill instead of collapsing visually to a blue dash. */
.cc-ari-float-chip-intro.is-parked {
    opacity: 1;
    transform: translateY(-0.35rem);
    color: color-mix(in srgb, #5a6f86 62%, transparent);
    border-color: color-mix(in srgb, rgba(26, 47, 69, 0.14) 70%, transparent);
    box-shadow: 0 4px 12px rgba(16, 36, 58, 0.08);
}
.cc-ari-float-chip-intro.is-parked .cc-ari-ai-mark {
    opacity: 0.88;
    filter: saturate(0.9);
}
html[data-theme="dark"] .cc-ari-float-chip-intro.is-parked {
    color: color-mix(in srgb, #9aadc4 58%, transparent);
    border-color: color-mix(in srgb, rgba(101, 173, 243, 0.24) 65%, transparent);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}
html[data-theme="dark"] .cc-ari-float-chip-intro.is-parked .cc-ari-ai-mark {
    opacity: 0.9;
}
/* Hide only while the panel is open — not merely .is-conversation.
   History restore adds .is-conversation with the chip minimized; intro must still show. */
.cc-ari-float.is-open .cc-ari-float-chip-stack {
    display: none !important;
}
.cc-ari-float-launcher,
.cc-ari-float-launcher .cc-ai-avatar {
    transition: width 0.4s ease, height 0.4s ease, box-shadow 0.4s ease;
}
/* Reading idle: greetings off, then a small corner icon so listings stay readable. */
.cc-ari-float.is-idle-quiet .cc-ari-float-chip-stack {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-width: 0;
    min-height: 0;
    overflow: hidden;
    margin: 0;
    gap: 0;
}
.cc-ari-float.is-idle-quiet .cc-ari-float-chip-intro,
.cc-ari-float.is-idle-quiet .cc-ari-float-chip-help,
.cc-ari-float.is-idle-quiet .cc-ari-float-chip-intro.is-parked {
    opacity: 0;
    visibility: hidden;
    max-width: 0;
    padding: 0;
    margin: 0;
    border-width: 0;
    transform: none;
}
.cc-ari-float.is-idle-icon .cc-ari-float-launcher-wrap {
    gap: 0;
}
.cc-ari-float.is-idle-icon .cc-ari-float-launcher,
.cc-ari-float.is-idle-icon .cc-ari-float-launcher .cc-ai-avatar {
    width: 2.2rem;
    height: 2.2rem;
}
.cc-ari-float.is-idle-icon .cc-ari-float-launcher {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
.cc-ari-float.is-idle-icon .cc-ari-hi-hand {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.cc-ari-float.is-idle-icon .cc-ari-float-launcher:hover,
.cc-ari-float.is-idle-icon .cc-ari-float-launcher:focus-visible {
    width: 2.45rem;
    height: 2.45rem;
}
.cc-ari-float.is-idle-icon .cc-ari-float-launcher:hover .cc-ai-avatar,
.cc-ari-float.is-idle-icon .cc-ari-float-launcher:focus-visible .cc-ai-avatar {
    width: 2.45rem;
    height: 2.45rem;
}
@media (prefers-reduced-motion: reduce) {
    .cc-ari-float-chip-intro,
    .cc-ari-float-chip-help,
    .cc-ari-float-chip-stack,
    .cc-ari-float-launcher,
    .cc-ari-float-launcher .cc-ai-avatar {
        transition: none;
    }
    .cc-ari-hi-hand {
        animation: none;
        transform: rotate(-20deg);
    }
}
.cc-ari-float-launcher .cc-ai-avatar {
    width: 3.4rem;
    height: 3.4rem;
    margin: 0;
    animation: cc-ari-float 3.2s ease-in-out infinite;
}
.cc-ari-float.is-idle-icon .cc-ari-float-launcher,
.cc-ari-float.is-idle-icon .cc-ari-float-launcher .cc-ai-avatar {
    width: 2.2rem;
    height: 2.2rem;
    min-width: 2.2rem;
    min-height: 2.2rem;
}
.cc-ari-float.is-idle-icon .cc-ari-float-launcher {
    overflow: hidden;
}
@media (pointer: coarse) {
    .cc-ari-float.is-idle-icon .cc-ari-float-launcher-wrap {
        min-width: 2.75rem;
        min-height: 2.75rem;
    }
    .cc-ari-float.is-idle-icon .cc-ari-float-launcher,
    .cc-ari-float.is-idle-icon .cc-ari-float-launcher .cc-ai-avatar {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 2.5rem;
        min-height: 2.5rem;
    }
}
.cc-ari-float.is-idle-icon .cc-ari-float-launcher:hover,
.cc-ari-float.is-idle-icon .cc-ari-float-launcher:focus-visible,
.cc-ari-float.is-idle-icon .cc-ari-float-launcher:hover .cc-ai-avatar,
.cc-ari-float.is-idle-icon .cc-ari-float-launcher:focus-visible .cc-ai-avatar {
    width: 2.45rem;
    height: 2.45rem;
    min-width: 2.45rem;
    min-height: 2.45rem;
}
.cc-ari-float-panel {
    display: none;
    position: relative;
    width: min(28rem, calc(100vw - 1.5rem));
    height: min(70vh, 560px);
    min-width: 280px;
    min-height: 220px;
    max-width: calc(100vw - 1.5rem);
    /* JS publishes --cc-ari-float-max-height from header clearance. */
    max-height: var(--cc-ari-float-max-height, calc(100vh - 1.5rem));
    overflow: hidden;
    border: 1px solid var(--cc-ai-border, rgba(26, 47, 69, 0.12));
    border-radius: 18px;
    background: var(--cc-ai-panel, #fff);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    padding: 0.7rem 0.8rem 0.9rem;
    flex-direction: column;
}
.cc-ari-float.is-maximized .cc-ari-float-panel {
    width: calc(100vw - 1.5rem) !important;
    height: var(--cc-ari-float-max-height, calc(100vh - 1.5rem)) !important;
    max-width: calc(100vw - 1.5rem) !important;
    max-height: var(--cc-ari-float-max-height, calc(100vh - 1.5rem)) !important;
}
html[data-theme="dark"] .cc-ari-float-panel {
    background: var(--cc-theme-dark-surface, #172233);
    border-color: var(--cc-theme-dark-border, #2f3f53);
}
.cc-ari-float.is-open .cc-ari-float-panel {
    display: flex;
}
.cc-ari-float.is-open .cc-ari-float-launcher-wrap,
.cc-ari-float.is-open .cc-ari-float-launcher {
    display: none;
}
.cc-ari-float.is-conversation .cc-ari-float-intro {
    display: none !important;
}
.cc-ari-float-chat-title {
    display: none;
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    color: inherit;
}
.cc-ari-float.is-conversation .cc-ari-float-chat-title {
    display: block !important;
}
.cc-ari-float.is-conversation .cc-ari-float-brand {
    gap: 0.55rem;
    align-items: center;
}
.cc-ari-float.is-conversation .cc-ai-assistant {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.cc-ari-float.is-conversation .cc-ai-shell {
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    min-height: 0;
    max-width: 100%;
    gap: 0.55rem;
}
.cc-ari-float.is-conversation .cc-ai-msg--greeting {
    display: none !important;
}
.cc-ari-float .cc-ai-transcript,
.cc-ari-float .cc-ai-shell,
.cc-ari-float-history-list {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.cc-ari-float .cc-ai-transcript::-webkit-scrollbar,
.cc-ari-float .cc-ai-shell::-webkit-scrollbar,
.cc-ari-float-history-list::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
}
.cc-ari-float.is-conversation .cc-ai-transcript {
    /* flex-basis 0 keeps this the scrollport; content height must not expand the panel. */
    flex: 1 1 0 !important;
    max-height: none !important;
    min-height: 0 !important;
    height: auto;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    order: 1;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
}
/* Short opener / few messages: do not stretch an empty scrollport. */
.cc-ari-float.is-conversation.is-content-fit .cc-ai-transcript {
    flex: 0 1 auto !important;
}
.cc-ari-float.is-conversation .cc-ai-transcript > .cc-ai-msg--bot:not(.cc-ai-msg--greeting),
.cc-ari-float.is-conversation .cc-ai-transcript > .cc-ai-msg--user {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.cc-ari-float.is-conversation .cc-ai-msg-text,
.cc-ari-float.is-conversation .cc-ai-msg-body {
    max-height: none !important;
    overflow: visible !important;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.cc-ai-msg--pending {
    opacity: 0.92;
}
.cc-ai-pending-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-height: 1.2em;
    vertical-align: middle;
}
.cc-ai-pending-dots span {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--cc-ai-accent, #2f6fed) 78%, var(--cc-ai-text, #1f2937));
    opacity: 0.35;
    animation: cc-ai-pending-dot 1.1s ease-in-out infinite;
}
.cc-ai-pending-dots span:nth-child(2) {
    animation-delay: 0.18s;
}
.cc-ai-pending-dots span:nth-child(3) {
    animation-delay: 0.36s;
}
@keyframes cc-ai-pending-dot {
    0%, 80%, 100% { opacity: 0.28; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-0.14rem); }
}
.cc-ai-pending-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.cc-ai-pending-label.is-visible {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 0 0.45rem;
    clip: auto;
    overflow: visible;
    white-space: normal;
    font-size: 0.92em;
    opacity: 0.82;
}
.cc-ai-msg--pending .cc-ai-pending-label.is-visible + .cc-ai-pending-dots,
.cc-ai-msg--pending:has(.cc-ai-pending-label.is-visible) .cc-ai-pending-dots {
    margin-right: 0;
}
.cc-ari-float.is-response-pending:not(.is-open) [data-ari-float-chip-help].is-response-pending {
    opacity: 0.92;
}
.cc-ari-float.is-response-pending.is-idle-quiet:not(.is-open),
.cc-ari-float.is-response-pending.is-idle-icon:not(.is-open) {
    /* Keep Ari visible while a reply is in flight (reading-mode idle suppress). */
}
@media (prefers-reduced-motion: reduce) {
    .cc-ai-pending-dots span {
        animation: none;
        opacity: 0.72;
    }
}
.cc-ari-chat-footer {
    order: 2;
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: auto;
    padding-top: 0.55rem;
    border-top: 1px solid color-mix(in srgb, var(--cc-ai-border, #c5d0dc) 70%, transparent);
}
html[data-theme="dark"] .cc-ari-chat-footer {
    border-top-color: color-mix(in srgb, #65adf3 22%, transparent);
}
.cc-ari-chat-footer .cc-ai-composer {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}
.cc-ari-chat-footer .cc-ai-prompt,
.cc-ari-chat-footer .cc-ai-prompt.form-control,
.cc-ari-chat-footer textarea.cc-ai-prompt {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    max-height: var(--cc-ari-composer-max-height, min(70vh, 36rem)) !important;
    resize: none !important;
    field-sizing: fixed !important;
}
.cc-ari-chat-footer textarea.cc-ai-prompt.is-composer-capped {
    overflow-y: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.cc-ari-chat-footer textarea.cc-ai-prompt.is-composer-capped::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
}
.cc-ai-card-title-link {
    display: inline-block;
    font-weight: 700;
    color: var(--cc-ai-accent, #006db7);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}
.cc-ai-card-title-link:hover,
.cc-ai-card-title-link:focus {
    color: var(--cc-ai-accent, #006db7);
    outline: none;
}
html[data-theme="dark"] .cc-ai-card-title-link {
    color: #9fd8ff;
}
.cc-ari-float-resize {
    position: absolute;
    z-index: 6;
    touch-action: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}
.cc-ari-float-resize--w {
    top: 1.1rem;
    left: 0;
    bottom: 0.75rem;
    width: 0.55rem;
    cursor: ew-resize !important;
}
.cc-ari-float-resize--n {
    top: 0;
    left: 1.1rem;
    right: 0.75rem;
    height: 0.55rem;
    cursor: ns-resize !important;
}
.cc-ari-float-resize--nw {
    left: 0;
    top: 0;
    width: 1.15rem;
    height: 1.15rem;
    cursor: nwse-resize !important;
}
.cc-ari-float-resize--nw::before {
    content: '';
    position: absolute;
    left: 0.28rem;
    top: 0.22rem;
    width: 0.72rem;
    height: 0.72rem;
    pointer-events: none;
    opacity: 0.7;
    background:
        linear-gradient(315deg, transparent 46%, color-mix(in srgb, var(--cc-ai-accent, #006db7) 70%, transparent) 46%),
        linear-gradient(315deg, transparent 62%, color-mix(in srgb, var(--cc-ai-accent, #006db7) 45%, transparent) 62%);
}
.cc-ari-float-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}
.cc-ari-float-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1 1 auto;
}
.cc-ari-float-toolbar-avatar {
    width: 2.55rem;
    height: 2.55rem;
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
}
.cc-ari-float-intro {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.28;
    color: var(--cc-ai-text, #1a2f45);
    white-space: normal;
    max-width: 100%;
    overflow-wrap: anywhere;
}
:lang(en) .cc-ari-float-intro {
    white-space: nowrap;
    overflow-wrap: normal;
}
html[data-theme="dark"] .cc-ari-float-intro {
    color: var(--cc-theme-dark-text, #e5ecf6);
}
.cc-ari-float-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 0 0 auto;
}
.cc-ari-float-minimize,
.cc-ari-float-maximize,
.cc-ari-float-history {
    border: 0;
    background: transparent;
    color: var(--cc-ai-accent, #006db7);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    flex: 0 0 auto;
}
.cc-ari-float-maximize {
    font-size: 0.95rem;
    padding-top: 0.28rem;
}
.cc-ari-float-history {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.2rem;
}
.cc-ari-float-history svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cc-ari-float-history[aria-pressed="true"] {
    border-radius: 0.35rem;
    background: color-mix(in srgb, var(--cc-ai-accent, #006db7) 14%, transparent);
}
/* History stays inside the open Ari panel, below the toolbar (header stays). */
.cc-ari-float-history-panel {
    display: none;
    position: absolute;
    top: var(--cc-ari-float-toolbar-height, 3.25rem);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 8;
    flex-direction: column;
    background: var(--cc-ai-panel, #fff);
    color: var(--cc-ai-text, #1f2937);
    border-radius: 0 0 inherit inherit;
    overflow: hidden;
    pointer-events: auto;
}
.cc-ari-float.is-history-open .cc-ari-float-history-panel {
    display: flex;
}
.cc-ari-float.is-history-open .cc-ai-shell,
.cc-ari-float.is-history-open .cc-ari-chat-footer,
.cc-ari-float.is-history-open .cc-ai-composer,
.cc-ari-float.is-history-open [data-ai-transcript] {
    visibility: hidden;
    pointer-events: none;
}
.cc-ari-float.is-open .cc-ari-float-toolbar {
    position: relative;
    z-index: 9;
}
.cc-ari-float.is-history-open .cc-ari-float-history-panel {
    display: flex;
}
.cc-ari-float-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
    flex: 0 0 auto;
}
.cc-ari-float-history-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}
.cc-ari-float-history-back {
    border: 0;
    background: transparent;
    color: var(--cc-ai-accent, #006db7);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    border-radius: 0.35rem;
}
.cc-ari-float-history-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.55rem 0.65rem 0.9rem;
}
.cc-ari-float-history-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}
.cc-ari-float-history-group {
    margin: 0.55rem 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.62;
}
.cc-ari-float-history-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    display: grid;
    gap: 0.15rem;
    padding: 0.55rem 0.6rem;
    border-radius: 0.55rem;
    cursor: pointer;
}
.cc-ari-float-history-item:hover,
.cc-ari-float-history-item:focus-visible,
.cc-ari-float-history-item.is-active {
    background: color-mix(in srgb, var(--cc-ai-accent, #006db7) 12%, transparent);
}
.cc-ari-float-history-item-label {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
}
.cc-ari-float-history-item-meta {
    font-size: 0.75rem;
    opacity: 0.68;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}
.cc-ari-float-history-empty {
    margin: 1rem 0.4rem;
    font-size: 0.88rem;
    opacity: 0.72;
}
html[data-theme="dark"] .cc-ari-float-history-panel {
    background: var(--cc-ai-panel, #1b2430);
    color: var(--cc-theme-dark-text, #e8eef5);
}
html[data-theme="dark"] .cc-ari-float-history-item {
    background: color-mix(in srgb, var(--cc-ai-panel, #1b2430) 88%, #fff 12%);
    color: inherit;
    border-color: color-mix(in srgb, var(--cc-theme-dark-text, #e8eef5) 14%, transparent);
}
html[data-theme="dark"] .cc-ari-float-history-empty,
html[data-theme="dark"] .cc-ari-float-history-group,
html[data-theme="dark"] .cc-ari-float-history-title {
    color: inherit;
}
.cc-ari-float-viewing-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.85rem 0.45rem;
    border-bottom: 1px solid color-mix(in srgb, var(--cc-ai-accent, #006db7) 18%, transparent);
    background: color-mix(in srgb, var(--cc-ai-accent, #006db7) 8%, transparent);
    flex: 0 0 auto;
}
.cc-ari-float.is-viewing-history:not(.is-history-open) .cc-ari-float-viewing-bar {
    display: flex;
}
.cc-ari-float-viewing-label {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.85;
}
.cc-ari-float-viewing-back {
    border: 0;
    background: transparent;
    color: var(--cc-ai-accent, #006db7);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.cc-ari-float .cc-ai-shell {
    padding-left: 0;
    padding-top: 0;
    max-width: 100%;
    gap: 0.65rem;
}
.cc-ari-float .cc-ai-msg--greeting > .cc-ai-avatar,
.cc-ari-float .cc-ai-help-lead {
    display: none !important;
}
.cc-ari-float .cc-ai-msg--greeting {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    align-self: stretch;
}
.cc-ari-float .cc-ai-msg--greeting.cc-ai-msg--bot {
    background: transparent;
}
.cc-ari-float .cc-ai-msg-body {
    width: 100%;
    max-width: 100%;
}
.cc-ari-float .cc-ai-help-line {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    align-items: center;
}
.cc-ari-float .cc-ai-help-line:has(.cc-ai-help-menu.is-open),
.cc-ari-float .cc-ai-help-line:has(.cc-ai-help-menu:hover),
.cc-ari-float .cc-ai-help-line:has(.cc-ai-help-menu:focus-within) {
    flex-wrap: wrap;
    align-items: flex-start;
}
.cc-ari-float.is-conversation .cc-ari-chat-footer .cc-ai-composer {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
}
.cc-ari-float .cc-ai-composer {
    max-width: none;
    flex: 0 1 auto;
}
.cc-ari-float .cc-ai-prompt,
.cc-ari-float .cc-ai-prompt.form-control,
html[data-theme="dark"] .cc-ari-float .cc-ai-assistant .cc-ai-prompt,
html[data-theme="dark"] .cc-ari-float .cc-ai-assistant .cc-ai-prompt.form-control {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    min-height: calc(1.45em + 0.55rem) !important;
    padding: 0.22rem 0 0.38rem !important;
    line-height: 1.45 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--cc-ai-accent) 40%, var(--cc-ai-border)) !important;
}
.cc-ari-float .cc-ai-prompt:not(textarea) {
    height: auto !important;
}
.cc-ari-float textarea.cc-ai-prompt,
.cc-ari-float .cc-ari-chat-footer .cc-ai-prompt.is-multiline {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    /* JS sets --cc-ari-composer-max-height from available panel space. */
    max-height: var(--cc-ari-composer-max-height, min(70vh, 36rem)) !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
}
.cc-ari-float textarea.cc-ai-prompt.is-composer-capped,
.cc-ari-float .cc-ari-chat-footer .cc-ai-prompt.is-multiline.is-composer-capped {
    overflow-y: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.cc-ari-float textarea.cc-ai-prompt.is-composer-capped::-webkit-scrollbar,
.cc-ari-float .cc-ari-chat-footer .cc-ai-prompt.is-multiline.is-composer-capped::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
}
.cc-ari-float .cc-ai-prompt:focus,
.cc-ari-float .cc-ai-prompt.form-control:focus,
html[data-theme="dark"] .cc-ari-float .cc-ai-assistant .cc-ai-prompt:focus,
html[data-theme="dark"] .cc-ari-float .cc-ai-assistant .cc-ai-prompt.form-control:focus {
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: inset 0 -2px 0 var(--cc-ai-accent) !important;
}
.cc-ari-float .cc-ai-prompt::placeholder {
    color: color-mix(in srgb, var(--cc-ai-muted) 85%, var(--cc-ai-text));
    opacity: 1;
}
html[data-theme="dark"] .cc-ari-float .cc-ai-prompt::placeholder {
    color: var(--cc-theme-dark-muted, #90a0b6);
    opacity: 1;
}
.cc-ari-float:not(.is-conversation) .cc-ai-transcript {
    max-height: min(32vh, 260px);
}
@media (max-width: 575px) {
    .cc-ari-float {
        right: 0.75rem;
        bottom: 0.75rem;
    }
    .cc-ari-float-panel,
    .cc-ari-float.is-maximized .cc-ari-float-panel {
        width: calc(100vw - 1.25rem) !important;
        height: calc(100dvh - 1.5rem) !important;
        max-width: calc(100vw - 1.25rem) !important;
        max-height: calc(100dvh - 1.5rem) !important;
        border-radius: 14px;
    }
    .cc-ari-float-resize,
    .cc-ari-float-maximize {
        display: none !important;
    }
    .cc-ari-float-intro {
        white-space: normal;
    }
    .cc-ari-float .cc-ai-help-line {
        flex-wrap: wrap;
    }
}
