/* Latest Polls Mediavine: class-only wells. v=20260901e
 * In-feed wells keep the same 1.25rem air the date hairlines use. */

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

body.all-polls-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.all-polls-page .pm-tx-ad-band.pm-tx-ad-band--desktop .mv-ad-box,
body.all-polls-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.all-polls-page .pm-tx-ad-band.pm-tx-ad-band--desktop iframe,
body.all-polls-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;
}

/* Top well: under header + strip, never sticky — scrolls away with the header. */
body.all-polls-page .pm-tx-ad-band[data-pm-lp-place="page-top"] {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    z-index: 1;
    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;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    body.all-polls-page .pm-tx-ad-band[data-pm-lp-place="page-top"] {
        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;
        background: transparent;
    }
}

@media (min-width: 768px) {
    body.all-polls-page .pm-tx-ad-band[data-pm-lp-place="infeed"] {
        position: relative;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: calc(100% + 2 * var(--all-polls-content-x, 1.5rem)) !important;
        max-width: none !important;
        margin-left: calc(-1 * var(--all-polls-content-x, 1.5rem)) !important;
        margin-right: calc(-1 * var(--all-polls-content-x, 1.5rem)) !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        background: #0b0e13;
        border-top: 1px solid rgba(51, 65, 85, 0.45);
        border-bottom: 1px solid rgba(51, 65, 85, 0.45);
        /* Match page-top well height (250px slot + 16px above/below). */
        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;
        flex-shrink: 0;
    }

    /* Date blocks keep padding: 1.25rem 0 — same air as a date hairline.
       Drop only the previous block's bottom line so it doesn't double the well. */
    body.all-polls-page .all-polls-date-block:has(+ .pm-tx-ad-band[data-pm-lp-place="infeed"]) {
        border-bottom: none !important;
    }

    @media (min-width: 1024px) {
        body.all-polls-page .pm-tx-ad-band[data-pm-lp-place="page-top"],
        body.all-polls-page .pm-tx-ad-band[data-pm-lp-place="infeed"] {
            padding-left: 2.5rem !important;
            padding-right: 2.5rem !important;
        }
    }
    @media (min-width: 1280px) {
        body.all-polls-page .pm-tx-ad-band[data-pm-lp-place="page-top"],
        body.all-polls-page .pm-tx-ad-band[data-pm-lp-place="infeed"] {
            padding-left: 3.5rem !important;
            padding-right: 3.5rem !important;
        }
    }
}

@media (max-width: 767px) {
    body.all-polls-page .pm-tx-ad-band[data-pm-lp-place="infeed"] {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 0 !important;
    }
}

/* Kill leftover dual in-feed 24px ad-gap if an old shell is still in the DOM. */
body.all-polls-page .pollsmax-ad-row--latest-polls-infeed {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
}
