/*
 * Featured-image HTML title overlay (featured-overlay-compat-v1).
 *
 * The wrapper takes the <img>'s place in the theme's layout, so it must size
 * like the slot the image occupied and never from its own content. It carries
 * NO size containment: `container-type: inline-size` on an in-flow box makes
 * its content-based width 0, which collapses it (and the image) to 0px in flex
 * items, auto/max-content grid tracks and every shrink-to-fit parent.
 * It must not start a block formatting context either (no overflow clipping):
 * themes give the image vertical margins that collapse through its figure
 * (Twenty Twenty-One: img 60px inside figure 20px), and a BFC wrapper would
 * stop the collapse and push the image down.
 */
.agent-news-sp-featured-overlay {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Sole wrapper in a fixed-height slot: keep `img { height: 100% }` themes filling it. */
.agent-news-sp-featured-overlay:only-child {
    height: 100%;
}

/*
 * No rules for the <img> itself: its size and display stay the theme's.
 * `max-width: 100%` made a fixed-width image compressible (a table-cell slot
 * squeezed it to a few pixels), and `display: block` removed the inline gap an
 * inline-image theme leaves under it, shifting the page (Newspaperly: 7px).
 */

/*
 * The container for `cqw` title sizing. Absolutely positioned, so its width
 * comes from the wrapper and containment cannot collapse anything.
 */
.agent-news-sp-featured-overlay__layer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    container-type: inline-size;
    overflow: hidden;
    pointer-events: none;
}

.agent-news-sp-featured-overlay__title {
    position: absolute;
    box-sizing: border-box;
    width: max-content;
    padding: 0.18em 0.55em;
    overflow-wrap: anywhere;
    pointer-events: none;
    left: 50%;
    top: 96.5%;
    transform: translate(-50%, -100%);
    max-width: 80%;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 48px;
    font-size: clamp(14px, 4cqw, 72px);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 3px 8px #000;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.7) 18%, rgba(0, 0, 0, 0.7) 82%, transparent);
}

@media (max-width: 560px) {
    .agent-news-sp-featured-overlay__title {
        padding: 0.14em 0.42em;
    }
}

/* A title at the 14px floor covers a small thumbnail instead of labelling it. */
@container (max-width: 279.98px) {
    .agent-news-sp-featured-overlay__title {
        display: none;
    }
}

/* The theme's own <h1> text lies on the image (assets/js/featured-overlay.js). */
.agent-news-sp-featured-overlay--theme-title .agent-news-sp-featured-overlay__title {
    display: none;
}

/*
 * s0-rc66e3 (S9ZQ, owner 04.11): the visible AI disclosure is one small line under the cover in the article (caption size).
 * It is never laid over a picture. The line follows the reading direction of the page (logical properties only).
 */
.agent-news-sp-ai-note {
    display: block;
    margin-block: 0.4em 0;
    /* a theme may round and clip its cover box (pp: 14px, overflow hidden): the small padding keeps the first letter out of the clipped corner */
    padding: 0.15em 0.5em 0.55em;
    font-size: 0.8125rem;
    line-height: 1.4;
    opacity: 0.8;
    text-align: start;
}

/* s0-rc61 (ORKESTR-PLAN1-S9UG, owner 31.10): the lead (first paragraph) has ONE look everywhere - a little larger than the text
   (about 1.2x), never a bold heading and never the plain text size. */
p.ansp-lead {
    font-size: 1.2em;
    font-weight: 400;
    line-height: 1.55;
}

/* s0-rc72j (ORKESTR-PLAN1-SA272 item 7, errors sheet 21, Codex SA267): the primary source's video player (was inline style attributes in the
   article): full width, 16:9; the theme's content width and centring stay in charge */
.ansp-ps-video { margin-top: 1.5em; margin-bottom: 1.5em; }
.ansp-ps-video__box { position: relative; width: 100%; padding-top: 56.25%; height: 0; overflow: hidden; }
.ansp-ps-video__frame { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
