.ig69-sidebar-ad {
    --ig69-ad-ratio:var(--ig69-pc-ratio,2 / 1);
    --ig69-ad-load-width:var(--ig69-pc-load-width,100%);
    --ig69-ad-load-height:var(--ig69-pc-load-height,auto);
    display:flow-root;
    box-sizing:border-box;
    width:100%!important;
    max-width:100%!important;
    min-width:0;
    margin:20px auto;
    padding:0;
    border:0;
    line-height:0;
}
.ig69-sidebar-ad[data-layout="mobile"] {--ig69-ad-ratio:var(--ig69-mobile-ratio,5 / 2);--ig69-ad-load-width:var(--ig69-mobile-load-width,100%);--ig69-ad-load-height:var(--ig69-mobile-load-height,auto)}
.ig69-sidebar-ad[hidden],.ig69-sidebar-ad[data-empty="1"] {display:none!important}
.ig69-sidebar-ad .ig69-sidebar-ad-stage {
    display:block;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    min-width:0;
    margin:0 auto!important;
    padding:0!important;
    border:0!important;
    border-radius:10px;
    overflow:hidden;
    clip-path:inset(0 round 10px);
    box-sizing:border-box;
}
.ig69-sidebar-ad:is([data-state="loading"],[data-state="loading-image"]) .ig69-sidebar-ad-stage {aspect-ratio:var(--ig69-ad-ratio);max-width:var(--ig69-ad-load-width)!important;height:var(--ig69-ad-load-height)!important}
.ig69-sidebar-ad .ig69-sidebar-ad-stage > a,
.ig69-sidebar-ad .ig69-sidebar-ad-stage > a > img {
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-width:100%!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-sizing:border-box;
}
.ig69-sidebar-ad .ig69-sidebar-ad-stage > a > img {aspect-ratio:auto!important;object-fit:contain}
.ig69-sidebar-ad .ig69-sidebar-ad-stage > a:focus-visible {outline:2px solid #fff;outline-offset:-3px}

/* Use normal-flow spacing in the theme's Sidebar; never shift the title. */
html body #sidebar:has(.ig69-sidebar-ad) {--ig69-sidebar-title-gap:20px;--ig69-sidebar-section-gap:20px}
html body #sidebar .ig69-sidebar-ad {margin:0 auto!important}
html body #sidebar:has(.ig69-sidebar-ad) > :is(.sidebar-box,.widget),
html body #sidebar:has(.ig69-sidebar-ad) :is(#sidebar-inner,.sidebar-inner) > :is(.sidebar-box,.widget) {
    margin-block:0 var(--ig69-sidebar-section-gap)!important;
    padding-block:0!important;
}
html body #sidebar:has(.ig69-sidebar-ad) > :is(.sidebar-box,.widget):last-child,
html body #sidebar:has(.ig69-sidebar-ad) :is(#sidebar-inner,.sidebar-inner) > :is(.sidebar-box,.widget):last-child {margin-bottom:0!important}
html body #sidebar:has(.ig69-sidebar-ad) :is(.widget-title,.widgettitle) {margin-block:0 var(--ig69-sidebar-title-gap)!important}
/* A standalone title widget receives its gap from the widget itself. */
html body #sidebar:has(.ig69-sidebar-ad) :is(.sidebar-box,.widget) > :is(.widget-title,.widgettitle):last-child {margin-bottom:0!important}
html body #sidebar:has(.ig69-sidebar-ad) :is(.wp-block-shortcode,.shortcode):has(.ig69-sidebar-ad) {margin-block:0!important;padding-block:0!important}
/* Strip duplicate end margins from normal widget content. */
html body #sidebar:has(.ig69-sidebar-ad) :is(.sidebar-box,.widget) > :is(p,.textwidget,.wp-block-group,.wp-block-group__inner-container,.wp-block-html):last-child,
html body #sidebar:has(.ig69-sidebar-ad) :is(.textwidget,.wp-block-group__inner-container) > :last-child:not(.widget-title,.widgettitle) {margin-bottom:0!important}
html body #sidebar:has(.ig69-sidebar-ad) :is(.textwidget,.wp-block-group__inner-container) > :first-child:not(.widget-title,.widgettitle) {margin-top:0!important}

.ig69-sidebar-ad .ig69-sidebar-ad-stage > a[hidden]{display:none!important}
/* Network HTML has independent native sizing. The stage remains full-width. */
.ig69-sidebar-ad .ig69-sidebar-network{position:relative;box-sizing:border-box;width:100%;max-width:100%;margin:0 auto;overflow:hidden;border-radius:10px;line-height:0}
.ig69-sidebar-ad .ig69-sidebar-network iframe{display:block;position:absolute;top:0;left:0;max-width:none!important;max-height:none!important;border:0!important;margin:0!important;padding:0!important;transform-origin:top left;}
