/*
Theme Name: Bright Balance
Theme URI: https://thefreewebsiteguys.com
Author: The Free Website Guys
Author URI: https://thefreewebsiteguys.com
Description: A custom WordPress theme for Bright Balance, handcrafted by The Free Website Guys. Warm ivory tones, soft lavender accents, and dependable bookkeeping branding — fully editable through the WordPress Customizer.
Version: 1.0.6
License: GNU General Public License v2 or later
Text Domain: tmt
*/

*, *::before, *::after { box-sizing: border-box; }
html,
body {
	margin: 0;
	padding: 0;
	overflow-x: clip;
	max-width: 100%;
}

#tmt-app {
	overflow-x: clip;
	max-width: 100%;
}

:root {
	--tmt-header-height: 72px;
}

/* Fixed site header — offset below WordPress admin bar when logged in */
#tmt-site-header {
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
	max-width: 100%;
	top: 0;
	z-index: 50;
	overflow-x: clip;
}

#tmt-site-header .tmt-site-header__container {
	width: 100%;
	max-width: 1320px;
	margin-inline: auto;
	padding-inline: max(1.25rem, env(safe-area-inset-left, 0px)) max(1.25rem, env(safe-area-inset-right, 0px));
}

@media (min-width: 1024px) {
	#tmt-site-header .tmt-site-header__container {
		padding-inline: max(2rem, env(safe-area-inset-left, 0px)) max(2rem, env(safe-area-inset-right, 0px));
	}
}

#tmt-site-header .tmt-site-nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 0.75rem;
	width: 100%;
	max-width: 100%;
	min-height: var(--tmt-header-height);
	padding-block: 0.75rem;
}

#tmt-site-header .tmt-site-logo-link {
	min-width: 0;
	overflow: hidden;
}

#tmt-site-header .tmt-site-logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: min(var(--tmt-logo-height, 40px), 40px);
	object-fit: contain;
	object-position: left center;
}

@media (min-width: 640px) {
	#tmt-site-header .tmt-site-logo {
		height: min(var(--tmt-logo-height, 48px), 48px);
	}
}

@media (min-width: 1280px) {
	#tmt-site-header .tmt-site-nav {
		display: flex;
		align-items: center;
		justify-content: space-between;
		column-gap: 1rem;
	}

	#tmt-site-header .tmt-site-logo {
		height: var(--tmt-logo-height, 48px);
		max-width: none;
	}

	#tmt-site-header .tmt-site-nav-desktop {
		margin-left: auto;
	}
}

#tmt-site-header .tmt-menu-toggle {
	justify-self: end;
}

#tmt-site-header .tmt-mobile-nav-list {
	width: 100%;
	max-width: 100%;
}

body.admin-bar #tmt-site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar #tmt-site-header {
		top: var(--wp-admin--admin-bar--height, 46px);
	}
}

/* Keep admin bar fixed on small screens so the header does not float with a gap */
@media screen and (max-width: 600px) {
	html #wpadminbar {
		position: fixed !important;
	}
}

html {
	scroll-padding-top: calc(var(--tmt-header-height) + var(--wp-admin--admin-bar--height, 0px));
}

/* Mobile navigation drawer */
.tmt-mobile-nav-panel {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition:
		grid-template-rows 380ms cubic-bezier(0.4, 0, 0.2, 1),
		opacity 280ms ease;
}

.tmt-mobile-nav-panel.is-open {
	grid-template-rows: 1fr;
	opacity: 1;
}

.tmt-mobile-nav-panel__inner {
	overflow: hidden;
}

.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link {
	animation: tmt-nav-item-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(1) { animation-delay: 40ms; }
.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(2) { animation-delay: 80ms; }
.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(3) { animation-delay: 120ms; }
.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(4) { animation-delay: 160ms; }
.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(5) { animation-delay: 200ms; }
.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(6) { animation-delay: 240ms; }
.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(7) { animation-delay: 280ms; }
.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(8) { animation-delay: 320ms; }
.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(9) { animation-delay: 360ms; }
.tmt-mobile-nav-panel.is-open .tmt-mobile-nav-link:nth-child(10) { animation-delay: 400ms; }

@keyframes tmt-nav-item-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#tmt-site-header .tmt-menu-toggle svg {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
	color: var(--plum, #5C5470);
	stroke: currentColor;
}

#tmt-site-header .tmt-menu-toggle {
	color: var(--plum, #5C5470);
}

#tmt-app a[href],
#tmt-app button:not(:disabled),
#tmt-app [role="button"]:not([aria-disabled="true"]),
#tmt-app label[for],
#tmt-app summary {
	cursor: pointer;
}

#tmt-app button:disabled,
#tmt-app [aria-disabled="true"] {
	cursor: not-allowed;
}
