/*
 * washington-mills/text-image-carousel — the unit's own stylesheet.
 *
 * EVERY RULE HERE IS SCOPED TO THIS BLOCK'S OWN GENERATED CLASS. Nothing in this file can
 * reach another unit: the file is the block's `style` in block.json, so WordPress only
 * enqueues it on a page that renders this block, and every selector is rooted in
 * .wp-block-washington-mills-text-image-carousel. A rule that needed to repaint a core block
 * site-wide would belong in assets/css/blocks/ and would be wp-theme-scaffold's.
 *
 * WHERE THE NUMBERS COME FROM. Every length below is traced to the unit contract's own
 * measurements at 1440x900, stated beside the rule that uses it. Three things are NOT
 * measured and each says so where it appears: --wm-tic-speed, the `gray` and `textured`
 * background treatments, and the heading's own box.
 *
 * @since Washington Mills 1.0
 */

.wp-block-washington-mills-text-image-carousel {
	/*
	 * THE INTER-SLIDE GAP, and zero is the only value consistent with the measurement:
	 * `div.carousel-wrapper.field`, its single `div.carousel-image.field__item` and the
	 * `<img>` inside it are all 470x337, so there is no gap to find. It is a custom property
	 * rather than a literal because view.js's transform reads it back out — the number lives
	 * in exactly one place.
	 */
	--wm-tic-space-between: 0px;

	/*
	 * UNMEASURED. The contract carries no `behaviour` and no `initialisation` key, so the
	 * source's Slick `speed` was never transcribed and this is a chosen value, not a reading.
	 * It is CSS rather than JavaScript because a transition duration always is.
	 */
	--wm-tic-speed: 300ms;

	/*
	 * THE BAND. Measured root at 1440x900: 1440x611 with `background-color: rgb(255, 255,
	 * 255)` and 30px of block padding, which is var:preset|spacing|40 on this theme's ladder.
	 * The inline padding is the theme's own root padding, so the inner wrapper below lands at
	 * x=120 in a 1440 viewport: 1440 - 80 = 1360 available, a 1200 content size centred in it
	 * is 80 + 40 = 120.
	 */
	padding-block: var( --wp--preset--spacing--40 );
	padding-inline: var( --wp--style--root--padding-right, var( --wp--preset--spacing--50 ) );
}

/*
 * THE CTA PLATE'S OWN 30px RIGHTWARD BLEED CAN PAINT PAST THE VIEWPORT BELOW THE MOBILE
 * CUTOFF -- checkpoint 2, item 3 (2026-09-24), found by walking pseudo-elements, which a
 * plain `document.querySelectorAll('*')` scan does not reach (they generate no DOM node).
 * The CTA plate (`.content .wp-element-button::after`, below) is `left: 30px; width: 100%`
 * relative to the anchor -- a deliberate reproduction of the source's own `%cta-button:after`
 * offset, described where that rule is written. At 1440 the column has enough spare width
 * that the extra 30px never reaches the viewport edge; at 390, once the CTA is free to take a
 * near-full-width single line (the two fixes above this one), the anchor can sit close enough
 * to the column's own right edge that the plate's overhang crosses x=390.
 *
 * MEASURED ON VIBRATORY FINISHING AT 390x844, BOTH BEFORE AND AFTER THE TWO FIXES ABOVE: the
 * anchor at x=20 width=350 (pre-fix) put the plate's right edge at 20+30+350=400; at x=10
 * width=361 (post-fix) it is 10+30+361=401 -- both match this page's own measured
 * `document.documentElement.scrollWidth` of 400/401 to the pixel, and no other element or
 * pseudo-element on this page was found reaching past x=390. So the 10px sideways scroll the
 * operator measured pre-dates this checkpoint's other two fixes; it was already there, just
 * harder to see with the button wrapped onto two narrower lines.
 *
 * CLIPPED AT THIS BLOCK'S OWN ROOT, NOT ON `html`/`body`: `.wp-block-washington-mills-text-image-carousel`
 * is this unit's own hook class and is already `align: full` (viewport width, x=0), so hiding
 * overflow here bounds the plate to the viewport with nothing left outside it to paint --
 * without reaching for a site-wide `overflow-x: hidden` on `html`/`body`, which is a shared
 * surface (CLAUDE.md, "a rule with no unit hook class repaints every instance") this build
 * does not own. Scoped to the same `639.98px` cutoff as the other two fixes above because that
 * is the one width this checkpoint measured; not re-checked at 640-1123px, where the column is
 * still narrower than 1200px and the same geometry could in principle recur -- named in the
 * hand-back rather than widened past what was measured.
 */
