/* MrHost Forge Base: page structure. */
.container {
	width: 100%;
	max-width: var(--mhf-container-width);
	margin-inline: auto;
	padding-inline: var(--mhf-space-md);
}

.site-topbar {
	background: var(--mhf-color-secondary);
	color: var(--mhf-color-background);
	font-size: 0.875rem;
}

.site-topbar a {
	color: inherit;
}

.site-header {
	background: var(--mhf-color-background);
	border-block-end: 1px solid var(--mhf-color-border);
}

/* Sticky header (Appearance > Customize > Header). Also covers a header made with the Header & Footer plugin. */
.has-sticky-header .site-header,
.has-sticky-header .mhf-hf--header {
	position: sticky;
	inset-block-start: 0;
	z-index: 100;
}

.admin-bar.has-sticky-header .site-header,
.admin-bar.has-sticky-header .mhf-hf--header { inset-block-start: 32px; }

@media screen and (max-width: 782px) {
	.admin-bar.has-sticky-header .site-header,
	.admin-bar.has-sticky-header .mhf-hf--header { inset-block-start: 46px; }
}

/* The admin bar does not stick on very small screens, so the header goes back to the top. */
@media screen and (max-width: 600px) {
	.admin-bar.has-sticky-header .site-header,
	.admin-bar.has-sticky-header .mhf-hf--header { inset-block-start: 0; }
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--mhf-space-md);
	padding-block: var(--mhf-space-md);
}

.site-title {
	font-family: var(--mhf-font-family-heading);
	font-size: 1.5rem;
	font-weight: var(--mhf-font-weight-bold);
	color: var(--mhf-color-secondary);
	text-decoration: none;
}

.custom-logo {
	display: block;
	max-height: 60px;
	width: auto;
}

.menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mhf-space-xs) var(--mhf-space-lg);
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-navigation a {
	color: var(--mhf-color-secondary);
	text-decoration: none;
	font-weight: var(--mhf-font-weight-bold);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	color: var(--mhf-color-primary);
}

.menu-toggle {
	display: none;
}

.layout {
	padding-block: var(--mhf-space-xl);
}

.layout--sidebar {
	display: grid;
	gap: var(--mhf-space-xl);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
	.layout--sidebar {
		grid-template-columns: minmax(0, 1fr) 20rem;
	}
}

.page-canvas .site-main,
.entry--full .entry-content {
	padding: 0;
}

.site-footer {
	margin-block-start: var(--mhf-space-xl);
	background: var(--mhf-color-surface);
	border-block-start: 1px solid var(--mhf-color-border);
}

.site-footer__widgets {
	display: grid;
	gap: var(--mhf-space-lg);
	padding-block: var(--mhf-space-xl);
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.site-footer__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--mhf-space-md);
	padding-block: var(--mhf-space-md);
	font-size: 0.875rem;
}

.site-footer__bar p {
	margin: 0;
}

/* Header quote actions: the basket count and the Request a quote button, printed when the Quotes plugin is active. */
.site-header__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--mhf-space-sm) var(--mhf-space-md);
	margin-inline-start: auto;
}

.mhf-quote-count-link {
	font-weight: var(--mhf-font-weight-bold);
	color: var(--mhf-color-secondary);
	text-decoration: none;
}

.mhf-quote-count-link .mhf-quote-count {
	display: inline-block;
	min-width: 1.5em;
	padding-inline: 0.4em;
	border-radius: var(--mhf-radius-lg);
	background: var(--mhf-color-accent);
	color: var(--mhf-color-secondary);
	text-align: center;
}

/* Tablets: the quote actions sit on the name's row and the menu gets the row below. */
@media (min-width: 768px) and (max-width: 1099px) {
	.site-header__inner .site-branding { order: 1; }
	.site-header__actions { order: 2; }
	.site-header__inner .main-navigation { order: 3; flex: 0 0 100%; }
}

/* Mobile navigation. */
@media (max-width: 767px) {
	.menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 2.75rem;
		height: 2.75rem;
		padding: 0;
		background: transparent;
		border: 1px solid var(--mhf-color-border);
		border-radius: var(--mhf-radius-md);
		cursor: pointer;
	}

	.menu-toggle__bars,
	.menu-toggle__bars::before,
	.menu-toggle__bars::after {
		display: block;
		width: 1.25rem;
		height: 2px;
		background: var(--mhf-color-secondary);
		content: "";
	}

	.menu-toggle__bars {
		position: relative;
	}

	.menu-toggle__bars::before,
	.menu-toggle__bars::after {
		position: absolute;
		inset-inline-start: 0;
	}

	.menu-toggle__bars::before { inset-block-start: -6px; }
	.menu-toggle__bars::after { inset-block-start: 6px; }

	.main-navigation {
		display: none;
		flex-basis: 100%;
	}

	.main-navigation.is-open {
		display: block;
	}

	.main-navigation .menu {
		flex-direction: column;
		gap: var(--mhf-space-sm);
	}

	/* The name and the menu button share the first row, the open menu fills the second,
	   and the basket with the quote button sit together on the last row. */
	.site-header__inner .site-branding {
		flex: 1 1 0;
		min-width: 0;
	}

	.site-header__inner .main-navigation {
		flex: 0 0 100%;
	}

	.site-header__actions {
		flex: 0 0 100%;
		flex-wrap: nowrap;
		justify-content: space-between;
		margin-inline-start: 0;
	}

	.site-header__actions .site-header__cta {
		padding-inline: 1rem;
		font-size: 0.8125rem;
		white-space: nowrap;
	}
}
