/* Header 002 — logo left, menu centred.
 *
 * The three columns are declared on the block (a three-column grid: logo,
 * menu, end). What core's layout cannot say is the track sizing, so it is
 * here: the two side tracks share the leftover space equally and the middle
 * one takes the menu's own width, which keeps the menu on the page's centre
 * line. Each side is never narrower than its content (`max-content`), so with
 * Cenik, Darilni boni and the button on the right nothing wraps or overlaps —
 * if the right side ever needs more than its half, the menu moves off centre
 * by the difference rather than colliding. Doubled, over core's generated
 * grid class (0,1,0).
 */
.site-header__inner--logo-left.site-header__inner--logo-left {
	grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
}

/* A menu in a header row never wraps onto a second line. */
.site-header__inner--logo-left .site-header__nav .wp-block-navigation__container {
	flex-wrap: nowrap;
}

/* Narrow desktops, just above the switch to the phone bar: five centre links,
 * the logo and the end group do not fit at the header's usual gaps (the header
 * shadows --space-sm as 2.25rem), so the gaps between menu items and between the
 * three groups tighten to the plain small step. Doubled where it has to beat the
 * site's (0,2,0) nav gap and core's grid gap. */
@media (782px < width <= 1024px) {
	.site-header__inner--logo-left.site-header__inner--logo-left {
		column-gap: var(--space-xs);
	}

	.site-header__inner--logo-left .site-header__nav .wp-block-navigation__container.wp-block-navigation__container {
		gap: var(--space-xs);
	}

	.site-header__inner--logo-left .site-header__end.site-header__end {
		gap: var(--space-xs);
	}

	/* And a little smaller all round, so the row fits without a label ever
	   breaking onto a second line: the logo, the menu text one step down, the
	   button at the compact padding the header uses on small phones. The logo
	   width is bespoke, as in asteri.css (a definite width, so the bar keeps
	   its height before the image loads). */
	.site-header__inner--logo-left .site-header__brand .wp-block-site-logo img {
		width: 130px;
	}

	.site-header__inner--logo-left .site-header__nav {
		font-size: var(--wp--preset--font-size--sm);
	}

	.site-header__inner--logo-left .site-header__actions {
		--button-padding: 0.6em 1em;
	}
}

/* A menu label never breaks across two lines. */
.site-header__inner--logo-left .site-header__nav .wp-block-navigation-item__content {
	white-space: nowrap;
}

/* Phones and tablets: the desktop menus hide and the menu group holds only the
 * toggle. Left in source order that would put the toggle in the middle and the
 * logo on the left, so the groups are reordered to Header 001's phone bar —
 * toggle, logo centred, calendar — at the same track sizes.
 *
 * 782px, not one of the theme's breakpoints: it is where core's per-device
 * visibility switches the menus (`width > 782px` is "desktop"), and the reorder
 * has to happen at exactly the same width. Justification is reset over core's
 * generated flex classes (0,1,0). */
@media (width <= 782px) {
	.site-header__inner--logo-left.site-header__inner--logo-left > .site-header__menu {
		order: 1;
		justify-content: flex-start;
	}

	.site-header__inner--logo-left.site-header__inner--logo-left > .site-header__brand {
		order: 2;
		justify-content: center;
	}

	.site-header__inner--logo-left.site-header__inner--logo-left > .site-header__end {
		order: 3;
	}
}
