.client-avatar__bubble {
    box-sizing: border-box;
    width: 15rem;
    max-width: calc(100vw - 7.75rem);
    max-height: calc(100dvh - 7rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.client-avatar__bubble.is-actions-open {
    width: 19rem;
}

.client-avatar__bubble [data-client-avatar-prompt] {
    min-height: 6.5rem;
}

.client-avatar__bubble [data-client-avatar-prompt][hidden] {
    display: none;
}

.client-avatar__actions[hidden] {
    display: none;
}

.client-avatar__actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.client-avatar__bubble .client-avatar__actions-title {
    margin: 0 0 0.4rem;
    color: var(--body);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.client-avatar__actions-list {
    display: grid;
    gap: 0.3rem;
}

.client-avatar__actions-list a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.client-avatar__actions-list a:hover,
.client-avatar__actions-list a:focus-visible {
    border-color: var(--navy);
    background: var(--mist);
}

.client-avatar__bubble .client-avatar__detail {
    margin: 0 0 0.65rem;
    color: var(--body);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.45;
}

.client-avatar__appointment-link {
    display: inline-block;
    min-height: 1.5rem;
    color: var(--navy);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.client-avatar__appointment-link:hover,
.client-avatar__appointment-link:focus-visible {
    color: var(--navy-deep);
}

.client-avatar__bubble .home-auth-guide__links {
    margin-top: 0.55rem;
}

.client-avatar__notification-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--navy);
    border-radius: var(--radius-sm);
    background: var(--navy);
    color: var(--white);
    font: inherit;
    font-size: var(--text-sm);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.client-avatar__notification-button:hover,
.client-avatar__notification-button:focus-visible {
    background: var(--navy-deep);
}

@media (max-width: 860px) {
    .app-shell--client .client-avatar {
        bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 520px) {
    body:has(.contact-form:focus-within) .client-avatar {
        opacity: 0;
        pointer-events: none;
    }

    .client-avatar__bubble {
        width: 12rem;
        max-width: calc(100vw - 6rem);
    }

    .client-avatar__bubble .home-auth-guide__links a,
    .client-avatar__notification-button {
        min-height: 2.5rem;
    }

    .client-avatar .home-auth-guide__avatar-caption {
        max-height: 2.5rem;
        overflow: hidden;
        overflow-wrap: anywhere;
    }
}

.client-avatar__bubble[hidden] {
    display: none;
}

.client-avatar.is-positioned {
    right: auto;
    bottom: auto;
    width: max-content;
    max-width: none;
    z-index: 110;
}

.client-avatar.is-positioned .client-avatar__bubble {
    position: absolute;
    right: auto;
    bottom: auto;
    align-self: auto;
    z-index: 1;
}

.client-avatar .home-auth-guide__avatar-toggle {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.client-avatar .home-auth-guide__avatar {
    -webkit-user-drag: none;
}

.client-avatar.is-dragging .home-auth-guide__avatar-toggle {
    cursor: grabbing;
}
