.instagram-follow-widget {
    --instagram-avatar-size: 3.55rem;
    position: fixed;
    z-index: 1050;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: min(21rem, calc(100vw - 2rem));
    color: #253047;
    font-family: inherit;
    text-align: right;
}

.instagram-follow-greeting {
    position: relative;
    display: flex;
    direction: ltr;
    align-items: flex-end;
    justify-content: flex-end;
    padding-right: .6rem;
    pointer-events: none;
}

.instagram-follow-doctor {
    /* Keep this wrapper out of a stacking context so the card can sit between the SVGs. */
    position: relative;
    flex: 0 0 clamp(5.5rem, 28vw, 6.4rem);
    margin-bottom: -.7rem;
}

.instagram-follow-doctor svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    animation: instagram-follow-reveal .5s 2.9s both;
}

.instagram-doctor-back {
    position: relative;
    z-index: 0;
}

.instagram-doctor-front {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.instagram-doctor-probe {
    transform-origin: 410px 805px;
    animation: instagram-doctor-probe 4.6s ease-in-out infinite;
}

.instagram-doctor-point {
    transform-origin: 1060px 1040px;
    animation-name: instagram-doctor-point;
    animation-duration: 2s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

    .instagram-doctor-point image {
        clip-path: path("m1132.58,1009.17c-3.33-12.29-25.01-5.01-50.72-17.74-17.91-8.87-86.78-75.67-136.35-75.65-61.08.02-110.52,43.78-123.04,64.13-4.63,7.52-10.13,17.63-18.91,35.57-8.2,16.74-18.74,16.13-19.68,27.73-1.99,24.45,12.51,13.71,12.51,13.71-1.73,18.84-8.44,50.86.95,64.43,4.59,6.63,20.74-.44,25.57-9.39,7.82-14.51,7.3-25.04,12.98-43.52,11.26,8.87,23.54,13.26,35.54,1.61q4.17,7.48,13.04,8c10.96,54.78,21.11,59.65,34.43,68.35,27.74,18.1,91.89,25.75,103.83,22.23,69.91-20.66,123.13-110.4,109.84-159.44Z");
    }

.instagram-doctor-blink {
    opacity: 0;
    animation: instagram-doctor-blink 6.7s linear 2.6s infinite;
}

.instagram-follow-message {
    flex: 0 1 auto;
    min-width: 0;
    direction: rtl;
    overflow-wrap: anywhere;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 .55rem;
    padding: .55rem .85rem;
    border: 1px solid #f7d5e4;
    border-radius: .85rem 0rem .85rem .85rem;
    background: #fff;
    box-shadow: 0 8px 25px #2634511c;
    color: #383249;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.5;
    animation: instagram-follow-reveal .45s 2.8s both;
}

.instagram-follow-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    margin-left: auto;
    min-height: 3.55rem;
    padding: .5rem 1rem .5rem .5rem;
    border: 1px solid #f4e8ee;
    border-radius: 3.55rem 1rem 1rem 3.55rem;
    background: #fff;
    box-shadow: 0 14px 40px #1b25402e, 0 2px 8px #1b254014;
    isolation: isolate;
    animation: instagram-follow-open 1.6s 1s both;
}

.instagram-follow-intro {
    position: absolute;
    inset: 50% auto auto .5rem;
    margin-top: calc(var(--instagram-avatar-size) / -2);
    display: grid;
    place-items: center;
    width: var(--instagram-avatar-size);
    height: var(--instagram-avatar-size);
    animation: instagram-follow-popup 2.5s both;
}

.instagram-follow-intro img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.instagram-follow-avatar {
    flex: 0 0 var(--instagram-avatar-size);
    display: grid;
    place-items: center;
    width: var(--instagram-avatar-size);
    height: var(--instagram-avatar-size);
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    background: linear-gradient(45deg, #ffbb57, #e53e80 55%, #8a46c8);
    box-shadow: 0 0 0 2px #e9639c;
    color: #fff;
    font-size: 1.55rem;
    font-weight: 700;
    animation: instagram-follow-fade-in .55s 2.5s both;
}

.instagram-follow-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instagram-follow-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
    animation: instagram-follow-reveal .45s 2.68s both;
}

.instagram-follow-copy strong {
    font-size: .86rem;
    text-wrap: nowrap;
}

.instagram-follow-copy span {
    overflow: hidden;
    color: #737b8e;
    font-size: .77rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.instagram-follow-link {
    flex: 0 0 auto;
    padding: .52rem .68rem;
    border-radius: .55rem;
    background: #4574e3;
    color: #fff !important;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .2s, transform .2s;
    animation: instagram-follow-reveal .45s 2.82s both;
}

.instagram-follow-link:hover,
.instagram-follow-link:focus-visible {
    background: #315dc4;
    transform: translateY(-2px);
}

.instagram-follow-close {
    position: absolute;
    top: -.55rem;
    left: -.55rem;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: red;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    animation: instagram-follow-reveal .3s 3s both;
}

.instagram-follow-close:hover,
.instagram-follow-close:focus-visible {
    color: #c72b58;
    border-color: #c72b58;
}

.instagram-follow-link:focus-visible,
.instagram-follow-close:focus-visible {
    outline: 3px solid #eb4a9a;
    outline-offset: 2px;
}

@keyframes instagram-follow-open {
    0%, 70% { width: 5.4rem; background: transparent; border-color: transparent; box-shadow: none; }
    90% { width: 100%; background: #fff; }
    100% { width: 100%; }
}

@keyframes instagram-follow-popup {
    0% { transform: rotate(0) scale(.5); opacity: 0; }
    7.2%, 61% { transform: rotate(0) scale(1); opacity: 1; }
    85% { transform: rotate(360deg) scale(1); opacity: 1; }
    100% { transform: rotate(400deg) scale(.35); opacity: 0; visibility: hidden; }
}

.instagram-follow-widget--no-intro .instagram-follow-card { animation: none; }
.instagram-follow-widget--no-intro .instagram-follow-avatar,
.instagram-follow-widget--no-intro .instagram-follow-copy,
.instagram-follow-widget--no-intro .instagram-follow-link,
.instagram-follow-widget--no-intro .instagram-follow-close,
.instagram-follow-widget--no-intro .instagram-follow-message,
.instagram-follow-widget--no-intro .instagram-follow-doctor svg { animation-delay: 0s; }

@keyframes instagram-follow-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes instagram-follow-reveal {
    from { opacity: 0; transform: translateY(.5rem); visibility: hidden; }
    to { opacity: 1; transform: translateY(0); visibility: visible; }
}

@keyframes instagram-doctor-probe {
    0%, 100% { transform: rotate(-2deg) translateX(-5px); }
    50% { transform: rotate(2deg) translateX(5px) translateY(-3px); }
}

@keyframes instagram-doctor-point {
    0%, 100% { transform: rotate(2deg); }
    10% {transform: rotate(-18deg);}
    17% {transform: rotate(-5deg);}
    23% {transform: rotate(-18deg);}
    30% {transform: rotate(-5deg);}
    }

@keyframes instagram-doctor-blink {
    0%, 42%, 46%, 73%, 77%, 100% { opacity: 0; }
    43.5%, 44.5%, 74.5%, 75.5% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .instagram-follow-widget *, .instagram-follow-widget *::before, .instagram-follow-widget *::after { animation: none !important; transition: none !important; }
    .instagram-follow-intro { display: none; }
}