@media ( max-width: 639.98px ) {

	.wp-block-washington-mills-text-image-carousel {
		overflow-x: hidden;
	}
}

/* ------------------------------------------------------------------ the three backgrounds */

/*
 * `white` IS THE ONLY ONE MEASURED. The contract's `structure` records
 * `backgroundColor: white` on the band, which is the `white` value of the Theme Options
 * field — so the other two values of that field have no measurement anywhere in the
 * projection.
 *
 * `gray` resolves to light-gray because it is this theme's only grey surface token, and
 * `textured` to the texture binary the sibling section-content unit already uses in this
 * theme (assets/images/background-texture.jpg, placed by that unit's own instance). BOTH ARE
 * IN-THEME PRECEDENT, NOT MEASUREMENTS, and both are raised in the hand-back.
 */
.wp-block-washington-mills-text-image-carousel.is-theme-white {
	background-color: var( --wp--preset--color--white );
}

.wp-block-washington-mills-text-image-carousel.is-theme-gray {
	background-color: var( --wp--preset--color--light-gray );
}

.wp-block-washington-mills-text-image-carousel.is-theme-textured {
	background-color: var( --wp--preset--color--light-gray );
	background-image: url( ../../assets/images/background-texture.jpg );
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

/* -------------------------------------------------------------------- the constrained row */

.wp-block-washington-mills-text-image-carousel__inner {
	max-width: var( --wp--style--global--content-size, 1200px );
	margin-inline: auto;
}

/*
 * TEXT LEFT, IMAGE RIGHT, AND THE COLUMNS ARE UNEQUAL. Measured at 1440x900: the row is
 * 1200x551 at x=120, holding a text column of 700x491 at x=120 and an image column of
 * 500x491 at x=820. 700 + 500 = 1200 exactly, so the two butt and the gap is zero on both
 * axes. 700 / 1200 = 58.33% and 500 / 1200 = 41.67%, the denominator being the row itself
 * with no gap subtracted (reference/sources/block-attributes.md).
 *
 * The 60px between the row's 551 and the columns' 491 is the row's own block padding, 30
 * above and below.
 *
 * `align-items` is left at its `stretch` default on purpose: that is what makes the image
 * column 491 tall while its 337-tall content stays at the top, which is what the contract
 * measures and why it writes no verticalAlignment.
 */
.wp-block-washington-mills-text-image-carousel__row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 0;
	/* Was `var( --wp--preset--spacing--40 )` (30px above and below): on a term page (taxonomy.html)
	   this stacked with the band wrapping the carousel's own 30px padding, measuring 60px title-to-
	   text against the approved 30px. SUPERSEDED 2026-09-25 (spacing-standard.md §2 "Proximity"):
	   one 30px band padding per carousel, not two stacked -- the band around this block keeps its
	   padding; this row no longer adds a second one. */
	padding-block: 0;
}

.wp-block-washington-mills-text-image-carousel__column {
	/*
	 * 15px, measured twice over: the text body is 670 wide at x=135 inside a 700 column at
	 * x=120, and the carousel is 470 wide at x=835 inside a 500 column at x=820.
	 */
	padding-inline: var( --wp--style--root--padding-left, 15px );
}

.wp-block-washington-mills-text-image-carousel__column.is-text {
	flex: 0 0 58.33%;
	max-width: 58.33%;
}

.wp-block-washington-mills-text-image-carousel__column.is-media {
	flex: 0 0 41.67%;
	max-width: 41.67%;
}

/*
 * IMAGE POSITION `left` SWAPS THE TWO VISUALLY AND LEAVES THE DOM ALONE, so the text is
 * still what a screen reader and a stacked layout reach first. `order` rather than
 * `row-reverse` for exactly that reason.
 */
.wp-block-washington-mills-text-image-carousel.is-media-left .wp-block-washington-mills-text-image-carousel__column.is-media {
	order: -1;
}

/* ------------------------------------------------------------------------ the text column */

/*
 * UNMEASURED BOX. The contract's `structure` carries no node for Section Heading — the
 * reference instance leaves the field empty — so the level, the size and this margin are all
 * conventional rather than read. The 15px lines it up with the columns below it.
 */
