/**
 * Monetized article format: ad slots, page navigation, offer CTA.
 *
 * Ad containers reserve height so the page does not shift when a creative
 * loads. Layout shift is the most common complaint about mid-article units.
 */

.upbeat-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 34px auto;
    max-width: 728px;
}
.upbeat-ad--mid { max-width: 336px; }

.upbeat-ad__label {
    font-size: .63rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #9aa9b3;
    margin-bottom: 6px;
}

/* Reserve space to avoid layout shift. collapseEmptyDivs() removes the
   container entirely when there is no fill, so this costs nothing on no-fill. */
.upbeat-ad--top > div,
.upbeat-ad--bottom > div { min-height: 90px; width: 100%; }
.upbeat-ad--mid > div    { min-height: 250px; width: 100%; }

.ad-debug .upbeat-ad {
    outline: 2px dashed #c0392b;
    outline-offset: 4px;
    min-height: 100px;
    background: repeating-linear-gradient(45deg, #fff, #fff 10px, #fdf1f0 10px, #fdf1f0 20px);
}
.ad-debug .upbeat-ad::after {
    content: "slot: " attr(data-slot-id);
    font-family: ui-monospace, Menlo, monospace;
    font-size: .72rem;
    font-weight: 700;
    color: #c0392b;
}

/* -------------------------------------------------------------------------
   Container
   ------------------------------------------------------------------------- */
.upbeat-mon {
    max-width: 706px;
    margin: 40px auto 0;
}

/* -------------------------------------------------------------------------
   Continue to next page
   ------------------------------------------------------------------------- */
.upbeat-next {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-height: 58px;
    padding: 16px 24px;
    background: #0a4ea8;
    color: #fff;
    border-radius: 12px;
    font-size: 1.06rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background .15s ease, transform .1s ease;
}
.upbeat-next:hover { background: #083b7f; color: #fff; }
.upbeat-next:active { transform: scale(.995); }
.upbeat-next:focus-visible { outline: 3px solid #10171d; outline-offset: 3px; }

.upbeat-next__meta {
    font-size: .8rem;
    font-weight: 500;
    opacity: .82;
}

/* -------------------------------------------------------------------------
   Offer block
   ------------------------------------------------------------------------- */
.upbeat-offer {
    margin-top: 10px;
    padding: 28px 24px;
    background: #f5f9f6;
    border: 1px solid #d9e8de;
    border-radius: 16px;
    text-align: center;
}

.upbeat-offer__title {
    margin: 0 0 8px;
    font-size: 1.38rem;
    font-weight: 750;
    letter-spacing: -.02em;
    color: #10171d;
}
.upbeat-offer__body {
    margin: 0 0 18px;
    color: #3d4d5a;
    font-size: 1rem;
    line-height: 1.55;
}

.upbeat-offer__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    padding: 16px 24px;
    background: #11794a;
    color: #fff;
    border-radius: 12px;
    font-size: 1.08rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease, transform .1s ease;
}
.upbeat-offer__cta:hover { background: #0d5f3a; color: #fff; }
.upbeat-offer__cta:active { transform: scale(.995); }
.upbeat-offer__cta:focus-visible { outline: 3px solid #10171d; outline-offset: 3px; }

/* Disclosure is required, not decorative: the CTA is a compensated link. */
.upbeat-offer__disclosure {
    margin: 14px 0 0;
    font-size: .78rem;
    line-height: 1.5;
    color: #6b7c87;
}

.upbeat-offer__unset {
    margin: 0;
    padding: 14px;
    border: 1px dashed #c0392b;
    border-radius: 10px;
    color: #c0392b;
    font-size: .88rem;
    font-weight: 600;
}

/* -------------------------------------------------------------------------
   Page links
   ------------------------------------------------------------------------- */
.upbeat-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #e4e9ed;
    font-size: .9rem;
    color: #64757f;
}
.upbeat-pages > span:first-child { font-weight: 650; color: #3d4d5a; }
.upbeat-pages a,
.upbeat-pages > span:not(:first-child) {
    display: inline-block;
    min-width: 38px;
    padding: 7px 11px;
    text-align: center;
    border: 1px solid #e4e9ed;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 650;
}
.upbeat-pages a { color: #0a4ea8; }
.upbeat-pages a:hover { background: #eaf1fb; }
/* The current page is rendered by WordPress as a bare <span>. */
.upbeat-pages > span:not(:first-child) {
    background: #10171d;
    border-color: #10171d;
    color: #fff;
}

@media (max-width: 560px) {
    .upbeat-offer { padding: 22px 16px; }
    .upbeat-offer__title { font-size: 1.24rem; }
    .upbeat-mon { margin-top: 30px; }
}
