@charset "UTF-8";
/*!
 * StaticPress theme "Blocksy" - ads.css
 *
 * The look of the advertising containers sp-ads.js fills. The published page
 * only ever ships an empty placeholder
 * (``<div class="sp-ad-slot" data-ad-slot="...">``, printed by
 * templates/partials/ads.html and, inside an article body, by
 * app/ads_render.py); every node styled here is built by the loader once the
 * API answered, so this file describes what the *loader* produces:
 *
 *   .sp-ad-slot          the container of one slot (the placeholder itself)
 *   .sp-ad-link          the anchor every clickable format is wrapped in
 *   .sp-ad-image         the <img> of the "image" format
 *   .sp-ad-text*         the "text" format (title + description)
 *   .sp-ad-native*       the "native" card (media + body + source url)
 *   .sp-ad-video*        the "video" format (player + caption)
 *   .sp-ad-html          the raw third party snippet of the "html" format
 *   .sp-ad-label         the "advertisement" badge (from the settings)
 *   .sp-ad-floating      the band the "floating" region lives in
 *
 * Three rules carry behaviour, not looks:
 *
 *   .sp-ad-slot[aria-hidden]:empty
 *                             before the loader runs the placeholder is
 *                             decorative - it holds nothing. It is hidden from
 *                             assistive technology and hidden here as a visual
 *                             nothing (no box, no gap, no border), so a page
 *                             with no advertising stays exactly the page it was.
 *   [data-ad-reserve]         the room the operator asked the slot to keep
 *                             (settings.reserve_height). The height is an
 *                             inline style the placeholder is printed with
 *                             (app/ads_render.placeholder and the same partial
 *                             in both themes), and this rule is what makes it
 *                             count: a reserved slot is *shown* while it is
 *                             empty, where the rule above hides one.
 *   [data-ad-state="empty"]   the same box, once the loader has answered: this
 *                             slot has no ad and keeps its room. A slot without
 *                             a reserve is removed from the DOM by the loader
 *                             and never reaches this state.
 *
 * Which region is inserted where is a theme question (article_top,
 * article_bottom, sidebar, footer, ...), so the templates of this theme carry
 * the include and app/ads.py carries the list of regions. All text in this
 * file is ASCII only (project rule).
 */

/* ---------------------------------------------------------- placeholder */
.sp-ad-slot {
    display: block;
    margin: 1.6em auto;
    text-align: center;
    line-height: 0;
}

.sp-ad-slot[aria-hidden="true"]:empty {
    display: none;
}

.sp-ad-slot[data-ad-state="filled"] {
    line-height: normal;
}

/* The room the operator asked for (settings.reserve_height) and the box the
   loader leaves behind when it answers "no ad": one look for both, because
   they are the same thing - a slot that keeps its room while showing nothing.
   The first selector is the state before that answer (the height is already on
   the element, see app/ads_render.placeholder), the second the state after it.
   fill() takes both marks away once an ad is in, and the box goes with them:
   from then on the ad itself is what holds the room. */
.sp-ad-slot[aria-hidden="true"]:empty[data-ad-reserve]:not([data-ad-reserve="0"]),
.sp-ad-slot[data-ad-state="empty"] {
    display: block;
    border: 1px dashed var(--theme-border-color);
    border-radius: var(--theme-border-radius);
    background-color: var(--theme-palette-color-6);
}

/* An article top slot is the first thing a reader meets: no extra room above. */
.entry-content .sp-ad-slot[data-ad-region="article_top"] {
    margin-top: 0;
}

.entry-content .sp-ad-slot[data-ad-region="article_bottom"] {
    margin-bottom: 0;
}

/* The content top slot is printed inside the title band, directly above the
   headline (templates/post.html, page.html, download.html). The room it takes
   goes below it - the headline carries its own spacing - so the band is not
   pushed away from the label above it. Its badge sits on the dark band, which
   is why it takes the dark text colour. */
.hero-section .entry-header .sp-ad-slot[data-ad-region="content_top"] {
    margin: 0 auto;
}

.hero-section .entry-header .sp-ad-slot[data-ad-region="content_top"] .sp-ad-label {
    color: var(--theme-dark-text);
}

/* ----------------------------------------------------------- the anchor */
.sp-ad-link {
    display: block;
    color: inherit;
    position: relative;
    text-decoration: none;
}

.sp-ad-link:hover,
.sp-ad-link:focus {
    color: inherit;
}

/* ------------------------------------------------------------ the badge */
.sp-ad-label {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--theme-palette-color-3);
    opacity: 0.6;
}

/* ------------------------------------------------------- image format */
.sp-ad-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--theme-image-border-radius);
}

/* -------------------------------------------------------- text format */
.sp-ad-text {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--theme-border-color);
    border-radius: var(--theme-border-radius);
    background-color: var(--theme-palette-color-8);
    text-align: start;
    transition: var(--theme-transition);
}

.sp-ad-link.sp-ad-text:hover,
.sp-ad-link.sp-ad-text:focus {
    border-color: var(--theme-palette-color-1);
    box-shadow: var(--theme-box-shadow);
}