.wp-block-washington-mills-text-image-carousel__heading {
	margin: 0 0 var( --wp--preset--spacing--30 );
	padding-inline: var( --wp--style--root--padding-left, 15px );
}

/*
 * THE TEXT BODY. Measured `div.section-content.field` 670x475 at x=135, holding three
 * paragraphs 630 wide at x=175 — so 40px of left inset and none on the right, which is
 * var:preset|spacing|50 on this theme's ladder. 670 = 630 + 40 and the right edges coincide
 * at x=805, which is what fixes the asymmetry rather than guessing it.
 *
 * 21px at weight 600 is measured directly; 21px is this theme's `body-text` preset, so the
 * token is written instead of the number. The line height is 1.6 because the first paragraph
 * is 336 tall over ten lines (10 x 33.6) and the one-line third paragraph is 34.
 */
.wp-block-washington-mills-text-image-carousel__content,
.wp-block-washington-mills-text-image-carousel__bottom {
	font-size: var( --wp--preset--font-size--body-text );
	font-weight: 600;
	line-height: 1.6;
}

.wp-block-washington-mills-text-image-carousel__content {
	padding-left: var( --wp--preset--spacing--50 );
}

/*
 * THE 40px LEFT INSET IS A 1440x900-ONLY MEASUREMENT AND DOES NOT HOLD BELOW THE THEME'S OWN
 * `mobile` CUTOFF (639.98px, `.wp-block-washington-mills-text-image-carousel__column`'s own
 * step, a few rules up) -- found at checkpoint 2, item 2 (2026-09-24). This file's own header
 * says every length is "traced to the unit contract's own measurements at 1440x900"; unlike
 * the column, the heading and the bottom-content padding, this one rule was never given a
 * narrow-viewport step, so it carried the desktop 40px straight through to 390.
 *
 * MEASURED ON VIBRATORY FINISHING AT 390x844: with the 40px still in force the content's own
 * inner box was 310px wide (column 370 less this rule's 40 plus the column's own 10+10), and
 * the CTA button -- `display: inline-block`, sized by its own text -- wrapped to two lines at
 * that width; the operator's own figure for the source is one line at roughly a 6px inset each
 * side, i.e. close to the ~350-370px the column's OWN padding already provides with no added
 * inset from this rule. Zeroing this rule's left padding below 639.98px leaves the column's
 * existing (already-stepped, already-symmetric) 10px each side as the only inset at this
 * width, matching the source's small, roughly-symmetric gutter far more closely than the
 * carried-over 40. This block is shared by every term-content post that uses it (`fields`:
 * text-image-carousel 44 placements) and by at least one non-term page (this file's own note
 * on body-copy link colour cites "the about-page carousel"), so the change reaches every one
 * of them, not only this template -- named in the hand-back as unconfirmed elsewhere.
 */
@media ( max-width: 639.98px ) {

	.wp-block-washington-mills-text-image-carousel__content {
		padding-left: 0;
	}
}

/*
 * 16px BETWEEN PARAGRAPHS AND NONE AT EITHER END. Measured: paragraph tops at y=627, 979 and
 * 1029 with heights 336, 34 and 74, so both gaps are exactly 16 and 336 + 16 + 34 + 16 + 74
 * = 476 against a 475-tall container.
 */
.wp-block-washington-mills-text-image-carousel__content > *,
.wp-block-washington-mills-text-image-carousel__bottom > * {
	margin-block: 0 var( --wp--preset--spacing--25 );
}

.wp-block-washington-mills-text-image-carousel__content > :last-child,
.wp-block-washington-mills-text-image-carousel__bottom > :last-child {
	margin-bottom: 0;
}

