/* Google preferred source — its own stylesheet (v0.3.896).
   Split out of frontend.css so an ordinary post stops loading the pattern bundle for one badge.
   See assets/preferred-source.js for the measurement. */

/* ── Google preferred source ──────────────────────────────────────────
   Google's own badge art, centered, with nothing around it. No box, no heading, no border: the page
   already carries subscribe, Pinterest, buy links, crochet mode and ads, and this competes with the
   buy links, which are the ones that earn. It is a quiet ask, deliberately.

   The badge is Google's image so its own styling governs — the no-rounded-corners rule does not
   reach inside it, the same way the Pinterest button is exempt. Only the text fallback, used until
   the asset is added, is styled to the brand. */
.jcp-preferred-source {
    display: flex;
    justify-content: center;
    margin: 1.75rem 0;
}
/* display:flex above beats the hidden attribute's display:none, so hiding a used button needs this
   explicitly — the same trap as .jcp-version-extra. */
.jcp-preferred-source[hidden] { display: none !important; }
.jcp-preferred-source-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
}
/* Google's file is 338x107 for a badge meant to sit around 169px wide, so it is served at half its
   pixel size and looks sharp on any screen. The width/height attributes hold the row open while it
   loads; max-width keeps it inside a narrow phone. */
/* HALF THE SCREEN ON A PHONE, 240px on anything wider — her call, v0.3.853: 169px was "a bit
   small", 82vw was "too big", and she asked for "about 50% on mobile". `min()` does both jobs in
   one rule with no media query, so there is no breakpoint where the badge jumps UP as the screen
   narrows — which a plain `50vw` under a 600px query would have done, 240px becoming 300px.
   Google's file is 338px wide, so 240 is still under native resolution and stays sharp. */
.jcp-preferred-source-badge {
    display: block;
    width: min(240px, 50vw);
    height: auto;
    max-width: 100%;
}
.jcp-preferred-source-text {
    font: bold 0.9rem/1.4 Tahoma, Geneva, Verdana, sans-serif;
    color: #555557;
    background: #ffffff;
    border: 1px solid #555557;
    padding: 0.55rem 1rem;
    text-align: center;
}
.jcp-preferred-source-btn:hover .jcp-preferred-source-text,
.jcp-preferred-source-btn:focus-visible .jcp-preferred-source-text {
    color: #000000;
    border-color: #000000;
}
.jcp-preferred-source-btn:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 3px;
}
/* Never printed — it is a link to a Google settings page, useless on paper. */
@media print {
    .jcp-preferred-source { display: none !important; }
}
