/*
 * At Their Age — Header CTA cleanup v1.10.4
 *
 * Corrects the production header regression where the Newsletter menu item
 * stretched to the full row height and the legacy Blocksy "Find Guidance"
 * button remained beside it. The editorial header should have one compact CTA.
 */

/* The release-owned Newsletter item is the single desktop header CTA. */
#header .menu > li.ata-nav-cta,
.ct-header .menu > li.ata-nav-cta {
	display: flex !important;
	align-items: center !important;
	align-self: stretch;
}

#header .menu > li.ata-nav-cta > a,
.ct-header .menu > li.ata-nav-cta > a {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	min-width: 0 !important;
	height: 42px !important;
	min-height: 42px !important;
	max-height: 42px !important;
	margin: 0 0 0 10px !important;
	padding: 0 17px !important;
	border: 1px solid var(--ata-ink, #1F2A33) !important;
	border-radius: 8px !important;
	background: var(--ata-ink, #1F2A33) !important;
	color: #FFFFFF !important;
	font-family: var(--ata-font-body, Inter, system-ui, sans-serif);
	font-size: 14px;
	font-weight: 600;
	line-height: 1 !important;
	letter-spacing: 0;
	white-space: nowrap;
}

#header .menu > li.ata-nav-cta > a:hover,
#header .menu > li.ata-nav-cta > a:focus-visible,
.ct-header .menu > li.ata-nav-cta > a:hover,
.ct-header .menu > li.ata-nav-cta > a:focus-visible {
	border-color: #33424C !important;
	background: #33424C !important;
	color: #FFFFFF !important;
}

/*
 * Production still had the old Blocksy custom CTA ("Find Guidance") in the
 * header builder. The deploy sync removes it structurally. Keep this as a
 * fail-safe so a stale/customizer-cached button cannot reappear visually.
 */
#header [data-id="button"],
#header [data-id^="button_"],
#header .ct-header-cta,
.ct-header [data-id="button"],
.ct-header [data-id^="button_"],
.ct-header .ct-header-cta {
	display: none !important;
}

/* Keep the remaining search icon quiet and aligned with the compact CTA. */
#header [data-id="search"],
#header .ct-search-initiator,
.ct-header [data-id="search"],
.ct-header .ct-search-initiator {
	flex: 0 0 auto;
}

@media (min-width: 1000px) {
	#header .menu > li.ata-nav-cta,
	.ct-header .menu > li.ata-nav-cta {
		height: 78px;
	}
}

/* Off-canvas navigation should stay editorial, not render a desktop-style CTA. */
@media (max-width: 999px) {
	#offcanvas .menu-item.ata-nav-cta > a,
	[data-behaviour*="side"] .menu-item.ata-nav-cta > a {
		display: inline-flex;
		width: auto;
		min-height: 44px;
		margin-top: 8px;
		padding: 0 16px;
		border-radius: 8px;
		background: var(--ata-ink, #1F2A33);
		color: #FFFFFF !important;
		font-weight: 600;
	}
}
