/*
 * Zoey Made — doodle.
 *
 * A doodle is a small decorative mark that sits beside content and carries no meaning.
 * The artwork is an external SVG used as a mask, so one file serves every colour the
 * doodle is ever drawn in and the colour comes from a design token rather than from the
 * file. External keeps it cacheable; the mask keeps CSS in control of the colour.
 *
 *   <span class="zoey-doodle zoey-doodle--scissors has-zoey-purple-color" aria-hidden="true"></span>
 *
 * **Decoration only, and the boundary is not a style preference.** A mask paints its shape
 * with `background-color`, and forced colors replaces a background with the canvas colour —
 * so a masked shape is invisible to a visitor using a high-contrast scheme. That is fine for
 * a mark that carries no meaning and fatal for one that does. Anything whose *shape* has to
 * be recognised is drawn as an inline SVG with a real `fill` and `stroke`; a discovery object
 * is the case that proved it (DISCOVERY-002 §3), and blocks/hidden-star/render.php is the
 * pattern to copy.
 *
 * ## Two adopted marks, and why they are pseudo-elements
 *
 * `SL-008`. The Cart's totals panel carries a required star and a required heart, and the panel is
 * WooCommerce's React — `zoey_made_decoration()` cannot put a `<span>` inside it, because `G1`
 * measured server-rendered children of that region destroyed at hydration. The Cart's *empty*
 * branch is ordinary server-rendered content and does use the renderer; only this one region
 * cannot.
 *
 * So two pseudo-elements wear the family instead of restating it. They are named on the rules that
 * already declare the mask, the Safari prefix, `currentColor` and the artwork URL, which keeps the
 * artwork declared once — the alternative was a second `mask` shorthand and a second path to
 * `star-doodle.svg` living in `components/commerce.css`, and a doodle whose file is written twice
 * is a doodle that gets replaced once. `components/decoration.css` adopts them the same way for
 * size, placement and print; `components/commerce.css` owns only `content` and the two insets.
 */

.zoey-doodle,
.woocommerce-cart .wc-block-cart__sidebar > .wp-block-woocommerce-cart-order-summary-block::before,
.woocommerce-cart .wc-block-cart__submit::after,
.zoey-checkout .wp-block-woocommerce-checkout-totals-block .wc-block-components-checkout-order-summary__title::before,
.zoey-checkout .wp-block-woocommerce-checkout-totals-block .wc-block-components-checkout-order-summary__title::after,
.zoey-meet-zoey__card > .zoey-surface__content::after,
.zoey-meet-zoey__destinations .wp-block-button__link::before,
.zoey-meet-zoey__explore h2::after,
.zoey-meet-zoey__note h2::after,
.zoey-contact__social-card > .zoey-surface__content::after,
.zoey-contact__feedback h2::after,
.zoey-contact__note h2::after,
.zoey-contact__social h2::after,
.zoey-contact__bubbles::before,
.zoey-contact__bubbles::after,
.zoey-contact__art > .zoey-surface__content::after {
  /* Relative to the text it sits beside, so it follows the type scale instead of
     pinning a size of its own. Override per instance where a doodle stands alone. */
  --zoey-doodle-size: 1.5em;

  display: inline-block;
  flex: none;
  inline-size: var(--zoey-doodle-size);
  block-size: var(--zoey-doodle-size);
  background-color: currentColor;
  /* -webkit- prefix retained for Safari below 15.4, which has no unprefixed shorthand. */
  -webkit-mask: var(--zoey-doodle-art) center / contain no-repeat;
  mask: var(--zoey-doodle-art) center / contain no-repeat;
}

/*
 * **A third set of adopters: the editorial pages — Meet Zoey, and Contact after it.** Their pages
 * are editorial — every word is a core block so a parent can edit it — so there is no render
 * callback to emit `<span class="zoey-doodle">`. That
 * is the Cart's problem from a different direction, and it ends the same way: four pseudo-elements
 * are named on the rules that already declare the mask and the artwork, rather than a second copy
 * of either living in another file.
 * A pseudo-element is also the better answer here, not merely the available one — it keeps a
 * destination's accessible name *Make* rather than "scissors Make right-arrow".
 * `components/meet-zoey.css` owns `content`, size and colour; this file owns the drawings.
 */

/*
 * The three world marks, on the Make, Play and Discover panels on the homepage. They are
 * decoration: the label is what carries the meaning, which is why they are doodles rather
 * than icons and why the markup hides them from assistive technology (STORE-008 §35).
 *
 * Line art rather than the star's solid shape — the mask takes its alpha from whatever the
 * file paints, so an unfilled stroked path draws exactly as it looks, and a filled shape
 * beside it paints solid. One family: the same 24 viewBox, the same 1.8 stroke, the same
 * round caps and joins, and no detail that survives being drawn at 28px.
 *
 * STORE-003 drew these provisionally and STORE-008 owns the finished system. Two of the
 * three were kept unchanged (§32). The magnifier gained the sparkle inside its lens,
 * because a bare magnifier is the universal mark for site search and §30 rules that
 * reading out: with something found in it, it reads as curiosity rather than as a search
 * field the panel does not have.
 *
 * Where each is drawn — the emblem behind it, and the colour of both — belongs to the
 * component that places it: components/world-mode.css.
 */
.zoey-doodle--scissors,
.zoey-meet-zoey__destination--make .wp-block-button__link::before {
  --zoey-doodle-art: url("../../svg/scissors-doodle.svg");
}

