/* ============================================================================
   BenchBalancer — Ad Banner (Everything Sports)
   A flush, full-width bar on the app's own background that slides up from behind
   the bottom menu and sits directly above it (matches the iOS treatment).
   Shared across dashboards, dashboard-linked pages, and game pages (halftime).
   Paired with js/ad-banner.js.
   ========================================================================== */

.bb-ad-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* --bb-ad-bottom is set by JS to the bottom-nav height so the bar rests
       directly on top of it. The hidden state translates it fully below the
       nav so it appears to emerge from behind the bottom menu. */
    transform: translateY(calc(100% + var(--bb-ad-bottom, 0px) + 8px));
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 999; /* below .bottom-nav (1000) so it slides up from behind it */
    background: #2e4147; /* app slate — reads as part of the structure */
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.45);
    padding: 42px 10px 6px;
    pointer-events: none;
    will-change: transform;
}

.bb-ad-banner.is-visible {
    transform: translateY(calc(-1 * var(--bb-ad-bottom, 0px)));
    pointer-events: auto;
}

/* Inner wrapper keeps the creative a sensible width on desktop while the slate
   bar spans full width like the iOS bar. */
.bb-ad-banner__inner {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.bb-ad-banner__link {
    display: block;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.bb-ad-banner__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.bb-ad-banner__close {
    position: absolute;
    top: 6px;
    right: max(12px, calc((100vw - 600px) / 2 + 8px));
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 3;
    transition: background 0.2s, transform 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.bb-ad-banner__close:hover {
    background: #ff5f6d;
    transform: scale(1.08);
}

.bb-ad-banner__close:focus-visible {
    outline: 2px solid #01c1ce;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .bb-ad-banner {
        transition: opacity 0.2s ease;
        opacity: 0;
    }
    .bb-ad-banner.is-visible {
        opacity: 1;
    }
}