/*
 * A PARAGRAPH THAT IS ONLY A CTA LINK SITS FURTHER FROM THE BODY COPY THAN THE FLAT 16px ABOVE
 * GIVES IT -- found at checkpoint 2, item 4 (2026-09-24), measured on Vibratory Finishing at
 * 1440x900. The real imported content (`term-content` post 2347, ACF `content` field) is two
 * `<p>`s: the body copy, then `<p><a class="cta-button" ...>Washington Mills Ceramics
 * CORP</a></p>` with nothing else in it. Measured on the build: body paragraph bottom y=969,
 * button paragraph top y=985 -- the flat 16px gap above. The operator's figure for the source
 * is the button sitting about 55px lower, i.e. a gap of about 71px, not 16.
 *
 * SCOPED TO "A PARAGRAPH WHOSE ONLY CHILD IS THE BUTTON", not to `:last-child` alone, so a
 * carousel instance whose last paragraph is ordinary body copy is untouched. 71px is a literal
 * because it is not on this theme's spacing ladder (60/70 map to 50px/60px; 71 is nearest to
 * neither) -- written as a measurement of this gap, not a preset. Not re-verified at any other
 * viewport, and not re-verified on any other instance of this block (this block is shared
 * across 44 term-content placements and at least one non-term page); the source paragraph's
 * height above the CTA is unmeasured here, so the true source margin could be a preset value
 * this build cannot distinguish from 71px at this one instance. Named in the hand-back.
 */
.wp-block-washington-mills-text-image-carousel__content > p:has( > a.wp-element-button:only-child ) {
	/* Was 71px (an unmeasured estimate, named above): snapped to the nearest scale step,
	   spacing|80 (80px), 2026-09-25 (spacing-standard.md §1 item 3, "standard wins"). */
	margin-top: var( --wp--preset--spacing--80 );
}

/*
 * UNMEASURED TREATMENT, named where it is written: Section Bottom Content has no node in the
 * contract's `structure` either, so it shares the body's type because it is the body's
 * sibling field in the same component.
 */
.wp-block-washington-mills-text-image-carousel__bottom {
	margin-top: var( --wp--preset--spacing--40 );
	padding-inline: var( --wp--style--root--padding-left, 15px );
}

/* ----------------------------------------------------- the CTA's offset fill plate (chrome) */

/*
 * THE FILLED CTA'S OFFSET FILL PLATE — the contract's `chrome` row `cta-button-plate`.
 *
 * The source's `%cta-button:after` (scss/base/_common.scss:37-47) is `content: ''` at
 * `top: 0; left: 30px; width: 100%; height: 100%` with `background: $highlight-1` and
 * `z-index: -1`, behind an anchor that carries the same fill itself. Measured at 1440x900 the
 * anchor is 419x74 at x=175 with `padding: 20px 0 20px 30px`, so its own ink runs
 * x=175..594 and the plate adds x=205..624: the PAINTED red is 449 wide with the label inset
 * 30px from each end, and the anchor's box is 30px narrower than the thing a reader sees.
 *
 * `$highlight-1` is `#db240b` (scss/_settings.scss:59), which is this theme's `primary`
 * slug exactly — so the rule writes the token and not the hex.
 *
 * THE ANCHOR'S OWN FILL IS NOT WRITTEN HERE. theme.json's styles.elements.button already
 * resolves to radius 0, primary on white, `padding: 20px 0 20px 30px`, body-text at 700
 * uppercase — the measured CTA, value for value — and render.php promotes the source's own
 * `cta-button` anchor into `wp-element-button` so those styles reach it. This file adds only
 * the plate.
 *
 * `z-index: 0` ON THE ANCHOR IS LOAD-BEARING AND IS A DEVIATION IN MECHANISM. A `z-index:
 * -1` child paints behind its parent's background but also behind every ancestor background
 * up to the nearest stacking context — including this band's own white — so without a
 * stacking context on the anchor the plate would be invisible rather than offset. Making the
 * anchor one puts the plate above the anchor's own identical fill (no visible difference) and
 * leaves the 30px overhang painting over the band. The source achieves the same paint some
 * other way; what is reproduced is the result, and the difference is named in the hand-back.
 *
 * THE HOVER SKEW IS BUILT, at the foot of the plate rule below (2026-09-13). It was not,
 * and this paragraph used to say so: `&:hover &:after { transform: skew(15deg) }`
 * (_common.scss:48-52) is quoted in the same `chrome` row, which says outright that nothing
 * in the definition captures hover on this unit. That is still true of the DEFINITION and is
 * why no contract asserts it — a DOM capture records a resting state and no pseudo-state at
 * all, so ai/reference/ cannot witness a hover on this or any other unit. The rule is
 * transcribed from the source's own SCSS, which is the only channel that carries one.
 */
