.banner-plugin-placement,
.banner-plugin-placement * {
    box-sizing: border-box;
}

.banner-plugin-placement {
    --banner-width: 728px;
    --banner-height: 90px;
    --banner-color-a: #111827;
    --banner-color-b: #2563eb;
    --banner-color-c: #22d3ee;
    --banner-gap: 8px;
    --banner-spacing: 12px;
    --banner-layout-width: var(--banner-width);
    --banner-top: 0px;
    --banner-bottom: 0px;
    width: min(100%, var(--banner-width));
    height: var(--banner-height);
    max-width: calc(100vw - 24px);
    min-height: 32px;
    margin: var(--banner-spacing) auto;
    line-height: 1;
    position: relative;
    font-family: Arial, Helvetica, sans-serif;
}

.banner-plugin-frame {
    width: 100%;
    height: 100%;
    min-height: inherit;
    position: relative !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: transparent;
}

.banner-plugin-link,
.banner-plugin-media {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.banner-plugin-revive-media,
.banner-plugin-revive-media ins {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: inherit;
    align-items: center;
    justify-content: center;
}

.banner-plugin-revive-media iframe,
.banner-plugin-revive-media img,
.banner-plugin-revive-media a {
    max-width: 100%;
    max-height: 100%;
}

.banner-plugin-media img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    margin: auto;
    border: 0;
    box-shadow: none;
}

.banner-plugin-placeholder {
    flex-direction: column;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    background:
        linear-gradient(135deg, var(--banner-color-a) 0 32%, var(--banner-color-b) 32% 66%, var(--banner-color-c) 66%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 8px, rgba(255,255,255,0) 8px 16px);
    background-blend-mode: normal, overlay;
}