.sp-ad-text-title {
    display: block;
    color: var(--theme-link-initial-color);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: underline;
}

.sp-ad-text-desc {
    display: block;
    margin-top: 4px;
    color: var(--theme-text-color);
    font-size: 0.875rem;
    line-height: 1.6;
    text-decoration: none;
}

/* ------------------------------------------------------ native format */
.sp-ad-native {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--theme-border-color);
    border-radius: var(--theme-border-radius);
    background-color: var(--theme-palette-color-8);
    box-shadow: var(--theme-box-shadow);
    text-align: start;
    transition: var(--theme-transition);
}

.sp-ad-link.sp-ad-native:hover,
.sp-ad-link.sp-ad-native:focus {
    box-shadow: var(--theme-box-shadow-strong);
}

.sp-ad-native-media {
    flex: 0 0 40%;
    width: 40%;
    max-width: 40%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
}

.sp-ad-native-body {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 16px;
}

.sp-ad-native-title {
    display: block;
    color: var(--theme-headings-color);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
}

.sp-ad-native-desc {
    display: block;
    margin-top: 4px;
    color: var(--theme-text-color);
    font-size: 0.875rem;
    line-height: 1.6;
}

.sp-ad-native-url {
    display: block;
    margin-top: 8px;
    color: var(--theme-palette-color-1);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    word-break: break-all;
}

@media (max-width: 689.98px) {
    .sp-ad-native-media {
        flex-basis: 35%;
        width: 35%;
        max-width: 35%;
    }

    .sp-ad-native-body {
        padding: 12px 14px;
    }
}

/* ------------------------------------------------------- video format */
.sp-ad-video {
    display: block;
    overflow: hidden;
    border: 1px solid var(--theme-border-color);
    border-radius: var(--theme-border-radius);
    background-color: var(--theme-palette-color-4);
    box-shadow: var(--theme-box-shadow);
}

.sp-ad-video-media {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    background-color: var(--theme-palette-color-4);
}

.sp-ad-video .sp-ad-link {
    display: block;
    padding: 10px 14px;
    background-color: var(--theme-palette-color-8);
    text-align: start;
}

.sp-ad-video-title {
    display: block;
    color: var(--theme-headings-color);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
}

/* -------------------------------------------------------- html format */
.sp-ad-html {
    display: block;
    max-width: 100%;
    overflow: hidden;
    line-height: normal;
}

.sp-ad-html img,
.sp-ad-html iframe {
    max-width: 100%;
    margin: 0 auto;
}

/* --------------------------------------------------------- floating bar */
.sp-ad-floating {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 900;
    padding: 8px 12px;
    background-color: var(--theme-palette-color-8);
    border-top: 1px solid var(--theme-border-color);
    box-shadow: 0 -8px 24px -12px rgba(20, 38, 71, 0.25);
    text-align: center;
}

.sp-ad-floating .sp-ad-slot {
    margin: 0 auto;
}

.sp-ad-floating .sp-ad-label {
    display: none;
}

/* A floating band whose every slot was dropped by the loader (no ad, no
   reserve) is an empty box at the bottom of the page: it goes with them. */
.sp-ad-floating:empty {
    display: none;
}

@media (max-width: 689.98px) {
    .sp-ad-floating {
        padding: 6px 10px;
    }
}

/* A fixed band covers the end of the page. The room it takes is given back to
   the body while one is printed (`:has` is only a layout nicety: a browser
   without it shows the band over the last line, never a broken page). */
body:has(.sp-ad-floating) {
    padding-bottom: 120px;
}

/* ------------------------------------------------- sidebar and widgets */
.ct-sidebar .sp-ad-slot,
.sp-ad-floating .sp-ad-slot {
    text-align: center;
}

.ct-sidebar .sp-ad-text,
.ct-sidebar .sp-ad-native,
.ct-sidebar .sp-ad-video {
    text-align: start;
}

@media (max-width: 689.98px) {
    .ct-sidebar .sp-ad-native {
        flex-wrap: wrap;
    }

    .ct-sidebar .sp-ad-native-media {
        flex-basis: 100%;
        width: 100%;
        max-width: 100%;
    }
}

/* ------------------------------------------------------------ footer band */
/* The band is one more `[data-row]` of the footer (see partials/footer.html),
   so it follows the convention of layout.css: the row container carries the
   grid and the spacing of the row through the same two custom properties. */
.ct-footer [data-row="ads"] > .ct-container {
    --grid-template-columns: 1fr;
    --container-spacing: 26px;
    border-top: 1px solid var(--theme-dark-border);
}

.ct-footer [data-row="ads"] .sp-ad-slot {
    margin: 0 auto;
}

.ct-footer [data-row="ads"] .sp-ad-label {
    color: var(--theme-dark-text);
}

@media (max-width: 999.98px) {
    .ct-footer [data-row="ads"] > .ct-container {
        --container-spacing: 20px;
    }
}