.wp-block-washington-mills-text-image-carousel__content .wp-element-button {
	/*
	 * INLINE-BLOCK IS A MEASUREMENT, NOT A TIDY-UP, and it is worth 9px of height. The
	 * contract measures the anchor at 419x74 with `padding: 20px 0 20px 30px`, so its content
	 * box is 34 tall — one 21px line at this unit's own 1.6 line height, 33.6. An anchor left
	 * at `display: inline` paints its FONT's content area instead of its line box and
	 * computes 65 tall against the same declarations; measured with probe.js on this
	 * instance before the property was added. The contract's own core/button node reads the
	 * element as an inline-block in passing, which agrees.
	 */
	display: inline-block;
	position: relative;
	z-index: 0;
	text-decoration: none;
}

.wp-block-washington-mills-text-image-carousel__content .wp-element-button::after {
	content: "";
	position: absolute;
	top: 0;
	left: 30px;
	z-index: -1;
	width: 100%;
	height: 100%;
	background-color: var( --wp--preset--color--primary );

	/* Declared on the plate at REST in the source (_common.scss:46), not on the hover rule. */
	transition: all 0.3s ease-in-out;
}

/*
 * THE HOVER SKEW, now built. `&:hover { &:after { transform: skew(15deg) } }`
 * (_common.scss:48-52) — the same rule, on the same `%cta-button` placeholder, as the one
 * assets/css/blocks/button.css writes for the pattern-built CTAs. It is written twice
 * because the plate itself is: this block's anchor is reached by its own block selector and
 * never by the `.wm-*` unit hook classes that file's rules are scoped to, so there is no
 * one selector that covers both. Both copies transcribe the same two source lines.
 */
.wp-block-washington-mills-text-image-carousel__content .wp-element-button:hover::after {
	transform: skew( 15deg );
}

/* ------------------------------------------------------------------------- the carousel */

.wp-block-washington-mills-text-image-carousel__carousel {
	position: relative;
}

.wp-block-washington-mills-text-image-carousel__viewport {
	position: relative;
	overflow: hidden;
}

/*
 * The track's own border box stays exactly one slide wide however many slides it holds,
 * which is what makes view.js's transform arithmetic work: -100% is one slide and one gap is
 * added per step. The slides overflow it and the viewport above clips them.
 */
.wp-block-washington-mills-text-image-carousel__track {
	display: flex;
	flex-direction: row;
	gap: var( --wm-tic-space-between );
	width: 100%;
	transition: transform var( --wm-tic-speed ) ease;
	will-change: transform;
}

.wp-block-washington-mills-text-image-carousel__slide {
	flex: 0 0 100%;
}

/*
 * Measured `div.carousel-image.field__item` and its `<img>` are both 470x337, the same box
 * as the wrapper — so the image fills its slot and carries the aspect ratio itself.
 */
.wp-block-washington-mills-text-image-carousel__image {
	display: block;
	width: 100%;
	height: auto;
}

/*
 * MOTION IS THE PART A VESTIBULAR DISORDER FEELS, not the slide change itself. Removing the
 * transition leaves the carousel fully working — the bullets still change which slide shows —
 * and takes away only the sweep. WCAG 2.2 AA does not require this; 2.3.3 is AAA. It costs
 * three lines.
 */
@media ( prefers-reduced-motion: reduce ) {

	.wp-block-washington-mills-text-image-carousel__track {
		transition: none;
	}
}

/* -------------------------------------------------------- the pagination bullets (chrome) */

/*
 * THE DOT LIST. Measured with probe.js at 1440x900: `ul.slick-dots` is 470x38 at x=135
 * y=1899 — exactly as wide as the carousel above it — with each `li` 20x20 at y=1907, so the
 * list has 8px above the items and 10px below. The two `li`s measured at x=345 and x=375 sit
 * 10px apart and are centred on the list's own centre (345..395 centred on 370, the centre of
 * a 470 list at x=135), which is slick's own `margin: 0 5px` per item.
 */
.wp-block-washington-mills-text-image-carousel__pagination {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: 0;
	width: 100%;
	margin: 0;
	/* Was 8px 0 10px: 8 snapped to spacing|20 (10px), 2026-09-25 (spacing-standard.md §1 item 3). */
	padding: var( --wp--preset--spacing--20 ) 0 var( --wp--preset--spacing--20 );
	list-style: none;
}