.banner-plugin-placeholder-meta {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    opacity: .86;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

.banner-plugin-is-multi {
    height: auto;
    width: min(100%, var(--banner-layout-width));
}

.banner-plugin-items {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(var(--banner-columns), minmax(0, 1fr));
    gap: var(--banner-spacing);
}

.banner-plugin-is-multi .banner-plugin-frame {
    height: var(--banner-height);
    min-height: 0;
}

.banner-plugin-close {
    appearance: none;
    -webkit-appearance: none;
    position: absolute !important;
    inset: 0 0 auto auto !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 2;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 6px 0 4px;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    transform: none !important;
    box-shadow: none;
}

.banner-plugin-frame > .banner-plugin-close,
.banner-plugin-items > .banner-plugin-close {
    top: 0 !important;
    right: 0 !important;
}

.banner-plugin-close:hover,
.banner-plugin-close:focus {
    background: rgba(0, 0, 0, .82);
    color: #fff;
    outline: none;
}

.banner-plugin-placement--topbar {
    margin-top: 0;
    margin-bottom: var(--banner-spacing);
}

.banner-plugin-placement--header {
    margin-top: var(--banner-spacing);
    margin-bottom: var(--banner-spacing);
}

.-h-ng-header-holder.banner-plugin-header-internal-ready {
    height: auto !important;
    top: calc(-1 * var(--banner-plugin-sticky-header-height, 176px)) !important;
}

.-h-ng-header-holder.banner-plugin-header-internal-ready[data-scroll="up"] {
    top: 0 !important;
}

.-h-ng-header-holder.banner-plugin-header-internal-ready .-h-ng-header {
    height: auto !important;
}

.-h-ng-header > .banner-plugin-placement--header {
    margin-top: 0;
    margin-bottom: 0;
}

.banner-plugin-placement--content {
    margin: var(--banner-spacing) auto;
}

.banner-plugin-placement--sidebar {
    width: min(100%, var(--banner-width));
    max-width: 100%;
    margin: 0 auto var(--banner-spacing);
}

.banner-plugin-kind--side_left,
.banner-plugin-kind--side_right {
    position: fixed;
    top: var(--banner-top);
    left: auto;
    right: auto;
    width: var(--banner-width);
    height: min(var(--banner-height), calc(100vh - var(--banner-top) - 30px));
    max-width: 250px;
    margin: 0;
    z-index: 99990;
    display: none;
}

.banner-plugin-kind--side_left.banner-plugin-rail-ready,
.banner-plugin-kind--side_right.banner-plugin-rail-ready {
    display: block;
}

.banner-plugin-kind--side_left.banner-plugin-is-multi,
.banner-plugin-kind--side_right.banner-plugin-is-multi {
    height: auto;
    max-height: calc(100vh - var(--banner-top) - 30px);
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: none;
}

.banner-plugin-kind--side_left.banner-plugin-is-multi::-webkit-scrollbar,
.banner-plugin-kind--side_right.banner-plugin-is-multi::-webkit-scrollbar {
    display: none;
}

.banner-plugin-kind--side_left.banner-plugin-is-multi .banner-plugin-items,
.banner-plugin-kind--side_right.banner-plugin-is-multi .banner-plugin-items {
    grid-template-columns: 1fr;
}

body.admin-bar .banner-plugin-kind--side_left,
body.admin-bar .banner-plugin-kind--side_right {
    top: var(--banner-top);
}

body.admin-bar .banner-plugin-kind--side_left.banner-plugin-is-multi,
body.admin-bar .banner-plugin-kind--side_right.banner-plugin-is-multi {
    max-height: calc(100vh - var(--banner-top) - 30px);
}

.banner-plugin-kind--bottom_fixed {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(var(--banner-layout-width), calc(100vw - 16px));
    height: var(--banner-height);
    max-width: calc(100vw - 16px);
    margin: 0;
    z-index: 99995;
}

.banner-plugin-kind--bottom_fixed.banner-plugin-is-multi {
    height: auto;
}

body.banner-plugin-has-bottom-fixed {
    padding-bottom: var(--banner-plugin-bottom-fixed-space, 128px);
}

.banner-plugin-kind--balloon_left,
.banner-plugin-kind--balloon_right {
    position: fixed;
    bottom: var(--banner-bottom);
    width: var(--banner-width);
    height: var(--banner-height);
    max-width: calc(100vw - 20px);
    margin: 0;
    z-index: 100001;
    opacity: 0;
    animation: bannerPluginBalloonIn .8s ease-out .25s forwards;
}

.banner-plugin-kind--balloon_left {
    left: 10px;
}

.banner-plugin-kind--balloon_right {
    right: 10px;
}

@keyframes bannerPluginBalloonIn {
    from {
        opacity: 0;
        transform: translateY(70px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-plugin-kind--popup {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: var(--banner-spacing);
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background: rgba(2, 6, 23, .58);
    transform: none;
    z-index: 100010;
}

.banner-plugin-kind--popup.is-visible {
    display: flex;
}

.banner-plugin-kind--popup .banner-plugin-frame {
    width: min(var(--banner-width), calc(100vw - var(--banner-spacing) - var(--banner-spacing)));
    height: min(var(--banner-height), calc(100vh - var(--banner-spacing) - var(--banner-spacing)));
    min-height: 0;
    max-width: calc(100vw - var(--banner-spacing) - var(--banner-spacing));
    max-height: calc(100vh - var(--banner-spacing) - var(--banner-spacing));
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    z-index: 2;
}

.banner-plugin-kind--popup .banner-plugin-link,
.banner-plugin-kind--popup .banner-plugin-media {
    min-height: 0;
}

.banner-plugin-kind--popup_under {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: var(--banner-spacing);
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background: rgba(2, 6, 23, .42);
    transform: none;
    z-index: 100009;
}

.banner-plugin-kind--popup_under.is-visible {
    display: flex;
}

.banner-plugin-kind--popup_under .banner-plugin-frame {
    width: min(var(--banner-width), calc(100vw - var(--banner-spacing) - var(--banner-spacing)));
    height: min(var(--banner-height), calc(100vh - var(--banner-spacing) - var(--banner-spacing)));
    min-height: 0;
    max-width: calc(100vw - var(--banner-spacing) - var(--banner-spacing));
    max-height: calc(100vh - var(--banner-spacing) - var(--banner-spacing));
    box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

.banner-plugin-kind--popup_under .banner-plugin-link,
.banner-plugin-kind--popup_under .banner-plugin-media {
    min-height: 0;
}

.banner-plugin-is-hidden {
    display: none !important;
}

@media (max-width: 850px) {
    .banner-plugin-hide-mobile,
    .banner-plugin-kind--balloon_left,
    .banner-plugin-kind--balloon_right {
        display: none !important;
    }

    .banner-plugin-kind--bottom_fixed {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
    }

    .banner-plugin-placement--header.banner-plugin-is-multi {
        width: min(var(--banner-width), calc(100vw - 12px));
    }

    .banner-plugin-placement--header .banner-plugin-items {
        gap: 4px;
    }

    .banner-plugin-placement--header .banner-plugin-frame {
        aspect-ratio: var(--banner-aspect-ratio);
        height: auto;
        min-height: 0;
    }

    .banner-plugin-placement--header .banner-plugin-link,
    .banner-plugin-placement--header .banner-plugin-media,
    .banner-plugin-placement--header .banner-plugin-revive-media,
    .banner-plugin-placement--header .banner-plugin-revive-media ins {
        height: 100%;
        min-height: 0;
    }

    .banner-plugin-placement--header .banner-plugin-revive-media iframe,
    .banner-plugin-placement--header .banner-plugin-revive-media img,
    .banner-plugin-placement--header .banner-plugin-revive-media a {
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
        max-height: 100%;
    }

    .banner-plugin-kind--bottom_fixed.banner-plugin-is-multi {
        width: min(var(--banner-width), calc(100vw - 12px));
    }

    .banner-plugin-kind--bottom_fixed .banner-plugin-items {
        gap: 4px;
    }

    .banner-plugin-kind--bottom_fixed .banner-plugin-frame {
        aspect-ratio: var(--banner-aspect-ratio);
        height: auto;
        min-height: 0;
    }

    .banner-plugin-kind--bottom_fixed .banner-plugin-link,
    .banner-plugin-kind--bottom_fixed .banner-plugin-media,
    .banner-plugin-kind--bottom_fixed .banner-plugin-revive-media,
    .banner-plugin-kind--bottom_fixed .banner-plugin-revive-media ins {
        height: 100%;
        min-height: 0;
    }

    .banner-plugin-kind--bottom_fixed .banner-plugin-revive-media iframe,
    .banner-plugin-kind--bottom_fixed .banner-plugin-revive-media img,
    .banner-plugin-kind--bottom_fixed .banner-plugin-revive-media a {
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
        max-height: 100%;
    }

    .banner-plugin-placement--topbar .banner-plugin-items,
    .banner-plugin-placement--header .banner-plugin-items,
    .banner-plugin-placement--content .banner-plugin-items,
    .banner-plugin-kind--bottom_fixed .banner-plugin-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .banner-plugin-placement {
        max-width: calc(100vw - 12px);
    }

    .banner-plugin-placeholder-meta {
        font-size: 9px;
    }
}
