/*  The Fretboard Hub: shared header, footer and colours.
    Loaded by every website page AND by the forum (through the
    fretboardhub/sitenav phpBB extension), so the header looks and
    behaves the same everywhere. Change the site colours here.
*/

:root {
	--fbh-bg: #F6F3EE;
	--fbh-surface: #FFFFFF;
	--fbh-surface-2: #EFEAE2;
	--fbh-surface-alt: #FAF8F4;
	--fbh-row-hover: #F8F1E4;
	--fbh-sticky: #FBF3E3;
	--fbh-raised: #F5E7CB;
	--fbh-line: #E2DCD2;
	--fbh-line-2: #CFC6B8;
	--fbh-accent-line: #E3C990;
	--fbh-code-bg: #F3EFE8;
	--fbh-text: #1F1A14;
	--fbh-text-soft: #4A4239;
	--fbh-muted: #6B6256;
	--fbh-placeholder: #6B6256;
	--fbh-disabled: #9A9185;
	--fbh-sage: #3F7A55;
	--fbh-accent: #8F5B10;
	--fbh-accent-hover: #6F460B;
	--fbh-on-accent: #FFFFFF;
	--fbh-error: #B3261E;
	--fbh-shadow: rgba(31, 26, 20, 0.14);
	color-scheme: light;
}

html.fbh-night {
	--fbh-bg: #141210;
	--fbh-surface: #1E1B17;
	--fbh-surface-2: #18150F;
	--fbh-surface-alt: #1B1814;
	--fbh-row-hover: #231F1A;
	--fbh-sticky: #231F18;
	--fbh-raised: #2A241B;
	--fbh-line: #2E2A24;
	--fbh-line-2: #4A4339;
	--fbh-accent-line: #4A3E2A;
	--fbh-code-bg: #100E0C;
	--fbh-text: #EDE6DA;
	--fbh-text-soft: #C9C0B2;
	--fbh-muted: #A89F90;
	--fbh-placeholder: #8A8173;
	--fbh-disabled: #6E665B;
	--fbh-sage: #9CC2A6;
	--fbh-accent: #E2A94B;
	--fbh-accent-hover: #F0C477;
	--fbh-on-accent: #1A1510;
	--fbh-error: #F08A7A;
	--fbh-shadow: rgba(0, 0, 0, 0.45);
	color-scheme: dark;
}

/* ---------- Website header (fbh_site_header.html) ---------- */
.fbh-sitebar {
	background: var(--fbh-bg);
	border-bottom: 1px solid var(--fbh-line);
	font-size: 15px;
}

.fbh-sitebar-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 18px 32px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
	box-sizing: border-box;
}

.fbh-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: "Bricolage Grotesque", Inter, sans-serif;
	font-weight: 700;
	font-size: 22px;
	color: var(--fbh-text);
}
.fbh-brand svg { color: var(--fbh-accent); }
.fbh-brand:hover { color: var(--fbh-text); }

.fbh-mainnav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	flex: 1 1 auto;
}

.fbh-mainnav a {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	box-sizing: border-box;
	padding: 0 14px;
	border-radius: 8px;
	color: var(--fbh-text);
	font-weight: 500;
}
.fbh-mainnav a:hover { color: var(--fbh-accent-hover); }

.fbh-mainnav a.fbh-mainnav-active {
	background: var(--fbh-raised);
	color: var(--fbh-accent);
	font-weight: 600;
}

.fbh-sitebar-actions { display: flex; align-items: center; gap: 10px; }

.fbh-link {
	color: var(--fbh-text);
	padding: 10px 14px;
}

.fbh-cta {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	box-sizing: border-box;
	padding: 0 18px;
	border-radius: 8px;
	background: var(--fbh-accent);
	color: var(--fbh-on-accent);
	font-weight: 600;
}
.fbh-cta:hover { background: var(--fbh-accent-hover); color: var(--fbh-on-accent); }

/* ---------- Website footer (fbh_site_footer.html) ---------- */
.fbh-sitefooter {
	border-top: 1px solid var(--fbh-line);
	margin-top: 48px;
	font-size: 14px;
	color: var(--fbh-muted);
}

.fbh-sitefooter-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 40px 32px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 20px;
	box-sizing: border-box;
}

.fbh-sitefooter-brand {
	font-family: "Bricolage Grotesque", Inter, sans-serif;
	font-weight: 700;
	color: var(--fbh-text);
}

.fbh-sitefooter-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}
.fbh-sitefooter-links a { color: var(--fbh-text-soft); }
.fbh-sitefooter-links a:hover { color: var(--fbh-accent); }


.fbh-sitebar { font-family: Inter, "Segoe UI", Roboto, system-ui, sans-serif; line-height: 1.5; }
.fbh-sitebar *, .fbh-sitefooter * { box-sizing: border-box; }
.fbh-sitefooter { font-family: Inter, "Segoe UI", Roboto, system-ui, sans-serif; line-height: 1.5; }
.fbh-sitebar a, .fbh-sitefooter a { text-decoration: none; }
.fbh-sitebar svg { flex: none; }

.fbh-sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.fbh-sitebar :focus-visible, .fbh-sitefooter :focus-visible { outline: 2px solid var(--fbh-accent); outline-offset: 2px; }

/* ---------- Night mode toggle ---------- */
.fbh-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	border: 1px solid var(--fbh-line-2);
	background: var(--fbh-surface);
	color: var(--fbh-text);
	cursor: pointer;
	padding: 0;
}
.fbh-theme-toggle:hover { background: var(--fbh-raised); color: var(--fbh-accent); }
.fbh-theme-toggle .fbh-icon-sun { display: none; }
html.fbh-night .fbh-theme-toggle .fbh-icon-sun { display: block; }
html.fbh-night .fbh-theme-toggle .fbh-icon-moon { display: none; }
.fbh-sitefooter-domain { margin-left: 8px; font-family: Inter, system-ui, sans-serif; font-weight: 400; color: var(--fbh-muted); }

/* ---------- Phones ---------- */
@media (max-width: 700px) {
	.fbh-sitebar-inner { padding: 14px 16px; gap: 8px 16px; }
	.fbh-mainnav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
	.fbh-mainnav a { white-space: nowrap; }
	.fbh-sitebar-actions { margin-left: auto; }
	.fbh-sitefooter-inner { padding: 32px 16px; }
}