/*
 * THE HOST IS THE `li`, NOT THE `button`, AND THAT IS WHAT DECIDES WHERE THE SQUARE SITS.
 * The source's `button` computes `position: static` and slick's `.slick-dots li` is
 * `position: relative` (js/slick/slick-theme.scss:146-153), so the containing block for the
 * square's `top: 0; left: 0` is the `li` — which is why the 15px square sits at the `li`'s
 * top-left corner with 5px of the 20x20 slot uncovered at right and bottom, rather than
 * centred in it.
 */
.wp-block-washington-mills-text-image-carousel__pagination-item {
	position: relative;
	width: 20px;
	height: 20px;
	/* Was 0 5px (10px between adjacent dots): snapped to spacing|20 (10px a side, 20px between
	   dots), 2026-09-25 (spacing-standard.md §1 item 3, "standard wins") -- a visible change to
	   this carousel control. */
	margin: 0 var( --wp--preset--spacing--20 );
	padding: 0;
	list-style: none;
}

.wp-block-washington-mills-text-image-carousel__bullet {
	position: static;
	display: block;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 5px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	appearance: none;
}

/*
 * THE INACTIVE DOT — a 15x15 square OUTLINE in the brand red, and it is the MERGE of two
 * layers rather than either one of them. Slick's own vendored theme paints a grey `•` at
 * 20x20 and quarter opacity (js/slick/slick-theme.css:178-199); the theme's override,
 * `.carousel-wrapper .slick-dots li button:before` (scss/modules/_paragraph.scss:645-653),
 * wins every property it names with three classes plus two elements against one plus two —
 * `content: ''`, `opacity: 1`, `width: 15px`, `height: 15px`, `border: 2px solid
 * $highlight-1`. So the character is gone and the box is a bordered square.
 *
 * `box-sizing: border-box` IS THE ONE NUMBER A READER WOULD GET WRONG. Foundation sets
 * `html { box-sizing: border-box }` with `*, *::before, *::after { box-sizing: inherit }`, so
 * the 2px border is INSIDE the 15px and the transparent interior is 11x11. Content-box
 * sizing would give a 19x19 square, 27% too wide.
 *
 * `$highlight-1` is `#db240b` (scss/_settings.scss:59) and is this theme's `primary` slug.
 */
.wp-block-washington-mills-text-image-carousel__bullet::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	box-sizing: border-box;
	width: 15px;
	height: 15px;
	border: 2px solid var( --wp--preset--color--primary );
	background-color: transparent;
	opacity: 1;
}

/*
 * THE ACTIVE DOT DIFFERS IN EXACTLY ONE DECLARATION: the square is FILLED. No size change,
 * no border change, no opacity change — `.carousel-wrapper .slick-dots li.slick-active
 * button:before` (scss/modules/_paragraph.scss:654-661) adds nothing but `background` and an
 * `opacity: 1` the inactive rule already set. A build that signalled the active slide by
 * growing the dot or changing its opacity would not be reproducing this source.
 */
.wp-block-washington-mills-text-image-carousel__bullet.is-current::before {
	background-color: var( --wp--preset--color--primary );
}

/*
 * A visible focus ring, because `font-size: 0` leaves the browser nothing to outline tightly
 * and a 20x20 control is the smallest thing on the band. WCAG 2.2 AA, 2.4.7 — this is markup
 * this build authors with a free hand, so the target binds it.
 */
