/* NOVABET789 — CMS Banner Placement V3.0.2
 * Exact Dimension + Position rendering.
 *
 * Rules:
 * - Inline placements render at the selected width and scale down only when the viewport is narrower.
 * - Floating renders centered in the viewport with a premium attention effect.
 * - Side Left/Right render as fixed edge advertisements on every viewport.
 * - Side rails retain the selected dimensions when they fit and scale down proportionally otherwise.
 * - Mobile side rails intentionally render smaller so they do not cover too much of the screen.
 * - All image proportions are preserved by the shared slider renderer.
 */
.nova-cms-placement {
    position: relative;
    z-index: 7;
    width: min(100%, var(--nova-placement-width, 1280px));
    max-width: var(--nova-placement-width, 1280px);
    margin: 12px auto;
    box-sizing: border-box;
}

.nova-cms-placement > .nova-cms-banner {
    width: 100%;
    max-width: 100% !important;
    margin: 0;
}

.nova-cms-placement--middle,
.nova-cms-placement--promotion,
.nova-cms-placement--game,
.nova-cms-placement--footer {
    clear: both;
}

.nova-cms-placement--promotion > .nova-cms-banner {
    border-color: rgba(244, 201, 95, .36);
}

.nova-cms-placement--game > .nova-cms-banner {
    border-color: rgba(74, 226, 206, .34);
}

.nova-cms-placement--footer {
    margin-top: 18px;
    margin-bottom: 18px;
}

.nova-cms-placement__dismiss {
    position: absolute;
    z-index: 9;
    top: 6px;
    right: 6px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .72);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: novaDismissPulse 2.8s ease-in-out infinite;
}

.nova-cms-placement[hidden] {
    display: none !important;
}

body .nova-cms-placement--page-landing:not(.nova-cms-placement--floating):not(.nova-cms-placement--sidebar_left):not(.nova-cms-placement--sidebar_right) {
    box-sizing: border-box;
}

/* Center floating advertisement. */
.nova-cms-placement--floating {
    position: fixed;
    z-index: 120;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(var(--nova-placement-render-width, 600px), calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    margin: 0;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .44));
    animation: novaFloatingBob 3.8s ease-in-out infinite;
    will-change: transform, filter;
}

.nova-cms-placement--floating > .nova-cms-banner {
    border-color: rgba(244, 201, 95, .48);
    border-radius: 14px;
    animation: novaBannerGlow 2.8s ease-in-out infinite;
}

/* Side advertisements are real fixed edge windows, not inline banners.
 * They are intentionally visible on mobile/tablet/desktop when enabled in CMS.
 * JS calculates --nova-placement-render-width so an exact 160×600 remains
 * 160×600 whenever it fits the viewport and scales proportionally otherwise.
 * On mobile the renderer intentionally targets a smaller width so the ad does
 * not block too much of the screen.
 */
.nova-cms-placement--sidebar_left,
.nova-cms-placement--sidebar_right {
    position: fixed;
    z-index: 86;
    top: 50%;
    display: block;
    width: min(var(--nova-placement-render-width, 160px), calc(100vw - 16px));
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    margin: 0;
    transform: translateY(-50%);
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .40));
    animation: novaSideBob 4.2s ease-in-out infinite;
    will-change: transform, filter;
}

.nova-cms-placement--sidebar_left {
    left: max(8px, env(safe-area-inset-left));
    right: auto;
}

.nova-cms-placement--sidebar_right {
    right: max(8px, env(safe-area-inset-right));
    left: auto;
}

.nova-cms-placement--sidebar_left > .nova-cms-banner,
.nova-cms-placement--sidebar_right > .nova-cms-banner {
    width: 100%;
    margin: 0;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .34);
    animation: novaBannerGlow 2.8s ease-in-out infinite;
}

@keyframes novaFloatingBob {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, calc(-50% - 8px));
    }
}

@keyframes novaSideBob {
    0%, 100% {
        transform: translateY(-50%);
    }
    50% {
        transform: translateY(calc(-50% - 8px));
    }
}

@keyframes novaBannerGlow {
    0%, 100% {
        box-shadow: 0 12px 28px rgba(0, 0, 0, .34), 0 0 0 rgba(244, 201, 95, 0);
        filter: saturate(1);
    }
    50% {
        box-shadow: 0 14px 32px rgba(0, 0, 0, .42), 0 0 18px rgba(244, 201, 95, .34);
        filter: saturate(1.06);
    }
}

@keyframes novaDismissPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(244, 201, 95, 0);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 12px rgba(244, 201, 95, .26);
    }
}

@media (min-width: 768px) {
    .nova-cms-placement:not(.nova-cms-placement--floating):not(.nova-cms-placement--sidebar_left):not(.nova-cms-placement--sidebar_right) {
        margin-top: 16px;
        margin-bottom: 16px;
    }
}

@media (max-width: 767px) {
    .nova-cms-placement--middle,
    .nova-cms-placement--promotion,
    .nova-cms-placement--game,
    .nova-cms-placement--footer {
        width: min(100%, var(--nova-placement-width, 1280px));
        margin: 10px auto;
    }

    .nova-cms-placement--floating {
        max-width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
    }

    .nova-cms-placement--floating .nova-cms-banner__nav {
        width: 28px;
        height: 28px;
    }

    .nova-cms-placement--sidebar_left,
    .nova-cms-placement--sidebar_right {
        filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .34));
    }

    .nova-cms-placement--sidebar_left .nova-cms-placement__dismiss,
    .nova-cms-placement--sidebar_right .nova-cms-placement__dismiss {
        top: 4px;
        right: 4px;
        width: 26px;
        height: 26px;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nova-cms-placement--floating,
    .nova-cms-placement--sidebar_left,
    .nova-cms-placement--sidebar_right,
    .nova-cms-placement--floating > .nova-cms-banner,
    .nova-cms-placement--sidebar_left > .nova-cms-banner,
    .nova-cms-placement--sidebar_right > .nova-cms-banner,
    .nova-cms-placement__dismiss {
        animation: none !important;
        filter: none;
    }
}
