/* Hub Mediavine: class-only desktop leaderboard wells. v=20260901q */

.pm-tx-ad-band {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    border: 0;
    background: transparent;
    text-align: center;
}

/* PC-only in-content wells. Page-top is desktop-only; mobile uses class-only wells between panels. */
@media (max-width: 767px) {
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band[data-pm-hub-place="under-map"],
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band[data-pm-hub-place="under-all-races"],
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band[data-pm-hub-place="above-search"],
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band[data-pm-hub-place="page-bottom"] {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 0 !important;
        pointer-events: none !important;
    }
}

body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band.pm-tx-ad-band--desktop .pm-ad-slot {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 250px !important;
    height: 250px !important;
    max-height: 250px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band.pm-tx-ad-band--desktop .mv-ad-box,
body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band.pm-tx-ad-band--desktop [id^="mvp-"] {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: max-content;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: 100%;
    margin: auto !important;
    overflow: hidden;
    align-self: center;
}
body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band.pm-tx-ad-band--desktop iframe,
body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band.pm-tx-ad-band--desktop img {
    display: block !important;
    float: none !important;
    margin: auto !important;
    align-self: center;
    max-width: 100%;
    max-height: 100%;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band[data-pm-hub-place="page-top"],
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band.pm-tx-ad-band--desktop {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 0 !important;
        pointer-events: none !important;
        background: transparent !important;
    }
}

@media (min-width: 768px) {
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) main.mv-content {
        overflow: visible;
    }
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-grid,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content {
        overflow-x: visible !important;
    }
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band.pm-tx-ad-band--desktop {
        position: relative;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 100%;
        max-width: none;
        margin: 0;
        background: #0b0e13;
        border-top: none;
        border-bottom: 1px solid rgb(30 41 55 / 0.8);
        padding: 16px 1.5rem !important;
        min-height: calc(250px + 32px) !important;
        height: calc(250px + 32px) !important;
        max-height: calc(250px + 32px) !important;
        overflow: hidden;
        text-align: center;
        pointer-events: auto;
        opacity: 1;
        flex-shrink: 0;
    }

    /* House right column is flex-ordered: keep under-map with the map, above-search with Search Polls. */
    body.house-hub-page .senate-right-content > .pm-tx-ad-band[data-pm-hub-place="under-map"] {
        order: 1;
    }
    body.house-hub-page .senate-right-content > .pm-tx-ad-band[data-pm-hub-place="under-all-races"] {
        order: 2;
    }
    body.house-hub-page .senate-right-content > .pm-tx-ad-band[data-pm-hub-place="above-search"] {
        order: 5;
    }

    /* Under-map / above-search / all-races: right column while All Races is showing;
       full viewport when the list is collapsed. */
    body.forecast-hub-races-aside-collapsed:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .senate-right-content {
        overflow-x: visible !important;
    }
    body.forecast-hub-races-aside-collapsed:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .forecast-hub-page-grid {
        overflow: visible;
    }
    body.forecast-hub-races-aside-collapsed:is(.senate-hub-page, .gov-hub-page, .house-hub-page) {
        overflow-x: hidden;
    }
    body.forecast-hub-races-aside-collapsed:is(.senate-hub-page, .gov-hub-page, .house-hub-page)
        .pm-tx-ad-band[data-pm-hub-place="under-map"],
    body.forecast-hub-races-aside-collapsed:is(.senate-hub-page, .gov-hub-page, .house-hub-page)
        .pm-tx-ad-band[data-pm-hub-place="under-all-races"],
    body.forecast-hub-races-aside-collapsed:is(.senate-hub-page, .gov-hub-page, .house-hub-page)
        .pm-tx-ad-band[data-pm-hub-place="above-search"],
    body.forecast-hub-races-aside-collapsed:is(.senate-hub-page, .gov-hub-page, .house-hub-page)
        .pm-tx-ad-band[data-pm-hub-place="page-bottom"] {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
    }

    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band[data-pm-hub-place="page-bottom"] {
        border-top: 1px solid rgb(30 41 55 / 0.8) !important;
        border-bottom: 1px solid rgb(30 41 55 / 0.8) !important;
        margin-bottom: 0 !important;
    }
    html[data-pollsmax-theme="light"] body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band[data-pm-hub-place="page-bottom"] {
        border-top-color: rgba(148, 163, 184, 0.55) !important;
        border-bottom-color: rgba(148, 163, 184, 0.55) !important;
    }
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):has(.pm-tx-ad-band[data-pm-hub-place="page-bottom"]) main.mv-content {
        padding-bottom: 0 !important;
    }
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):has(.pm-tx-ad-band[data-pm-hub-place="page-bottom"]) footer[data-et-site-footer="1"] {
        margin-top: 0 !important;
        border-top: none !important;
    }
    /* Well border-top is the only hairline under All Races / Search Polls. */
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):has(.pm-tx-ad-band[data-pm-hub-place="page-bottom"]) .senate-search-polls-rule-wrap::after,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):has(.pm-tx-ad-band[data-pm-hub-place="page-bottom"]) .gov-search-polls-rule-wrap::after,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):has(.pm-tx-ad-band[data-pm-hub-place="page-bottom"]) .senate-races-aside::before,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):has(.pm-tx-ad-band[data-pm-hub-place="page-bottom"]) main .senate-races-aside::before,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):has(.pm-tx-ad-band[data-pm-hub-place="page-bottom"]) main .senate-races-aside.senate-races-aside--full::before,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):has(.pm-tx-ad-band[data-pm-hub-place="page-bottom"]) main .senate-races-aside.gov-races-aside--full::before {
        content: none !important;
        display: none !important;
        background: none !important;
        height: 0 !important;
    }

    @media (min-width: 1024px) {
        body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band.pm-tx-ad-band--desktop {
            padding-left: 2.5rem !important;
            padding-right: 2.5rem !important;
        }
    }
    @media (min-width: 1280px) {
        body:is(.senate-hub-page, .gov-hub-page, .house-hub-page) .pm-tx-ad-band.pm-tx-ad-band--desktop {
            padding-left: 3.5rem !important;
            padding-right: 3.5rem !important;
        }
    }
}

