#bigbear-chat-launcher {
    position: fixed;
    right: 20px;
    bottom: 18px;
    z-index: 2147482999;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 4px;
    box-sizing: border-box;
    border: 1px solid #c7d7ff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
    color: #334155;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: right 220ms ease, opacity 180ms ease, transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    -webkit-tap-highlight-color: transparent;
}

#bigbear-chat-launcher:hover {
    border-color: #9db8ff;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.18), 0 2px 5px rgba(15, 23, 42, 0.1);
}

.bigbear-chat-open,
.bigbear-chat-toggle {
    appearance: none;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.bigbear-chat-open {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 0 7px 0 8px;
    background: transparent;
    white-space: nowrap;
}

.bigbear-chat-open:focus-visible,
.bigbear-chat-toggle:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.24);
    outline-offset: 1px;
}

#bigbear-chat-launcher.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
}

#bigbear-chat-launcher.is-loading {
    cursor: wait;
}

#bigbear-chat-launcher.is-loading .bigbear-chat-open {
    cursor: wait;
}

.bigbear-chat-status {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.bigbear-chat-wave {
    font-size: 14px;
    line-height: 1;
}

.bigbear-chat-label {
    white-space: nowrap;
}

.bigbear-chat-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    flex: 0 0 26px;
    border-radius: 50%;
    background: #f1f5ff;
    color: #6684cf;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.bigbear-chat-toggle:hover {
    background: #e7eeff;
    color: #315fd1;
    transform: translateX(1px);
}

.bigbear-chat-toggle svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    transition: transform 220ms ease;
}

#bigbear-chat-launcher.is-collapsed {
    right: -1px;
    border-radius: 999px 0 0 999px;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.16);
}

#bigbear-chat-launcher.is-collapsed .bigbear-chat-open {
    display: none;
}

#bigbear-chat-launcher.is-collapsed .bigbear-chat-toggle {
    width: 31px;
    height: 30px;
    flex-basis: 31px;
    border-radius: 999px 0 0 999px;
}

#bigbear-chat-launcher.is-collapsed .bigbear-chat-toggle svg {
    transform: rotate(180deg);
}

#bigbear-chat-launcher.is-collapsed .bigbear-chat-toggle:hover {
    transform: none;
}

html.dark-theme #bigbear-chat-launcher,
body.dark-theme #bigbear-chat-launcher,
[data-theme="dark"] #bigbear-chat-launcher {
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(30, 41, 59, 0.94);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    color: #e2e8f0;
}

html.dark-theme .bigbear-chat-toggle,
body.dark-theme .bigbear-chat-toggle,
[data-theme="dark"] .bigbear-chat-toggle {
    background: rgba(96, 129, 214, 0.18);
    color: #a8bfff;
}

@media (max-width: 667px) {
    #bigbear-chat-launcher {
        right: 12px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        max-width: calc(100vw - 24px);
    }

    #bigbear-chat-launcher.is-collapsed {
        right: -1px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #bigbear-chat-launcher,
    .bigbear-chat-toggle,
    .bigbear-chat-toggle svg {
        transition: none;
    }
}