.wp-block-washington-mills-text-image-carousel__bullet:focus-visible {
	outline: 2px solid var( --wp--preset--color--secondary );
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------- the two rungs */

/*
 * STACKED, AND 781px IS NOT A CHOSEN BREAKPOINT. The contract's `structure` sets
 * `isStackedOnMobile: true` on the columns, and `@media (max-width: 781px)` is what core's
 * own columns stylesheet does with that attribute — so the unit stacks exactly where a
 * core/columns placed by this contract would. Measured at 390x844 the two stack with the text
 * first (text 390x578 at y=588, image 390x265 at y=1165), which is what core does by default
 * and needs no reordering attribute; the `order` reset below is what keeps that true for an
 * instance whose Image Position is `left`.
 */
@media ( max-width: 781px ) {

	.wp-block-washington-mills-text-image-carousel__row {
		flex-direction: column;
	}

	.wp-block-washington-mills-text-image-carousel__column.is-text,
	.wp-block-washington-mills-text-image-carousel__column.is-media {
		flex: 0 0 auto;
		max-width: 100%;
	}

	/* Added 2026-09-25 (spacing-standard.md §2 "Proximity"): stacked, the text column needs its
	   own gap to the image below it -- the row's own padding is 0 now (see __row above), so
	   without this the text touched the image. 30px (spacing|40), the approved plan's number. */
	.wp-block-washington-mills-text-image-carousel__column.is-text {
		margin-bottom: var( --wp--preset--spacing--40 );
	}

	.wp-block-washington-mills-text-image-carousel.is-media-left .wp-block-washington-mills-text-image-carousel__column.is-media {
		order: 0;
	}
}

/*
 * 10px OF COLUMN PADDING BELOW THE THEME'S OWN `mobile` BREAKPOINT. Measured at 390x844: the
 * image column box is 390 wide and its image is 370 (265 x 1.395), so 10px each side. 639.98px
 * is theme.json's own settings.viewport.mobile and not a number invented here, which is what
 * keeps this unit stepping where the rest of the theme steps.
 */
@media ( max-width: 639.98px ) {

	.wp-block-washington-mills-text-image-carousel__column,
	.wp-block-washington-mills-text-image-carousel__heading,
	.wp-block-washington-mills-text-image-carousel__bottom {
		padding-inline: var( --wp--preset--spacing--20 );
	}
}

/*
 * THE TEXT COLUMN'S OWN GUTTER IS ZEROED BELOW THE MOBILE CUTOFF -- checkpoint 2, item 2/3
 * (2026-09-24), on top of the `.content` fix above. The 10px this file cites two rules up is
 * measured on the MEDIA column's own image box ("the image column box is 390 wide and its
 * image is 370... so 10px each side") and is left exactly as it was; this rule reaches only
 * `.is-text`, so that measurement is unaffected everywhere it applies.
 *
 * MEASURED ON VIBRATORY FINISHING AT 390x844: with `.content`'s own 40px removed the CTA's
 * available width was still only 350px (root 10 + column 10, each side) against a natural
 * (no-wrap) width of 361px for "Washington Mills Ceramics CORP" at this theme's button type --
 * measured directly (a detached clone of the live anchor, `white-space: nowrap`, real fonts
 * loaded), not estimated from a text-node range, which undercounts this particular label by
 * about 54px for reasons not chased down. 11px short is why it still wrapped to two lines
 * after the first fix alone. Zeroing this column's own padding leaves 370px available (root's
 * own 10px each side is a theme-wide, shared token and is not touched here), 9px more than the
 * button needs -- confirmed by re-measuring after this rule, not by this arithmetic alone.
 *
 * NOT EXTENDED TO `.is-media`: the checkpoint's own figures are about the text column and its
 * button only, the media column's 10px has its own citation above, and there is no reference
 * open to this build to check what a 0px image inset would look like. If the source's own text
 * column gutter is not actually 0 at this width -- the operator's own figure was "about 6px",
 * not 0 -- this is closer to it than the 20px two rules up but still a further, unconfirmed
 * step past what any capture in this build's reach measured; named in the hand-back.
 */
@media ( max-width: 639.98px ) {

	.wp-block-washington-mills-text-image-carousel__column.is-text {
		padding-inline: 0;
	}
}

/* --------------------------------------------------------------- an instance with no images */

/*
 * Carousel Images is not a required field, so copy with no slides is a state an editor can
 * reach. The text then takes the whole row rather than leaving two fifths of the band empty.
 * Nothing in the contract measures this state; it is a guard, and render.php's own comment
 * says so beside the class that triggers it.
 */
.wp-block-washington-mills-text-image-carousel.is-text-only .wp-block-washington-mills-text-image-carousel__column.is-text {
	flex: 0 0 100%;
	max-width: 100%;
}

/*
 * Body-copy links in the slide text are the site's red with the darker hover and no underline -- the source's rule
 * for rich-text links (measured 2026-09-21: rgb(219, 36, 11) at rest, rgb(188, 31, 9) hover, no underline, on the
 * about-page carousel). This content is raw p/ul/li HTML from the block's own fields, not core paragraph/list
 * blocks, so the theme.json `elements.link` colour on those blocks does not reach it.
 */
.wp-block-washington-mills-text-image-carousel__content a:not(.wp-element-button) {
	color: var(--wp--preset--color--primary);
}

.wp-block-washington-mills-text-image-carousel__content a:not(.wp-element-button):hover {
	color: #bc1f09;
}
