/**
 * core/image rules, each scoped to the unit that owns it.
 *
 * This file is shared by construction: every unit that places a core/image lands here.
 * Nothing in it may be written unscoped -- a rule with no unit hook class repaints every
 * image on the site, which is a theme decision and belongs to wp-theme-scaffold.
 */

/*
 * .wm-logos: the two things a core/image attribute cannot carry.
 *
 * 1. THE 15px SIDE GUTTERS ON THE IMAGE'S OWN BOX. The contract measures the box around the
 *    logo as 510x328 holding a 480x328 image -- 15px of padding each side. core/image
 *    declares `supports.spacing` as `{ "margin": true }` on this install (WP 7.1,
 *    wp-includes/blocks/image/block.json), so padding has no attribute to live in. A margin
 *    would occupy the same 510px of flex track but leave the <figure>'s border box at 480,
 *    and 510 is the box the contract asserts. Wrapping the image in a padded core/group was
 *    the other option and was rejected: it adds a DOM level the source does not have.
 *
 *    This is Foundation 6's `medium` gutter, 30px split per side, which the source applies
 *    to the grid cell the logo sits in.
 *
 * 2. THE NARROW-VIEWPORT WIDTH. `style["@tablet"]` / `style["@mobile"]`
 *    (block-supports/states.php, added 7.1.0) compile block-SUPPORTS styles, and core/image's
 *    `width` is the block's own attribute, serialized by its save() into an inline style --
 *    not a support. So there is no per-viewport form of it and it lands here.
 *
 *    WHY 200px AND NOT A PERCENTAGE. The contract's root node measures the band at 388px tall
 *    at 1440 and at 197 at 1024, 768 AND 390 alike, and its image node measures 200x137 at
 *    390. One height across three different wrapper widths (994, 738, 370) is a fixed px; a
 *    percentage would give about 543px of image inside the 1004 wrapper at 1024 and a band
 *    about 371px tall. 200 / 480 * 328 = 136.7, which is the measured 137.
 *
 *    `!important` IS LOAD-BEARING HERE, not defensive. core/image's save() writes
 *    `style="width:480px;height:auto"` directly on the <img>, and an inline style outranks any
 *    selector. The inline `height:auto` is left alone and is what scales the height.
 *
 *    THE BAND EDGE IS THE THEME'S 1123.98px (theme.json settings.viewport.tablet) AND THE
 *    SOURCE'S IS FOUNDATION'S `large`, 1024px. All four captured viewports land on the right
 *    side of both. Between 1024 and 1124 this build shows the 200px logo where the source
 *    still shows the 480px one, and that band is not one anybody measured.
 */
.wm-logos .wp-block-image {
	padding-left: var(--wp--preset--spacing--25);
	padding-right: var(--wp--preset--spacing--25);
}

@media (width <= 1123.98px) {

	.wm-logos .wp-block-image img {
		width: 200px !important;
	}
}

/*
 * .wm-link-list: THE ICON'S `display` IS `inline-block` ON THE SOURCE AGAINST `inline` HERE.
 * core/image's own style.css sets `display: table` on `.aligncenter` (the <figure>) and
 * `height: auto; max-width: 100%; vertical-align: bottom` on the bare `img` -- nothing in core
 * sets `display` on the `<img>` itself at any point, so it renders at the UA default, `inline`.
 *
 * MEASURED WITH NO GEOMETRY CONSEQUENCE HERE: the box this build renders is 128x128 at the
 * column-centred position the contract's own arithmetic predicts (196,481 at 1440 --
 * (250 - 128) / 2 = 61 rounds to the measured offset), identical with `inline` or
 * `inline-block`, because `<img>` is a replaced element and a replaced element's width/height/
 * margin apply the same under both -- a property-level difference with no rendered one. Fixed
 * anyway because it is cheap and named; if the same gap turns up on another unit's icon, that is
 * a core/image-wide question for wp-theme-scaffold, not a second copy of this rule.
 */
.wm-link-list img {
	display: inline-block;
}

/*
 * .wm-image-link-cards HOVER: THE PHOTO DIMS, NOTHING ELSE MOVES. MEASURED on the live source (Playwright,
 * 1440x900, /resources/case-studies, hover vs rest, 2026-09-21): the card's `img` goes from opacity 1 to 0.8
 * under `transition: all 0.3s`; no transform, no colour change on any other node in the card. CODE:
 * `.paragraph__image_link_card:hover .image-wrapper img { opacity: 0.8 }`. The trigger is the card, not the
 * image, so the label and the padding around the photo dim it too.
 */
.wm-image-link-cards__card img {
	transition: all 0.3s;
}

.wm-image-link-cards__card:hover img {
	opacity: 0.8;
}

/*
 * .wm-inner-section-content__video-link RULES REMOVED, 2026-09-26 (docs/status.md same date).
 * The new-tab video link they styled (patterns/inner-section-video-link.php) is gone, replaced
 * by a native `<dialog>` opened with `showModal()` on the Interactivity API -- the operator's
 * decision, "why are they opening up in a new tab and not modal". The poster and its play-disc
 * plate are rebuilt against that new markup in assets/css/blocks/embed.css
 * (`.wm-video-dialog__trigger`), which is the block whose PRESENCE on a page now turns this
 * chrome on; there is no longer a `core/image` alone whose own link the plate could hang off.
