/**
 * Legacy header — Sign In dropdown + Sign Up.
 */

#topnav .credzu-header-auth,
#submenu-header .credzu-header-auth {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	line-height: normal;
}

#topnav .buy-button > li:has(.credzu-header-auth),
#submenu-header .buy-button > li:has(.credzu-header-auth) {
	line-height: normal;
	vertical-align: middle;
}

.credzu-header-auth-signin {
	position: relative;
}

.credzu-header-auth-signin-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: #495057;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: color 0.15s ease;
}

.credzu-header-auth-signin-trigger:hover,
.credzu-header-auth-signin-trigger:focus {
	color: #2765e6;
	outline: none;
}

.credzu-header-auth-signin-trigger:focus-visible {
	box-shadow: 0 0 0 2px rgba(61, 128, 254, 0.45);
	border-radius: 4px;
}

.credzu-header-auth-chevron {
	font-size: 0.65rem;
	opacity: 0.55;
	transition: transform 0.2s ease;
}

.credzu-header-auth-signin.is-open .credzu-header-auth-signin-trigger .credzu-header-auth-chevron {
	transform: rotate(180deg);
}

.credzu-header-auth-panel {
	position: absolute;
	top: calc(100% + 0.75rem);
	right: 0;
	width: 20rem;
	max-width: calc(100vw - 2rem);
	padding: 1.25rem 1.25rem 1.5rem;
	background: #fff;
	border: 1px solid #f1f3f5;
	border-radius: 1rem;
	box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.12);
	z-index: 1100;
	text-align: left;
}

.credzu-header-auth-panel[hidden] {
	display: none !important;
}

.credzu-header-auth-signin.is-open .credzu-header-auth-panel:not([hidden]) {
	display: block;
}

.credzu-header-auth-title {
	margin: 0 0 1rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: #212429;
	line-height: 1.3;
}

.credzu-header-auth-form {
	margin: 0;
}

.credzu-header-auth-form .login-status:empty {
	display: none;
	margin: 0;
}

.credzu-header-auth-form .login-status:not(:empty) {
	margin-bottom: 0.75rem;
}

.credzu-header-auth-field {
	margin-bottom: 0.65rem;
}

.credzu-header-auth-field input {
	display: block;
	width: 100%;
	padding: 0.65rem 0.85rem;
	font-size: 0.875rem;
	line-height: 1.4;
	color: #212429;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 0.65rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.credzu-header-auth-field input::placeholder {
	color: #868e96;
}

.credzu-header-auth-field input:focus {
	outline: none;
	border-color: #8cb9ff;
	box-shadow: 0 0 0 3px rgba(61, 128, 254, 0.15);
}

.credzu-header-auth-forgot {
	margin: 0 0 1rem;
	font-size: 0.75rem;
	text-align: left;
}

.credzu-header-auth-forgot a {
	color: #868e96;
	text-decoration: none;
}

.credzu-header-auth-forgot a:hover {
	color: #2765e6;
	text-decoration: underline;
}

.credzu-header-auth-submit {
	display: block;
	width: 100%;
	padding: 0.65rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 9999px;
	text-transform: none;
	border: none;
}

.credzu-header-auth-signup {
	position: relative;
}

.credzu-header-auth-signup-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 1.35rem;
	font-size: 0.875rem;
	font-weight: 500;
	border-radius: 9999px;
	text-transform: none;
	border: none;
	box-shadow: 0 1px 3px rgba(61, 128, 254, 0.25);
}

.credzu-header-auth-signup-trigger .credzu-header-auth-chevron {
	color: rgba(255, 255, 255, 0.85);
	opacity: 1;
}

.credzu-header-auth-signup.is-open .credzu-header-auth-signup-trigger .credzu-header-auth-chevron {
	transform: rotate(180deg);
}

.credzu-header-auth-signup-panel {
	position: absolute;
	top: calc(100% + 0.75rem);
	right: 0;
	width: 22.5rem;
	max-width: calc(100vw - 2rem);
	padding: 1.25rem 1.25rem 1rem;
	background: #fff;
	border: 1px solid #f1f3f5;
	border-radius: 1rem;
	box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.12);
	z-index: 1100;
	text-align: left;
}