/*
 * List showing, PC: must load after forecast-hub-page / house-hub-page.
 * Right-column wells extend left to the All Races vline (aside overflows
 * 15px into the right column; .senate-right-content has margin-left: 2px).
 * Page-bottom border-top is the only hairline under the list.
 */
@media (min-width: 1024px) {
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed)
        main .senate-races-aside.senate-races-aside--full,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed)
        main .senate-races-aside.gov-races-aside--full,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed)
        main .senate-races-aside {
        position: relative !important;
        z-index: 5 !important;
        border-right: 1px solid rgba(30, 41, 59, 0.8) !important;
    }
    html[data-pollsmax-theme="light"] body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed)
        main .senate-races-aside {
        border-right-color: rgba(148, 163, 184, 0.55) !important;
    }
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed)
        main .senate-races-aside::after,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed)
        .house-hub-main-column-vline {
        content: none !important;
        display: none !important;
    }
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed)
        .senate-right-content {
        position: relative;
        z-index: 0;
    }
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed)
        .senate-right-content > .pm-tx-ad-band.pm-tx-ad-band--desktop {
        box-sizing: border-box !important;
        width: auto !important;
        max-width: none !important;
        margin-left: 13px !important;
        margin-right: -2.5rem !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        position: relative;
        z-index: 0;
    }
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed):has([data-pm-hub-place="page-bottom"])
        .hub-aside-races-bottom-rule,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed):has([data-pm-hub-place="page-bottom"])
        main .senate-races-aside::before,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed):has([data-pm-hub-place="page-bottom"])
        main .senate-races-aside.senate-races-aside--full::before,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed):has([data-pm-hub-place="page-bottom"])
        main .senate-races-aside.gov-races-aside--full::before,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed):has([data-pm-hub-place="page-bottom"])
        .senate-search-polls-rule-wrap::after,
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed):has([data-pm-hub-place="page-bottom"])
        .gov-search-polls-rule-wrap::after {
        content: none !important;
        display: none !important;
        height: 0 !important;
        background: none !important;
        border: 0 !important;
    }
}
@media (min-width: 1280px) {
    body:is(.senate-hub-page, .gov-hub-page, .house-hub-page):not(.forecast-hub-races-aside-collapsed)
        .senate-right-content > .pm-tx-ad-band.pm-tx-ad-band--desktop {
        margin-left: 13px !important;
        margin-right: -3.5rem !important;
    }
}
