.ig-code-float,
.ig-code-float * {
    box-sizing: border-box;
}

.ig-code-float .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ig-code-float {
    position: fixed;
    z-index: 90;
    top: 50%;
    right: 22px;
    width: min(540px, calc(100vw - 44px));
    height: 62px;
    display: grid;
    justify-items: end;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transform: translateY(-50%);
    pointer-events: none;
}

.ig-code-float__collapsed,
.ig-code-float__panel {
    position: absolute;
    top: 50%;
    right: 0;
    pointer-events: auto;
}

.ig-code-float__collapsed {
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(-50%);
    transition: opacity .2s ease, visibility .2s ease, transform .38s cubic-bezier(.22, 1, .36, 1);
}

.ig-code-float__trigger {
    min-height: 58px;
    padding: 0 9px 0 22px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    background: rgba(216, 242, 36, .96);
    color: #101311;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .58);
    font: 800 13px/1 Inter, ui-sans-serif, system-ui, sans-serif;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .2s ease, transform .3s cubic-bezier(.22, 1, .36, 1);
}

.ig-code-float__trigger:hover,
.ig-code-float__trigger:focus-visible {
    background: #e7ff40;
    outline: none;
    transform: translateX(-3px);
}

.ig-code-float__trigger-arrow {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #101311;
    color: #d8f224;
    font-size: 16px;
}

.ig-code-float__panel {
    width: 100%;
    padding: 7px;
    border: 1px solid rgba(242, 238, 228, .22);
    border-radius: 999px;
    background: rgba(9, 13, 13, .92);
    box-shadow: 0 24px 68px rgba(0, 0, 0, .44), inset 0 1px 0 rgba(255, 255, 255, .05);
    backdrop-filter: blur(22px);
    opacity: 0;
    visibility: hidden;
    transform: translate(22px, -50%) scale(.96);
    transform-origin: right center;
    transition: opacity .22s ease, visibility .22s ease, transform .42s cubic-bezier(.22, 1, .36, 1);
}

.ig-code-float.is-open .ig-code-float__collapsed {
    opacity: 0;
    visibility: hidden;
    transform: translate(18px, -50%) scale(.94);
    pointer-events: none;
}

.ig-code-float.is-open .ig-code-float__panel {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%) scale(1);
}

.ig-code-float__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 7px;
}

.ig-code-float__form input {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 17px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    background: transparent;
    color: #f2eee4;
    font: 760 18px/1 Inter, ui-sans-serif, system-ui, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ig-code-float__form input::placeholder {
    color: rgba(242, 238, 228, .34);
}

.ig-code-float__panel:focus-within {
    border-color: rgba(216, 242, 36, .66);
    box-shadow: 0 0 0 4px rgba(216, 242, 36, .09), 0 24px 68px rgba(0, 0, 0, .44);
}

.ig-code-float__open,
.ig-code-help__button {
    height: 44px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 820;
    cursor: pointer;
}

.ig-code-float__open {
    min-width: 78px;
    padding: 0 20px;
    background: #d8f224;
    color: #101311;
    font-size: 13px;
    transition: background .2s ease, transform .2s ease;
}

.ig-code-float__open:hover,
.ig-code-float__open:focus-visible {
    background: #e7ff40;
    outline: none;
    transform: translateY(-1px);
}

.ig-code-help {
    position: relative;
}

.ig-code-help--collapsed {
    flex: 0 0 auto;
}

.ig-code-help__button {
    width: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(242, 238, 228, .24);
    background: rgba(9, 13, 13, .9);
    color: rgba(242, 238, 228, .9);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .28);
    font-size: 15px;
    transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.ig-code-help--collapsed .ig-code-help__button {
    width: 48px;
    height: 48px;
}

.ig-code-help__button:hover,
.ig-code-help__button:focus-visible,
.ig-code-help.is-open .ig-code-help__button {
    border-color: rgba(216, 242, 36, .62);
    background: rgba(26, 30, 21, .96);
    color: #d8f224;
    outline: none;
    transform: translateY(-1px);
}

.ig-code-help__tooltip {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: calc(100% + 14px);
    width: 288px;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    background: rgba(9, 9, 13, .94);
    color: rgba(255, 255, 255, .88);
    box-shadow: 0 19px 56px rgba(0, 0, 0, .35);
    font-size: 12px;
    font-weight: 520;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .24s ease, visibility .24s ease, transform .36s cubic-bezier(.22, 1, .36, 1);
}

.ig-code-help__tooltip::after {
    position: absolute;
    right: 16px;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: rgba(9, 9, 13, .94);
    content: "";
    transform: rotate(45deg);
}

.ig-code-help:hover .ig-code-help__tooltip,
.ig-code-help:focus-within .ig-code-help__tooltip,
.ig-code-help.is-open .ig-code-help__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 640px) {
    .ig-code-float {
        top: auto;
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        width: calc(100% - 28px);
        transform: none;
    }

    .ig-code-float__collapsed,
    .ig-code-float__panel {
        top: auto;
        bottom: 0;
    }

    .ig-code-float__collapsed {
        transform: none;
    }

    .ig-code-float.is-open .ig-code-float__collapsed {
        transform: translateX(18px) scale(.94);
    }

    .ig-code-float__panel {
        transform: translateX(18px) scale(.96);
    }

    .ig-code-float.is-open .ig-code-float__panel {
        transform: translateX(0) scale(1);
    }

    .ig-code-float__trigger {
        min-height: 54px;
        padding-left: 18px;
    }

    .ig-code-float__form {
        gap: 5px;
    }

    .ig-code-float__form input {
        height: 44px;
        padding: 0 12px;
        font-size: 16px;
    }

    .ig-code-float__open {
        min-width: 67px;
        padding: 0 15px;
    }

    .ig-code-help__button,
    .ig-code-help--collapsed .ig-code-help__button {
        width: 42px;
        height: 42px;
    }

    .ig-code-help__tooltip {
        width: min(288px, calc(100vw - 56px));
    }
}

@media print {
    .ig-code-float {
        display: none !important;
    }
}
