/* Onshin — small utility layer. Everything expressible in theme.json lives
   there instead; this file only covers what block styles/settings can't
   reach: the hand-authored logo markup, focus states, motion preference,
   and touch-target sizing (plan §16, accessibility). */

/* Fixed type scale in theme.json (WP's own "fluid" auto-interpolation was
   silently ignoring our explicit min/max per size and substituting its own
   computed ranges — verified on the live site: --font-size--large rendered
   as clamp(22px,...,36px) when 18-20px was requested). Mobile step-down
   handled here instead, on the CSS custom properties directly, so every
   generated rule that references var(--wp--preset--font-size--*) picks it
   up automatically without touching each block. */
@media (max-width: 599px) {
	:root {
		--wp--preset--font-size--xxx-large: 32px;
		--wp--preset--font-size--xx-large: 26px;
		--wp--preset--font-size--x-large: 22px;
		--wp--preset--font-size--large: 17px;
	}
}

.onshin-logo-link {
	display: block;
	line-height: 0;
}
.onshin-logo {
	height: 56px;
	width: auto;
	display: block;
}
@media (min-width: 782px) {
	.onshin-logo {
		height: 72px;
	}
}

/* Grid layouts (Group block "grid" type — classes, benefits, instructors,
   cards) default to CSS Grid's align-items: stretch, which forces every
   card in a row to match the tallest sibling's height. That's what made
   the placeholder photo blocks balloon unevenly. Cards should size to
   their own content. */
.is-layout-grid {
	align-items: start;
}

/* Placeholder "photo" cover blocks: hard cap so a stretched parent can
   never inflate them further than intended, independent of the fix above. */
.wp-block-cover {
	max-height: 400px;
}

/* Fitssey mount points: reserved height so the widget popping in doesn't
   shift the page (CLS). Estimates, not measured against the real widget
   yet — plan §11 flags this as needing a look once we can see it render. */
.onshin-fitssey-mount {
	min-height: 480px;
}
.onshin-fitssey-mount--eager {
	min-height: 600px;
}
.onshin-fitssey-block {
	display: flex;
	justify-content: center;
}
.onshin-fitssey-toggle {
	background: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--white);
	border: none;
	cursor: pointer;
}
.onshin-fitssey-toggle:hover {
	background: var(--wp--preset--color--ink);
}
.onshin-fitssey-toggle:disabled {
	opacity: 0.7;
	cursor: wait;
}

/* Button pair consistency: WP core's built-in "outline" style ships its
   own em-based padding, which doesn't match the fixed spacing-token
   padding theme.json sets for the default (filled) button — that's why
   "Zobacz grafik" and "Nasze zajęcia" looked like two different button
   systems rather than a primary/secondary pair. Force both to the same
   box model regardless of which style variant (or WP's auto-generated
   "is-style-outline--N" instance class) is present. */
.wp-block-button__link {
	padding-top: var(--wp--preset--spacing--10) !important;
	padding-bottom: var(--wp--preset--spacing--10) !important;
	padding-left: var(--wp--preset--spacing--30) !important;
	padding-right: var(--wp--preset--spacing--30) !important;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--medium);
	border-radius: 0;
}

/* Visible focus state on every interactive element — plan §16, never remove
   outline without replacing it. */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--wp--preset--color--crimson);
	outline-offset: 2px;
}

/* Every tappable control gets a real hit target, even where the visible
   glyph is smaller (plan §6, §16 — 44px minimum). */
.wp-block-navigation .wp-block-navigation-item > a,
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close,
.wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Header CTA button: hidden in the mobile nav overlay list (it has its own
   prominent "Zapisz się" already at the top bar) to avoid showing the same
   action twice on small screens. */
@media (max-width: 781px) {
	.onshin-header-cta {
		display: none;
	}
}