.credzu-header-auth-signup-panel[hidden] {
	display: none !important;
}

.credzu-header-auth-signup.is-open .credzu-header-auth-signup-panel:not([hidden]) {
	display: block;
}

.credzu-header-auth-signup-eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #868e96;
}

.credzu-header-auth-signup-lead {
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #495057;
	line-height: 1.4;
}

.credzu-header-auth-signup-options {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.credzu-header-auth-signup-option {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	padding: 0.65rem 0.5rem;
	border-radius: 0.65rem;
	text-decoration: none !important;
	color: inherit;
	transition: background-color 0.15s ease;
}

.credzu-header-auth-signup-option:hover,
.credzu-header-auth-signup-option:focus {
	background: #f8f9fa;
	text-decoration: none !important;
	color: inherit;
}

.credzu-header-auth-signup-icon {
	flex-shrink: 0;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.95rem;
}

.credzu-header-auth-signup-option--consumer .credzu-header-auth-signup-icon {
	background: #e7f0ff;
	color: #2765e6;
}

.credzu-header-auth-signup-option--provider .credzu-header-auth-signup-icon {
	background: #e6f7ef;
	color: #12b76a;
}

.credzu-header-auth-signup-option--partner .credzu-header-auth-signup-icon {
	background: #fff0e6;
	color: #f58e2a;
}

.credzu-header-auth-signup-copy {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.credzu-header-auth-signup-option-title {
	font-size: 0.875rem;
	font-weight: 700;
	color: #212429;
	line-height: 1.3;
}

.credzu-header-auth-signup-option-desc {
	font-size: 0.75rem;
	font-weight: 400;
	color: #868e96;
	line-height: 1.45;
}

/* Mobile nav variant */
#navigation .credzu-header-auth--mobile,
#topnav #navigation .credzu-header-auth--mobile {
	flex-direction: column;
	align-items: stretch;
	gap: 0.75rem;
	width: 100%;
	padding: 0.5rem 0;
}

.credzu-header-auth--mobile .credzu-header-auth-signin-trigger {
	width: 100%;
	justify-content: space-between;
	padding: 0.65rem 0.85rem;
	background: #f8f9fa;
	border-radius: 0.5rem;
}

.credzu-header-auth--mobile .credzu-header-auth-panel {
	position: static;
	width: 100%;
	max-width: none;
	margin-top: 0.5rem;
	box-shadow: none;
	border: 1px solid #e9ecef;
}

.credzu-header-auth--mobile .credzu-header-auth-signup-trigger {
	justify-content: center;
	width: 100%;
}

.credzu-header-auth--mobile .credzu-header-auth-signup-panel {
	position: static;
	width: 100%;
	max-width: none;
	margin-top: 0.5rem;
	box-shadow: none;
	border: 1px solid #e9ecef;
}

/* Mobile: keep auth + nav menu scroll inside the drawer, not the page behind */
@media (max-width: 991px) {
	#topnav #navigation,
	#submenu-header #navigation {
		max-height: calc(100dvh - 74px) !important;
		overflow-y: auto !important;
		overflow-x: hidden;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	html.credzu-mobile-nav-open,
	html.credzu-mobile-nav-open body {
		overflow: hidden !important;
		height: 100%;
	}

	html.credzu-mobile-nav-open #topnav #navigation,
	html.credzu-mobile-nav-open #submenu-header #navigation {
		overscroll-behavior: contain;
	}

	.credzu-header-auth--mobile {
		min-width: 0;
		padding-left: 0.75rem;
		padding-right: 0.75rem;
		box-sizing: border-box;
	}

	.credzu-header-auth--mobile .credzu-header-auth-signin,
	.credzu-header-auth--mobile .credzu-header-auth-signup {
		min-width: 0;
	}

	.credzu-header-auth--mobile .credzu-header-auth-panel,
	.credzu-header-auth--mobile .credzu-header-auth-signup-panel {
		max-height: min(52dvh, 22rem);
		overflow-y: auto;
		overflow-x: hidden;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}
}
