/*<meta />*/

@import url('../../css-variables.css');

@import url('../selector/selector.css');

/* Style for the main header div */

.custom-header
{
	display: grid;
	grid-template-areas: "logo selector searchbar toggle hamburger";
	grid-template-columns: auto auto 1fr 48px 48px;
	grid-template-rows: auto;
	row-gap: 0px;
	background-color: var(--background-nav1);
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	margin: 0;
	padding: 0 24px;
	box-sizing: border-box;
	height: 72px;
	align-items: center;
	z-index: 10;
	font-family: var(--font-html);
	border-bottom: 1px solid var(--border-neutral-weak, #E7E9ED);
}

/* Style for the div that holds the logo */

.company-logo
{
	grid-area: logo;
	margin-right: 24px;
	width: fit-content;
}

.company-logo p
{
	font-weight: 600;
	font-size: 28px;
	line-height: 36px;
}

.selector
{
	grid-area: selector;
	width: fit-content;
	min-width: 150px;
	margin-left: 24px;
}

.back-button
{
	grid-area: back;
	margin-left: auto;
	padding-right: 8px;
}

/* Height settings for the rest of the page; if your header height increases, increase the value below */

div.main-section
{
	margin-top: 72px;
}

button.toggle
{
	grid-area: toggle;
}

.header-links
{
	grid-area: links;
	display: flex;
	justify-content: end;
	width: 100%;
}

.left-links
{
	display: flex;
	gap: 32px;
}

.right-links
{
	display: flex;
	gap: 32px;
	margin-left: auto;
}

@media (max-width: 960px)
{
	.left-links
	{
		padding-left: 24px;
	}

	.company-logo span.mc-variable,
	.company-logo p
	{
		font-size: 18px;
		line-height: 20px;
	}

	.company-logo img
	{
		height: 20px !important;
	}
}

/*Lays out search bar*/

.searchbar
{
	grid-area: searchbar;
	justify-self: end;
	width: 400px;
	margin-right: 16px;
}

/*links*/

.left-links p,
.right-links p,
.left-links p a,
.right-links a,
.back-button a
{
	color: var(--text-neutral-default) !important;
	font-family: var(--font-family-brand, "Euclid Square");
	font-size: 14px;
	font-style: normal !important;
	font-weight: 500 !important;
	line-height: 16px;
	text-decoration: none !important;
}

/*Lays out hamburger icon*/

.hamburger
{
	display: block;
	z-index: 99;
	grid-area: hamburger;
	min-width: 45px;
	top: 7px;
	position: absolute;
}

.hamburger,
button.menu-icon
{
	color: var(--text-neutral-strong);
}

/* Style for the hamburger icon image */

.hamburger img
{
	min-width: 30px;
}

/* Style for the custom links */

.top-nav-links
{
	grid-area: links;
	display: flex;
	justify-content: flex-end;
}

/*Hide hamburger on laptop/PC medium*/

button.menu-icon
{
	display: none;
}

/*Styles for the site title*/

.company-logo span.mc-variable
{
	color: var(--text-neutral-inverted);
	font-family: var(--font-family-brand, "Euclid Square");
	font-size: 28px;
	font-style: normal;
	font-weight: 600;
	line-height: 36px;
	/* 128.571% */
}

.site-title > a
{
	color: var(--white);
}

.site-title > a:hover
{
	color: var(--white);
}

/*styles for the search bar component*/
/*Prevents the border around the svg magnifying glass from shifting*/

.search-bar._Skins_HomeSearchBar.mc-component .search-submit
{
	border: none;
}

.search-bar._Skins_HomeSearchBar.mc-component,
#st-search-bar
{
	width: 100%;
}

.icon-search
{
	position: absolute;
	top: 60%;
	-webkit-transform: translateY(-50%);
	-ms-transform: translateY(-50%);
	transform: translateY(-50%);
	left: 12px;
	opacity: 1;
	z-index: 2;
	color: var(--icon-brand-default);
}

/*Styles for the on-hover menu*/
/* Applies to all unordered lists inside the uppernav element */

nav.uppernav ul
{
	list-style: none;
	font-weight: 500;
	margin: 0;
	padding-left: 0;
	font-family: var(--font-html);
}

/* Applies to all list items inside the uppernav element */

nav.uppernav li
{
	color: var(--white);
	display: block;
	float: left;
	padding: 1rem;
	position: relative;
	text-decoration: none;
	transition-duration: 0.5s;
	border-radius: 5px;
}

/* Applies to all links inside the list items */

nav.uppernav li a
{
	color: var(--white);
}

/* Applies when the mouse hovers over or focuses on a list item */

nav.uppernav li:hover,
nav.uppernav li:focus-within
{
	font-weight: 500;
	background: var(--menu-hover);
	cursor: pointer;
}

/* Applies to links inside a list item that has focus */

nav.uppernav li:focus-within a
{
	outline: none;
}

/* Applies to all unordered lists inside a list item */

nav.uppernav ul li ul
{
	visibility: hidden;
	opacity: 0;
	min-width: 5rem;
	position: absolute;
	transition: all 0.5s ease;
	margin-top: 1rem;
	left: 0;
	display: none;
	background: var(--menu-dropdown);
	border-radius: 5px;
}

/* Applies when the mouse hovers over or focuses on a list item that contains an unordered list */

nav.uppernav ul li:hover > ul,
nav.uppernav ul li:focus-within > ul,
nav.uppernav ul li ul:hover,
nav.uppernav ul li ul:focus
{
	visibility: visible;
	opacity: 1;
	display: block;
}

/* Applies to all list items inside an unordered list */

nav.uppernav ul li ul li
{
	clear: both;
	width: 100%;
}

/* Applies to all unordered lists with the class dropdown */

ul.dropdown
{
	z-index: 10;
}

/*end of menu*/
/*Layout adaptations for tablet and mobile*/

@media only screen and (max-width: 1279px)
{
	button.menu-icon
	{
		display: block;
		background: none;
		color: inherit;
		border: none;
		font: inherit;
		cursor: pointer;
		outline: inherit;
		padding: 5px 0px 5px 16px;
		margin-bottom: 22px;
		position: absolute;
	}

	.custom-header
	{
		position: sticky;
		margin-bottom: 10px;
	}

	div.main-section
	{
		margin-top: 0;
	}

	div.main-section > .outer-row
	{
		padding-left: 0;
		padding-right: 0;
	}

	.body-container
	{
		padding-top: 0;
	}

	div.MCBreadcrumbsBox_p\00002Ebreadcrumb_0
	{
		padding-left: 15px;
		padding-right: 15px;
	}

	#mc-main-content
	{
		padding-left: 15px;
		padding-right: 15px;
	}

	/*Change this value if your site title is particularly long/short and page looks off when scaled down*/

	.header-container-2nd
	{
		display: grid;
		grid-template-columns: 1fr 1fr;
		/*divides the available space 50:50*/
	}

	div.site-title
	{
		position: relative !important;
	}
}

/*Change this break point if your site title is particularly long/short*/

@media (max-width: 850px)
{
	.header-container-2nd
	{
		display: grid;
		grid-template-rows: 1fr 1fr;
		/*divides the available space 50:50*/
		grid-template-columns: 100%;
	}
}

/*Print css for the custom header portals*/

@media print
{
	.custom-header,
	.custom-header-mobile
	{
		display: block;
		position: absolute !important;
		top: -320px;
	}

	body nav.title-bar.tab-bar
	{
		display: none !important;
	}

	body .topicContent,
	body div#mc-main-content
	{
		margin-top: -130px;
	}

	.search,
	.search-bar,
	#st-search-bar
	{
		display: none;
	}

	div.main-section
	{
		margin-top: 200px;
	}

	div.custom-header
	{
		height: 12em;
	}
}

@media (max-width: 1279px)
{
	.custom-header
	{
		grid-template-areas: "logo back searchbar toggle hamburger" "selector . . . .";
		grid-template-columns: auto auto minmax(200px, 300px) 48px 48px;
		grid-template-rows: auto auto;
		height: auto;
		padding: 14px 16px;
		row-gap: 14px;
	}

	.searchbar
	{
		min-width: 0;
		width: 100%;
		justify-self: end;
		/* Align to right side */
		margin-right: 16px;
		/* Add some space before toggle button */
	}
}

/* Styles for larger screens (1280px and above) */

@media (min-width: 1280px)
{
	.header-links-toggle.dropdown-toggle
	{
		display: none;
	}

	.header-links-menu.dropdown-menu
	{
		display: none;
	}

	.left-links,
	.right-links
	{
		display: flex;
	}
}

@media (max-width: 640px)
{
	.custom-header
	{
		grid-template-areas: "logo back toggle hamburger" "searchbar searchbar searchbar searchbar" "selector . . .";
		grid-template-columns: auto auto 38px 45px;
		grid-template-rows: auto auto auto;
		height: auto;
		padding: 14px 16px;
		row-gap: 14px;
	}

	.searchbar
	{
		grid-column: 1 / -1;
		width: 100%;
		min-width: 0;
		margin: 0;
	}

	.selector
	{
		margin-left: 0;
		width: fit-content;
	}

	.hamburger
	{
		justify-self: end;
	}
}

/* Only add specific overrides for smaller screens if needed */

@media (max-width: 400px)
{
	.custom-header
	{
		padding: 14px 8px;
		/* Smaller padding for very small screens */
	}
}

form.search
{
	margin-right: 0;
	margin-left: 0;
}

#theme-toggle
{
	border: none;
	background: none;
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s;
	margin-left: 20px;
}

#theme-toggle:hover
{
	background-color: var(--icon-brand-default);
}

#theme-toggle img
{
	opacity: 1;
	/* Ensure no transparency */
}

p.light-icon,
p.dark-icon
{
	height: 20px;
}

input.search-field.needs-pie
{
	color: var(--text-neutral-placeholder);
}

/* Transform arrow from #565E6E to #F9FAFB in dark theme */

[data-theme="dark"] .dropdown-arrow
{
	filter: brightness(0) saturate(100%) invert(99%) sepia(1%) saturate(126%) hue-rotate(191deg) brightness(103%) contrast(96%);
}

@media (max-width: 1278px)
{
	.selector
	{
		margin-left: 0;
	}
}

/*Save header space on mobile*/

@media (max-width: 768px)
{
	.company-logo
	{
		margin-right: 12px;
	}

	#theme-toggle
	{
		margin-left: 8px;
	}

	button.menu-icon
	{
		padding: 5px 0px 5px 10px;
	}
}

@media (max-width: 425px)
{
	body p.booktitle
	{
		font-size: 1.7em;
	}

	body .company-logo span.mc-variable
	{
		font-size: 1.2em;
	}
}

/*Template Description search bar tweaks*/

.tempdesc input.search-field.needs-pie
{
	padding-left: 40px;
	color: var(--text-neutral-default);
}

.tempdesc .search-bar .search-submit-wrapper
{
	top: 0;
	left: 0;
}

