#afia-v2 {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10001;
}

#afia-v2-open {
    position: relative;
    display: grid;
    width: 68px;
    aspect-ratio: 1;
    place-items: center;
    padding: 0;
    cursor: pointer;
    border: 2px solid #69d8e8;
    border-radius: 50%;
    color: #f4fcff;
    background: radial-gradient(circle, #09263a 0 30%, #1592ad 32% 43%, #061a2d 45% 61%, #1ab2c3 63% 69%, #04111f 71% 100%);
    box-shadow: 0 0 0 4px rgb(18 149 174 / 24%), 0 8px 24px rgb(0 0 0 / 38%);
    font: 700 12px/1 system-ui, sans-serif;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

#afia-v2-open::before {
    position: absolute;
    inset: 7px;
    border: 1px solid rgb(191 244 255 / 72%);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

#afia-v2-open:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 6px rgb(18 149 174 / 30%), 0 10px 28px rgb(0 0 0 / 42%);
}

#afia-v2-open:focus-visible {
    outline: 3px solid #ffe49a;
    outline-offset: 4px;
}

#afia-v2-window {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(8px, 2vw, 24px);
    color: #eff8ff;
    background: rgb(3 10 18 / 72%);
    backdrop-filter: blur(2px);
    clip-path: circle(0 at var(--afia-origin-x, 50%) var(--afia-origin-y, 50%));
    transition: clip-path 720ms cubic-bezier(.2, .8, .2, 1);
}

#afia-v2-window.is-open {
    clip-path: circle(150vmax at var(--afia-origin-x, 50%) var(--afia-origin-y, 50%));
}

#afia-v2-window > afia-v2 {
    display: block;
    width: min(100%, 86vw, 110vh);
    max-height: 100%;
    overflow: auto;
}

#afia-v2-window[hidden] {
    display: none;
}

@media (max-width: 650px) {
    #afia-v2 {
        right: 16px;
        bottom: 16px;
    }

    #afia-v2-open {
        width: 60px;
    }

    #afia-v2-window > afia-v2 {
        width: 100%;
        max-height: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #afia-v2-open,
    #afia-v2-window {
        transition: none;
    }
}
