/*
 * cta-min-height.css — sitewide CTA button minimum height (2026-07-13, Alex's call).
 *
 * theme.css (the global reset + button styles file) is protected — it must not be touched
 * during the sitewide content release, per check_protected_shell.py. This file is the additive
 * alternative: a small, separately-enqueued stylesheet (see alexdesigns_cta_min_height_enqueue()
 * in functions.php) loaded with an explicit dependency on theme.css, so its declarations win the
 * cascade by source order without needing !important, while theme.css itself stays untouched.
 *
 * Every real CTA button sitewide gets a 40px minimum height — min-height, not height, so a
 * button whose label wraps to two lines on a narrow viewport can still grow past 40px instead of
 * clipping its own text. Selectors mirror exactly what theme.css already styles as buttons:
 * `.wp-block-button__link` (the one class every core WP button block renders — covers every
 * wp:buttons instance sitewide) and the header's `.ad-cta-desktop` / `.ad-nav-drawer__cta`.
 * `.ad-cta-mobile` is deliberately excluded: theme.css already gives it min-height:44px inside
 * its own ≤781px media query (a touch-target choice, already above 40px) — since that rule and
 * this file's base (non-media-scoped) rule share the same selector specificity, adding
 * `.ad-cta-mobile` here would let this later-loaded file's 40px silently undercut theme.css's
 * intentional 44px on mobile. Also excludes text-style secondary links (`__textbtn`,
 * `cr-resource__cta`) which are deliberately not filled buttons, and the handful of component
 * CTAs that already ship with an explicit min-height >= 40px (eoa-hero__cta, eoa-results__cta,
 * eoa-wave-hero__cta, s2-jump__btn) — those need no change here.
 */
.wp-block-button__link {
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.ad-cta-desktop,
.ad-nav-drawer__cta {
	min-height: 40px;
	box-sizing: border-box;
}

/* 2026-07-13 (Alex): the two header CTAs specifically — desktop "Get Free Assessment"
   (.ad-cta-desktop) and mobile "Contact" (.ad-cta-mobile) — get an exact 40px height (min AND
   max, not just a floor like the general CTA rule above): both labels are short, fixed, one-word-
   or-so strings that never wrap in the header, so capping them is safe and gives the header a
   consistent, non-growing button height. */
.ad-cta-desktop {
	max-height: 40px;
	box-sizing: border-box;
}

@media ( max-width: 1001px ) {
	/* Overrides theme.css's own .ad-cta-mobile min-height:44px inside this same breakpoint — same
	   selector specificity, this file loads after theme.css (see the dependency in
	   alexdesigns_cta_min_height_enqueue()), so source order lets this win without !important.
	   box-sizing:border-box is required here — without it max-height only caps the CONTENT box,
	   and .ad-cta-mobile's own padding (0.45rem 0.95rem, ~14px vertical) added on top, measured
	   live at 54px instead of the intended height. 2026-07-13: dropped 40px -> 30px per Alex's
	   follow-up ask. */
	.ad-cta-mobile {
		min-height: 30px;
		max-height: 30px;
		box-sizing: border-box;
	}
}

/* Header main nav links (How We Work / Who We Help / What We Do) never wrap, always one line —
   theme.css's own .ad-nav-desktop compression rules (see its comments) already fight WHOLE-NAV
   wrapping across a couple of tight viewport bands; this is the individual-label backstop so no
   single link's own text can break mid-phrase even under that compression. */
.ad-nav-desktop .ad-nav__grouphead a {
	white-space: nowrap;
}

/* 2026-07-13 (Alex): rebalance the header's two competing sizes — "Get Free Assessment" a touch
   smaller, the nav links a touch bigger — so neither reads oversized/undersized next to the
   other. theme.css already fights nav wrapping hard across 783-1149px (see its own comments on
   .ad-nav-desktop/.ad-nav__grouphead) with two size bands (>=1150px and 1002-1149px); both are
   bumped here by the same modest amount so that tuning isn't undone. Desktop CTA font-size drops
   from theme.css's 1rem.
   2026-07-13 follow-up (Alex): nav links bigger again, caret pulled in closer to its label, CTA
   text smaller again. */
.ad-cta-desktop {
	font-size: 0.85rem;
}

@media ( min-width: 1150px ) {
	.ad-nav-desktop .ad-nav__grouphead a {
		font-size: 1.2rem;
	}

	/* theme.css's base .ad-nav__caret (padding:7px, margin-left:-1px) leaves visible daylight
	   between the label and the caret glyph — tighten both so the caret reads as part of the
	   label instead of a separate floating control. */
	.ad-nav-desktop .ad-nav__caret {
		padding: 5px;
		margin-left: -5px;
	}
}

@media ( min-width: 1002px ) and ( max-width: 1149px ) {
	.ad-nav-desktop .ad-nav__grouphead a {
		font-size: 0.9rem;
	}

	.ad-nav-desktop .ad-nav__caret {
		padding: 4px;
		margin-left: -5px;
	}
}
