/* The card popup's paused Prices panel (2026-11-04).

   Shown while a site switch hides a game's prices
   (App\Pricing\PricingGame::displayPaused(): Pokemon whenever PRICES_ENABLED
   or PRICES_ENABLED_POKEMON is 'false'; One Piece only while the master hides
   prices its own switch would show; never Palworld, which has none): the
   Prices tab keeps its place with an "Off" badge (the neutral
   .coming-soon-badge rule in nav-dropdowns.css, its text darkened below) and
   this panel replaces the live panel. templates/partials/card-popup.php
   renders it and links this sheet only while paused, with ?v=filemtime. The
   panel never carries
   id="popup-prices-body", which cardPopup.js empties on every card change and
   cards-page.js fills with the Soon wording.

   Top-aligned with the same 48px top padding as the sibling tabs'
   .coming-soon-message, so switching from Condition to Prices does not move
   the content's top edge. */

/* The tab's "Off" badge. Every popup opens on Cards, so the badge is first
   seen on an unselected tab, which card-popup.css fades to opacity 0.6; in
   the badge's muted colour that measured 2.73:1 in light and 3.39:1 in dark,
   under the 4.5:1 its 10px text needs. In the text colour it measures 4.81:1
   and 5.98:1 unselected, 17.95:1 and 13.94:1 selected. The explicit colour
   also keeps it from taking the tab's hover colour. */
.card-info-selector .prices-off-badge {
    color: var(--colour-text);
}

.prices-paused {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: var(--space-8);
    padding: var(--space-48) var(--space-16) var(--space-32);
    text-align: center;
}

/* The illustration: a price tag fast asleep. Every colour is a site token or
   a color-mix() of tokens, each outline token has its own dark value and every
   fill is --colour-bg or mixed with it, so one set of rules serves both
   themes. Never the accent or any gold (Important Notes 39 and 40). Outlines
   measured on the popup surface (--colour-popup-paper, #FAFAFA light and
   #292929 dark):
     tag and hole: --colour-secondary-text    5.86:1 light, 6.57:1 dark
     face: secondary-text 60% with text       9.80:1 light, 8.95:1 dark
     string: text-muted 80% with bg           4.10:1 light, 4.97:1 dark
     z shapes: --colour-chart-4               4.01:1 light, 5.10:1 dark
   The <svg> keeps its width and height attributes (and stroke="currentColor")
   so a stale cached sheet still draws it at its size. */
.prices-paused__art {
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
    margin-bottom: var(--space-8);
    overflow: visible;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.prices-paused__art .ppa-tag {
    fill: color-mix(in srgb, var(--colour-secondary) 16%, var(--colour-bg));
    stroke: var(--colour-secondary-text);
    stroke-width: 2;
}

.prices-paused__art .ppa-hole {
    fill: var(--colour-bg);
    stroke: var(--colour-secondary-text);
    stroke-width: 1.75;
}

/* The string is a softer grey than the muted text, so the face leads. */
.prices-paused__art .ppa-string {
    fill: none;
    stroke: color-mix(in srgb, var(--colour-text-muted) 80%, var(--colour-bg));
    stroke-width: 1.75;
}

/* The face is a deeper ink than the outline (deep navy in light, pale sky in
   dark), so the closed eyes and the smile read at small sizes. */
.prices-paused__art .ppa-face {
    fill: none;
    stroke: color-mix(in srgb, var(--colour-secondary-text) 60%, var(--colour-text));
    stroke-width: 2.25;
}

/* Coral and violet make a soft mauve blush (plain coral turned brown on the
   dark tag). */
.prices-paused__art .ppa-blush {
    fill: color-mix(in srgb, color-mix(in srgb, var(--colour-chart-5) 50%, var(--colour-chart-4)) 65%, var(--colour-bg));
    stroke: none;
}

/* The z shapes drift up a little, one after another, and settle back, once
   each time the tab opens: the last one rests at 4.8s, so the motion stops by
   itself within five seconds (WCAG 2.2.2). They never fade, so every frame
   keeps the contrast measured above. Rest (0% and 100%) is the drawn
   position, so a stopped animation shows the whole picture. The two delays
   below are longhands on purpose: a later `animation` shorthand would reset
   them to 0. */
.prices-paused__art .ppa-z {
    fill: none;
    stroke: var(--colour-chart-4);
    stroke-width: 2;
    animation: prices-paused-drift 3.6s ease-in-out 1 both;
}

.prices-paused__art .ppa-z2 {
    animation-delay: 0.6s;
}

.prices-paused__art .ppa-z3 {
    animation-delay: 1.2s;
}

@keyframes prices-paused-drift {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(1.5px, -4px); }
}

.prices-paused__title {
    margin: 0;
    max-width: 24ch;
    font-family: var(--font-header);
    font-size: 20px;
    font-weight: var(--font-weight-lg);
    line-height: 1.25;
    color: var(--colour-text);
    text-wrap: balance;
}

.prices-paused__text {
    margin: 0;
    max-width: 38ch;
    font-family: var(--font-paragraph);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-sm);
    line-height: 1.5;
    color: var(--colour-text-muted);
    text-wrap: pretty;
}

/* Phones: the popup is one 95vw column that scrolls as a unit, so this panel
   adds to its scroll height. Keep it short. */
@media (max-width: 768px) {
    .prices-paused {
        padding: var(--space-24) var(--space-8) var(--space-16);
    }

    .prices-paused__art {
        width: 128px;
    }

    .prices-paused__title {
        font-size: 18px;
    }
}

/* The drifting z shapes are decoration only: off under the device setting
   and under the site's own Reduce motion setting (data-reduce-motion="on" on
   <html>, the pattern of ambient-cards.css and settings/shell.css). style.css's
   global blocks only shorten animations to one 0.01ms run, which a part with
   fill-mode both would end on its last frame; "animation: none" leaves the art
   at rest. */
@media (prefers-reduced-motion: reduce) {
    .prices-paused__art,
    .prices-paused__art * {
        animation: none !important;
        transition: none !important;
    }
}

:root[data-reduce-motion="on"] .prices-paused__art,
:root[data-reduce-motion="on"] .prices-paused__art * {
    animation: none !important;
    transition: none !important;
}

/* Forced colours: the browser forces the title and the text but leaves SVG
   paint alone, so the drawing's token colours could sit badly on the forced
   background. Draw it in the system colours instead. */
@media (forced-colors: active) {
    .prices-paused__art .ppa-tag,
    .prices-paused__art .ppa-hole,
    .prices-paused__art .ppa-face,
    .prices-paused__art .ppa-string,
    .prices-paused__art .ppa-z {
        stroke: CanvasText;
    }

    .prices-paused__art .ppa-tag,
    .prices-paused__art .ppa-hole {
        fill: Canvas;
    }

    .prices-paused__art .ppa-blush {
        fill: none;
    }
}
