/**
 * Pattern: Link Band — Full-width Strip  (patterns/link-band.php)
 *
 * A 58px full-bleed strip sitting flush under the interior hero with one
 * centred bold link. Fill and label colour ride on the block's own
 * backgroundColor/textColor attributes (see the pattern docblock).
 *
 * One pattern = one CSS partial (auto-enqueued by inc/enqueue.php glob).
 */

/* The label link takes the band's own text colour. global.css colours every
   `.entry-content a` with --kd-color-link at (0,3,1), which would turn this
   link navy on the primary fill. Re-point the token here rather than fighting
   specificity with !important: the global rule then resolves to currentColor,
   i.e. whatever textColor the block carries. */
.kd-link-band {
	--kd-color-link: currentColor;
}

/* 58px (3.625rem) tall. `min-height` rather than `height` so a long label wrapping on a
   narrow phone grows the band instead of overflowing it.

   `padding-block: 0` is load-bearing: a core/group carrying a background colour
   picks up WP's `.wp-block-group.has-background { padding: 1.25em 2.375em }`,
   which pushes the band to ~64px. The band centres its label via flex instead,
   so the block padding has no job here. */
.kd-link-band {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3.625rem;
	padding-block: 0;
	padding-inline: var(--kd-gutter);
	margin-block: 0;
}

/* Full-bleed guarantee. Same technique (and same reason) as .kd-cta-band: as an
   `alignfull` child of a CONSTRAINED `post-content` (`has-global-padding`), WP's
   root-padding-aware breakout can leave an edge short. Re-assert the symmetric
   breakout from the parent's own gutter — no `100vw`, so no scrollbar overflow. */
:where(.has-global-padding) > .kd-link-band.alignfull {
	margin-left: calc(var(--kd-gutter) * -1);
	margin-right: calc(var(--kd-gutter) * -1);
	width: calc(100% + (var(--kd-gutter) * 2));
}

/* Flush to the hero. global.css gives the first child of an interior-hero page
   one rhythm unit (--kd-section-gap) of separation; this band sits butted
   against the hero. Mirror the global selector so the override wins on
   specificity (0,4,1 vs 0,3,1) instead of on !important. */
main:has(.kd-hero-interior) .entry-content > .kd-link-band:first-child {
	margin-block-start: 0;
}

/* Label — 19.2px bold, centred, underlined. Colour + weight ride on the block's
   own textColor/fontWeight attributes; only the size, the margin reset (WP
   ships 24px block margins) and the underline live here.
   Size is 1.2rem, not --kd-size-body-lg (18px): white on the primary fill is
   3.81:1, which only passes as WCAG "large text" (>=14pt bold = 18.66px), and
   18px bold sits just under that line. */
.kd-link-band .kd-link-band__label {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.3;
}

.kd-link-band .kd-link-band__label a {
	color: inherit;
	text-decoration: underline;
}
