.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;
}

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

.ash-chat-launcher:focus-visible {
    outline: 3px solid #ffd449;
    outline-offset: 3px;
}

.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%;
    background: var(--ash-green);
    color: #fff;
    font-size: 1.05rem;
}

.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-launcher[data-state="loading"] .ash-chat-launcher__icon {
    animation: ash-chat-pulse 900ms ease-in-out infinite alternate;
}

.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="above"] .ash-chat-launcher {
    bottom: calc(
        max(1rem, env(safe-area-inset-bottom))
        + var(--ash-chat-obstruction-offset, 0px)
    );
}

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

@media (max-width: 480px) {
    .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) {
    .ash-chat-launcher {
        transition: none;
    }

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