.zoey-doodle--controller,
.zoey-meet-zoey__card--games > .zoey-surface__content::after,
.zoey-meet-zoey__destination--play .wp-block-button__link::before,
.zoey-contact__feedback h2::after {
  --zoey-doodle-art: url("../../svg/controller-doodle.svg");
}

/*
 * SL-006 / `G1`: the two decorative motifs the Shop hero requires, and the first two marks in this
 * family that do not stand for a world mode.
 *
 * They are **masks like the other three**, which is `G1`'s *"using the existing doodle mechanism
 * where appropriate"* read exactly. The appropriateness test is the one the header above sets: a
 * mask disappears under forced colors, which is fatal for a shape that carries meaning and
 * acceptable for one that carries none. These carry none — they are `aria-hidden`, nonfocusable
 * and `pointer-events: none`, and the Shop design contract permits forced-colors suppression of
 * purely decorative marks under established conventions. A discovery object, whose shape *must* be
 * recognised, is still an inline SVG for exactly the opposite reason.
 *
 * Normalized from the candidate artwork delivered with the Shop package, which was a 64 viewBox at
 * stroke 3. `G1` authorizes normalizing *"to the existing asset convention while preserving their
 * approved visual character"*, so the geometry is the delivered outline scaled by 24/64 and the
 * stroke is this family's own 1.8 rather than the candidate's scaled 1.125 — one family, one
 * weight. Both shapes keep a 0.9 stroke halo clear of the viewBox edge, so neither clips when the
 * mask is sized.
 *
 * **Where they are drawn, how large and in what colour is not here.** That is
 * `components/decoration.css`, which owns placement, and the palette class the renderer puts on
 * the element, which owns colour — the same split as the three above, whose emblem and colour
 * belong to `components/world-mode.css`.
 */
.zoey-doodle--star,
.woocommerce-cart .wc-block-cart__sidebar > .wp-block-woocommerce-cart-order-summary-block::before,
.zoey-checkout .wp-block-woocommerce-checkout-totals-block .wc-block-components-checkout-order-summary__title::before,
.zoey-meet-zoey__card--imagination > .zoey-surface__content::after,
.zoey-meet-zoey__explore h2::after,
.zoey-contact__bubbles::before,
.zoey-contact__social h2::after,
.zoey-contact__art > .zoey-surface__content::after {
  --zoey-doodle-art: url("../../svg/star-doodle.svg");
}

.zoey-doodle--heart,
.woocommerce-cart .wc-block-cart__submit::after,
.zoey-checkout .wp-block-woocommerce-checkout-totals-block .wc-block-components-checkout-order-summary__title::after,
.zoey-meet-zoey__note h2::after,
.zoey-contact__note h2::after,
.zoey-contact__bubbles::after {
  --zoey-doodle-art: url("../../svg/heart-doodle.svg");
}

.zoey-doodle--magnifier,
.zoey-meet-zoey__card--discovering > .zoey-surface__content::after,
.zoey-meet-zoey__destination--discover .wp-block-button__link::before {
  --zoey-doodle-art: url("../../svg/magnifier-doodle.svg");
}

/*
 * **Books, a palette and a lightbulb** — `MEET-ZOEY-REFINEMENT-001`, closing the `G1` gap note
 * Product authorised. Meet Zoey needs nine marks and six were already here; these are the other
 * three, drawn to this family's own contract — the same 24 viewBox, 1.8 stroke, round caps and
 * joins, the magnifier's filled-detail convention, and a 0.9 halo clear of the edge — and checked
 * beside the existing five at 44px and 26px, because a mark that works at one size is not in the
 * family. The lightbulb is Learn's: the homepage's Learn path uses a raster illustration
 * (`SL-012`), so there was no line mark to reuse.
 */
.zoey-doodle--books,
.zoey-meet-zoey__card--reading > .zoey-surface__content::after {
  --zoey-doodle-art: url("../../svg/books-doodle.svg");
}

.zoey-doodle--palette,
.zoey-meet-zoey__card--making > .zoey-surface__content::after {
  --zoey-doodle-art: url("../../svg/palette-doodle.svg");
}

.zoey-doodle--lightbulb,
.zoey-meet-zoey__destination--learn .wp-block-button__link::before {
  --zoey-doodle-art: url("../../svg/lightbulb-doodle.svg");
}

/*
 * **A camera, a music note and a play button** — Contact's social cards, which the handoff asks for
 * *"simple recognizable social-style marks"*. Followed literally: these are **generic marks, not
 * brand logos**. A camera stands for Instagram the way a shopping bag stands for a shop —
 * recognisable without reproducing anyone's trademark, which a traced logo would, and which this
 * family's single stroke weight could not carry honestly anyway.
 *
 * Same contract as the rest: 24 viewBox, 1.8 stroke, round caps and joins, the magnifier's
 * filled-detail convention, a 0.9 halo clear of the edge, checked at 44px and 26px. Which card
 * wears which is `components/contact.css`'s modifier class.
 */
.zoey-doodle--camera,
.zoey-contact__social-card--instagram > .zoey-surface__content::after {
  --zoey-doodle-art: url("../../svg/camera-doodle.svg");
}

.zoey-doodle--music-note,
.zoey-contact__social-card--tiktok > .zoey-surface__content::after {
  --zoey-doodle-art: url("../../svg/music-note-doodle.svg");
}

.zoey-doodle--play,
.zoey-contact__social-card--youtube > .zoey-surface__content::after {
  --zoey-doodle-art: url("../../svg/play-doodle.svg");
}
