/**
 * Site tweaks for Mr Fix.
 *
 * A home for small, client-requested adjustments that are not part of the
 * Tailwind build, so they survive a rebuild of style.css.
 */

/**
 * Hide the header hamburger on mobile and tablet.
 *
 * The fixed bottom bar already carries a Menu button, and it opens the same
 * panel — both the header button and the bar button point at
 * aria-controls="mrfix-menu". The two also share a breakpoint: both are shown
 * below 1024px and both are hidden from 1024px up, where the full horizontal
 * nav takes over. Hiding the header one below 1024px therefore removes the
 * duplicate without leaving any width unable to reach the menu.
 */
@media (max-width: 1023px) {

	#mrfix-burger {
		display: none;
	}
}

/**
 * Header bar: phone button and responsive fit.
 *
 * The bar holds logo, Primary menu, Free quote, Book online and the phone
 * button. At full size that needs about 1530px; below that the menu used to
 * wrap onto two lines and run under the buttons. Tiers (desktop only, the bar
 * below 1024px is unchanged):
 *
 * - 1536px and up: everything at full size.
 * - 1280px–1535px: tighter menu and buttons; the phone shows only its icon
 *   below 1440px.
 * - 1024px–1279px: the menu moves into the slide-in panel behind the burger
 *   (the same panel phones use); the buttons stay in the bar.
 */
.mrfix-bar-phone {
	border-color: rgba(255, 255, 255, 0.55);
	background: transparent;
	color: #fff;
}

.mrfix-bar-phone:hover,
.mrfix-bar-phone:focus-visible {
	border-color: #3eacd7;
	background: #3eacd7;
	color: #fff;
}

@media (min-width: 1024px) {

	/* Menu labels never break inside an item. */
	#site-navigation .mrfix-menu > li > a {
		white-space: nowrap;
	}
}

@media (min-width: 1024px) and (max-width: 1535.98px) {

	#mrfix-bar {
		gap: 12px;
	}

	#mrfix-bar > a[rel="home"] {
		min-width: 0;
		margin-left: 0;
	}

	#mrfix-bar > div:last-child {
		gap: 10px;
	}

	#mrfix-bar > div:last-child > a {
		min-width: 0;
		padding-inline: 14px;
	}

	#site-navigation .mrfix-menu > li {
		margin-inline: 0;
	}

	#site-navigation .mrfix-menu > li > a {
		padding-inline: 8px;
	}
}

@media (min-width: 1024px) and (max-width: 1439.98px) {

	.mrfix-bar-phone {
		width: 53px;
		padding-inline: 0 !important;
	}

	.mrfix-bar-phone .mrfix-bar-phone__num {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

@media (min-width: 1280px) and (max-width: 1365.98px) {

	#site-navigation .mrfix-menu > li > a {
		padding-inline: 6px;
		font-size: 14px;
	}
}

@media (min-width: 1024px) and (max-width: 1279.98px) {

	#site-navigation {
		display: none;
	}

	#mrfix-bar > div:last-child {
		margin-left: auto;
	}

	#mrfix-burger {
		display: inline-flex;
	}

	#mrfix-menu:not([hidden]) {
		display: flex;
	}

	#mrfix-menu-backdrop:not([hidden]) {
		display: block;
	}
}

/**
 * Landing — Split hero: two buttons side by side.
 *
 * Each button gets half of the 580px column. With the block's 50px side
 * padding a phone number ("0480 009 588") no longer fit and broke onto two
 * lines, and the solid (2px) and glass (3px) borders left the pair at
 * different heights. Pairs now stretch to one height, keep 20px sides and
 * never wrap their label.
 */
.mf-hs-btns {
	align-items: stretch;
}

.mf-hs-btns--pair > a {
	padding-inline: 20px;
	white-space: nowrap;
}
