/* Minimal header/footer used on auth-style pages (login, registration)
   via the "page-auth" custom template. Enqueued only when that template
   is active, see functions.php. */

/* Hard stop for horizontal scroll on this template. This stylesheet only
   loads on auth pages (see functions.php), so it's safe to pin html/body
   unconditionally here rather than relying on a scoped selector. */
html,
body {
	overflow-x: hidden;
	max-width: 100%;
}


.mt-auth-header {
	border-bottom: 1px solid var(--wp--preset--color--neutral-20, #e7eaea);
	position: relative;
	overflow: visible;
	z-index: 30;
}
.mt-auth-header-inner {
	padding-top: 18px;
	padding-bottom: 18px;
	align-items: center;
	position: relative;
	justify-content: flex-end;
}

.mt-auth-logo {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	text-decoration: none !important;
	z-index: 5;
}
.mt-auth-logo__badge {
	position: relative;
	display: block;
	width: 150px;
	height: 156px;
	flex: none;
	overflow: hidden;
	filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.22));
}
.mt-auth-logo__shape {
	display: block;
	width: 100%;
	height: 100%;
	fill: var(--wp--preset--color--accent);
}
.mt-auth-logo__img {
	position: absolute;
	top: 2%;
	left: 50%;
	width: 65%;
	height: auto;
	transform: translateX(-50%);
	display: block;
}
.mt-auth-header-mainrow {
	column-gap: 26px;
	row-gap: 12px;
}
.mt-auth-header-mainrow .wp-block-navigation {
	color: var(--wp--preset--color--neutral);
}
.mt-auth-header-mainrow .wp-block-navigation a {
	color: inherit;
}

.mt-auth-login-link {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--wp--preset--color--neutral);
	text-decoration: none;
	position: relative;
	padding-bottom: 4px;
}
.mt-auth-login-link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background-color: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}
.mt-auth-login-link:hover::after {
	transform: scaleX(1);
}

/* Highlight "Login" as the active link when we're actually on the login page. */
body.page-id-139 .mt-auth-login-link {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}
body.page-id-139 .mt-auth-login-link::after {
	transform: scaleX(1);
}

/* The header carries both call-to-action pairs; which one shows depends
   on the page. Default (login and everywhere else): "Login" text link +
   solid "Register" button. */
/* Scoped to .mt-auth-header so this beats core's .wp-block-buttons
   {display:flex}, which otherwise wins on equal specificity and leaves
   the "Log In" button visible on the login page itself. */
.mt-auth-header .mt-auth-have-account,
.mt-auth-header .mt-auth-cta--login {
	display: none;
}
.mt-auth-have-account {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.9375rem;
	color: var(--wp--preset--color--neutral);
	white-space: nowrap;
}

/* On the registration pages it flips: "Already have an account?" +
   outlined "Log In" button, and Register becomes the active nav item. */
body.page-id-8 .mt-auth-login-link,
body.page-id-9 .mt-auth-login-link,
body.page-id-8 .mt-auth-cta--register,
body.page-id-9 .mt-auth-cta--register {
	display: none;
}
body.page-id-8 .mt-auth-have-account,
body.page-id-9 .mt-auth-have-account,
body.page-id-8 .mt-auth-cta--login,
body.page-id-9 .mt-auth-cta--login {
	display: flex;
}
.mt-auth-cta--login .wp-block-button__link {
	color: var(--wp--preset--color--contrast) !important;
	border-color: color-mix(in srgb, var(--wp--preset--color--contrast) 22%, transparent);
	background: transparent;
}
.mt-auth-cta--login .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary) !important;
}

/* The site-wide mobile-menu CSS forces every opened nav overlay to the
   dark teal brand color (see custom.css). Override it back to white for
   this lighter header, since its icon/text are dark, not white. */
.mt-auth-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base) !important;
}
.mt-auth-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	border-bottom-color: color-mix(in srgb, var(--wp--preset--color--contrast) 10%, transparent);
	width: 100%;
	justify-content: center;
	text-align: center;
}
.mt-auth-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	text-align: center;
}
/* The nav block carries an "items-justified-right" class for the desktop
   row; inside the open overlay that pushes the links off to one side, so
   re-center the overlay's own containers. */
.mt-auth-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.mt-auth-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	width: 100%;
	align-items: center;
	justify-content: flex-start !important;
}
.mt-auth-header .wp-block-navigation__responsive-container-close,
.mt-auth-header .wp-block-navigation__responsive-container-open {
	color: var(--wp--preset--color--contrast);
}

.mt-auth-footer {
	margin-top: 0;
}
.mt-auth-footer-inner {
	align-items: center;
	justify-content: center;
	padding-top: 20px;
	padding-bottom: 20px;
	column-gap: 20px;
	row-gap: 10px;
}
.mt-auth-footer-inner > .wp-block-paragraph {
	margin: 0;
	opacity: 0.85;
}
.mt-auth-footer-inner .wp-block-navigation {
	color: var(--wp--preset--color--base);
	opacity: 0.85;
}

/* Tablet: badge is scaled to the same proportions but takes up less of
   the header row so it doesn't crowd the nav links next to it. */
@media (max-width: 800px) {
	.mt-auth-logo__badge {
		width: 110px;
		height: 114px;
	}
	.mt-auth-header-mainrow {
		column-gap: 18px;
	}
}

/* Phone: single row — logo badge stays pinned flush to the top-left and
   hangs below the header edge, hamburger/Login/Register sit on the right
   of that same row. */
@media (max-width: 600px) {
	.mt-auth-logo__badge {
		width: 88px;
		height: 92px;
	}
	.mt-auth-header-inner {
		flex-wrap: nowrap;
		justify-content: flex-end;
		align-items: center;
		padding-top: 14px;
		padding-bottom: 14px;
		gap: 12px;
	}
	.mt-auth-header-mainrow {
		flex-wrap: nowrap;
		justify-content: flex-end !important;
		column-gap: 12px;
		row-gap: 0;
	}
	.mt-auth-header-mainrow .wp-block-button__link {
		padding: 8px 16px !important;
		font-size: 0.875rem;
	}
	.mt-auth-login-link {
		font-size: 0.875rem;
	}
	.mt-auth-footer-inner {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		padding-top: 18px;
		padding-bottom: 18px;
	}
	.mt-auth-footer-inner .wp-block-navigation {
		justify-content: center !important;
	}
}

@media (max-width: 400px) {
	.mt-auth-logo__badge {
		width: 72px;
		height: 75px;
	}
	.mt-auth-header-mainrow {
		column-gap: 8px;
	}
	.mt-auth-header-mainrow .wp-block-button__link {
		padding: 8px 13px !important;
		font-size: 0.82rem;
	}
	.mt-auth-login-link {
		font-size: 0.82rem;
	}
}
