html body button.ash-chat-launcher[data-ash-chat-launcher] {
    --ash-blue: #0757a6;
    --ash-green: #168447;
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 99990;
    display: inline-flex;
    min-height: 3.25rem;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem 0.55rem 0.55rem;
    border: 0;
    border-radius: 999px;
    background: var(--ash-blue);
    color: #fff;
    font: 700 0.95rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow: 0 0.75rem 2rem rgba(7, 42, 76, 0.28);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

html body button.ash-chat-launcher[data-ash-chat-launcher]:hover {
    background: #064b8e;
    box-shadow: 0 0.9rem 2.2rem rgba(7, 42, 76, 0.34);
    transform: translateY(-2px);
}

html body button.ash-chat-launcher[data-ash-chat-launcher]:focus-visible {
    outline: 3px solid #ffd449;
    outline-offset: 3px;
}

html body button.ash-chat-launcher[data-ash-chat-launcher]:disabled {
    cursor: wait;
    opacity: 0.8;
    transform: none;
}

.ash-chat-launcher__icon {
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.82);
    background: #fff;
    color: #fff;
    font-size: 1.05rem;
}

.ash-chat-launcher__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
}

.ash-chat-launcher__unread {
    position: absolute;
    top: -0.25rem;
    right: -0.15rem;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.25rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #b42318;
    color: #fff;
    font-size: 0.7rem;
    line-height: 1rem;
}

.ash-chat-invitation[data-ash-chat-invitation] {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(max(5.25rem, env(safe-area-inset-bottom) + 5.25rem));
    z-index: 99989;
    width: min(21rem, calc(100vw - 2rem));
    padding: .9rem;
    border: 1px solid #c9d8e6;
    border-radius: .9rem;
    background: #fff;
    color: #173044;
    box-shadow: 0 .75rem 2rem rgba(7, 42, 76, .2);
    font: 400 .94rem/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ash-chat-invitation p { margin: 0 0 .75rem; }
.ash-chat-invitation__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ash-chat-invitation__actions button {
    min-height: 44px;
    border: 1px solid #0757a6;
    border-radius: .55rem;
    padding: .5rem .75rem;
    background: #0757a6;
    color: #fff;
    font: 650 .9rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ash-chat-invitation__actions .ash-chat-invitation__dismiss { background: #fff; color: #0757a6; }
.ash-chat-invitation__actions button:focus-visible { outline: 3px solid #ffd449; outline-offset: 2px; }

html body button.ash-chat-launcher[data-ash-chat-launcher][data-state="loading"] .ash-chat-launcher__icon {
    animation: ash-chat-pulse 900ms ease-in-out infinite alternate;
}

html body button.ash-chat-launcher[data-ash-chat-launcher][data-state="error"] {
    background: #8b1e1e;
}

:root[data-ash-chat-obstruction="left"] .ash-chat-launcher {
    right: auto;
    left: max(1rem, env(safe-area-inset-left));
}

:root[data-ash-chat-obstruction="left"] .ash-chat-invitation { right: auto; left: max(1rem, env(safe-area-inset-left)); }

:root[data-ash-chat-obstruction="above"] .ash-chat-launcher {
    bottom: calc(
        max(1rem, env(safe-area-inset-bottom))
        + var(--ash-chat-obstruction-offset, 0px)
    );
}

:root[data-ash-chat-obstruction="above"] .ash-chat-invitation {
    bottom: calc(max(5.25rem, env(safe-area-inset-bottom) + 5.25rem) + var(--ash-chat-obstruction-offset, 0px));
}

@keyframes ash-chat-pulse {
    to {
        opacity: 0.45;
        transform: scale(0.92);
    }
}

@media (max-width: 480px) {
    html body button.ash-chat-launcher[data-ash-chat-launcher] {
        min-height: 3rem;
        padding-right: 0.85rem;
    }

    .ash-chat-launcher__label {
        max-width: 10.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body button.ash-chat-launcher[data-ash-chat-launcher] {
        transition: none;
    }

    html body button.ash-chat-launcher[data-ash-chat-launcher][data-state="loading"] .ash-chat-launcher__icon {
        animation: none;
    }
}
