/* ===== A-TEK GDIT-style search ===== */

/* Brand palette — pulled from A-TEK header (deep navy + accent orange) */
:root {
	--atek-search-accent: #8BC540;
	--atek-search-ink: #0a2240;
	--atek-search-ink-soft: #444b5a;
	--atek-search-border: #d9dde3;
	--atek-search-bg: #E8E8E8;
	--atek-search-bg-input: #f4f5f7;
}

html.atek-search-open,
html.atek-search-open body {
	overflow: hidden;
}

/* Overlay container — opens below the site header so the header stays visible */
.atek-search-overlay {
	position: fixed;
	top: var( --atek-header-offset, 0px );
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: none;
	font-family: inherit;
}
.atek-search-overlay.is-open { display: block; }

.atek-search-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 10, 34, 64, 0.35 );
}

.atek-search-overlay__panel {
	position: relative;
	background: var( --atek-search-bg );
	max-height: 89vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba( 0, 0, 0, 0.18 );
	padding: 48px 5vw 64px;
	font-family: 'Titillium Web', system-ui, sans-serif;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.atek-search-overlay__panel::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

/* Search bar */
.atek-search-bar {
	display: flex;
	align-items: stretch;
	max-width: 1240px;
	margin: 0 auto;
	border: 1px solid var( --atek-search-border );
	background: var( --atek-search-bg-input );
}
.atek-search-bar__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	color: var( --atek-search-ink-soft );
	flex-shrink: 0;
}
.atek-search-input {
	flex: 1;
	border: 0;
	background: transparent;
	font-size: 18px;
	padding: 18px 12px;
	color: var( --atek-search-ink );
	outline: none;
	min-width: 0;
}
.atek-search-input::placeholder { color: #8a92a3; }
.atek-search-clear {
	background: transparent;
	border: 0;
	font-size: 22px;
	color: var( --atek-search-ink-soft );
	cursor: pointer;
	width: 48px;
	flex-shrink: 0;
}
.atek-search-submit {
	background: var( --atek-search-ink );
	color: #fff;
	border: 0;
	padding: 0 32px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	flex-shrink: 0;
}
.atek-search-submit:hover { background: #8BC540; }

/* Status / count line — visually identical to SSR's <h1 class="atek-search-page__count"> */
.atek-search-status {
	max-width: 1240px;
	margin: 36px auto 24px;
	font-size: clamp( 28px, 3.5vw, 48px );
	line-height: 1.15;
	font-weight: 400;
	color: #0a2240;
	text-transform: capitalize;
	letter-spacing: -0.01em;
}
.atek-search-status strong {
	font-weight: 600;
}

/* Overlay tabs (rendered by JS — inline styles already enforce layout;
   these add hover affordance) */
.atek-search-overlay__tabs {
	max-width: 1240px;
	margin: 24px auto !important;
}
.atek-search-overlay__tab:hover {
	color: var( --atek-search-ink ) !important;
	-webkit-text-fill-color: var( --atek-search-ink ) !important;
}

/* Results region */
.atek-search-results {
	max-width: 1240px;
	margin: 24px auto 0;
}

/* Group + items */
.atek-search-group {
	padding: 28px 0;
	border-top: 1px solid var( --atek-search-border );
}
.atek-search-group:first-child { border-top: 0; }
.atek-search-group__label {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: none;
	color: var( --atek-search-ink );
	margin-bottom: 18px;
}

.atek-search-item {
	margin: 0 0 28px;
}
.atek-search-item:last-child { margin-bottom: 0; }
.atek-search-item__title {
	font-size: clamp( 22px, 2.2vw, 30px );
	line-height: 1.2;
	margin: 0 0 12px;
	font-weight: 700;
	color: var( --atek-search-ink );
}
.atek-search-item__title a {
	color: inherit;
	text-decoration: none;
}
.atek-search-item__title a:hover { text-decoration: underline; }
.atek-search-item__excerpt {
	margin: 0 0 14px;
	color: var( --atek-search-ink-soft );
	font-size: 16px;
	line-height: 1.55;
	max-width: 70ch;
}
.atek-search-item__more {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	color: var( --atek-search-ink );
	text-decoration: none;
	border-bottom: 2px solid var( --atek-search-accent );
	padding-bottom: 2px;
}

/* Term highlight — accent orange, like GDIT */
mark.atek-hl {
	background: transparent;
	color: var( --atek-search-accent );
	font-weight: inherit;
	padding: 0;
}

/* ===== Full-page results (search.php) ===== */
.atek-search-page {
	padding: 48px 5vw 80px;
}
.atek-search-page__inner {
	max-width: 1240px;
	margin: 0 auto;
	font-family: 'Titillium Web', system-ui, sans-serif;
}
.atek-search-page__form {
	display: flex;
	align-items: stretch;
	border: 1px solid var( --atek-search-border );
	background: var( --atek-search-bg-input );
	margin-bottom: 36px;
}
.atek-search-page__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	color: var( --atek-search-ink-soft );
	flex-shrink: 0;
}
.atek-search-page__input {
	flex: 1;
	border: 0;
	background: transparent;
	font-size: 18px;
	padding: 18px 12px;
	color: var( --atek-search-ink );
	outline: none;
	min-width: 0;
}
.atek-search-page__clear {
	background: transparent;
	border: 0;
	font-size: 22px;
	color: var( --atek-search-ink-soft );
	cursor: pointer;
	width: 48px;
	flex-shrink: 0;
}
.atek-search-page__submit {
	background: var( --atek-search-ink );
	color: #fff;
	border: 0;
	padding: 0 32px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	flex-shrink: 0;
}
.atek-search-page .atek-search-page__count,
h1.atek-search-page__count {
	font-size: clamp( 32px, 4vw, 56px ) !important;
	line-height: 1.15 !important;
	font-weight: 400 !important;
	margin: 36px 0 24px !important;
	color: var( --atek-search-ink ) !important;
	letter-spacing: -0.01em;
}
.atek-search-page .atek-search-page__tabs {
	display: flex !important;
	flex-wrap: wrap;
	gap: 32px !important;
	margin: 0 0 28px !important;
	padding: 0 !important;
	border-bottom: 1px solid var( --atek-search-border );
	list-style: none;
}
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab {
	display: inline-block !important;
	padding: 10px 0 !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	color: var( --atek-search-ink-soft ) !important;
	text-decoration: none !important;
	border-bottom: 3px solid transparent !important;
	margin-bottom: -1px !important;
	background: transparent !important;
}
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab.is-active {
	color: var( --atek-search-ink ) !important;
	border-bottom-color: var( --atek-search-accent ) !important;
}

/* Aggressive safety: re-assert tab visibility with high specificity + hex literals */
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab,
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab:link,
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab:visited,
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab:hover {
	color: #444b5a !important;
	opacity: 1 !important;
	visibility: visible !important;
	font-size: 18px !important;
	line-height: 1.4 !important;
	text-indent: 0 !important;
	text-shadow: none !important;
	-webkit-text-fill-color: #444b5a !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
}
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab.is-active,
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab.is-active:link,
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab.is-active:visited,
.atek-search-page .atek-search-page__tabs a.atek-search-page__tab.is-active:hover {
	color: #0a2240 !important;
	-webkit-text-fill-color: #0a2240 !important;
	border-bottom-color: #f08200 !important;
}

/* ===== Hide the inline Bricks header search input, keep only the icon ===== */
#brx-header .brxe-search .bricks-search-form input[type="search"],
#brx-header .brxe-search .bricks-search-form label {
	display: none !important;
}
#brx-header .brxe-search {
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	flex: 0 0 auto !important;
	margin-top: 4px !important;
	margin-right: 5px !important;
}
#brx-header .brxe-search .bricks-search-form {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	box-shadow: none !important;
	width: auto !important;
	display: inline-flex !important;
	align-items: center;
}
#brx-header .brxe-search .bricks-search-form button {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	color: var( --atek-search-ink ) !important;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	transition: color 0.18s ease, transform 0.18s ease;
}
#brx-header .brxe-search .bricks-search-form button:hover,
#brx-header .brxe-search .bricks-search-form button:focus-visible {
	color: var( --atek-search-accent ) !important;
	transform: scale( 1.15 );
}
#brx-header .brxe-search .bricks-search-form button i {
	transition: inherit;
}

/* ===== Lift the header (and its dropdown menus) above the overlay ===== */
html.atek-search-open #brx-header,
html.atek-search-open header.brx-header,
html.atek-search-open .brx-header {
	z-index: 100000 !important;
}

/* Hide the header magnifier while the overlay is open — the overlay has its
   own search bar, and on mobile the icon would otherwise sit on top of the
   panel. Re-appears on close. */
html.atek-search-open #brx-header .brxe-search {
	display: none !important;
}
.atek-search-page__empty {
	margin: 32px 0;
	color: var( --atek-search-ink-soft );
}

/* Load-more button under each group on the results page */
.atek-search-group__load-more {
	display: inline-block;
	margin: 8px 0 24px;
	padding: 12px 24px;
	background: transparent;
	border: 2px solid var( --atek-search-ink );
	color: var( --atek-search-ink );
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
	font-family: 'Titillium Web', system-ui, sans-serif;
}
.atek-search-group__load-more:hover:not(:disabled) {
	background: var( --atek-search-ink );
	color: #fff;
}
.atek-search-group__load-more:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
.atek-lm-count {
	font-weight: 400;
	opacity: 0.7;
	margin-left: 4px;
}

/* ===== Mobile header alignment (≤ 991.98px — Bricks hamburger range) =====
   Make the magnifier sit on the same baseline as the hamburger toggle,
   pull it close to the hamburger, and suppress any default decoration
   (border-bottom / focus outline / box-shadow) that would otherwise show
   as a stray orange tick beneath the icon. */
@media ( max-width: 991.98px ) {
	#brx-header .brxe-search {
		margin-top: 0 !important;
		margin-right: -55px !important;
		display: flex !important;
		align-items: center;
		justify-content: center;
		align-self: center;
		height: auto;
	}
	#brx-header .brxe-search .bricks-search-form {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		height: 100%;
	}
	#brx-header .brxe-search .bricks-search-form button,
	#brx-header .brxe-search .bricks-search-form button:hover,
	#brx-header .brxe-search .bricks-search-form button:focus,
	#brx-header .brxe-search .bricks-search-form button:focus-visible,
	#brx-header .brxe-search .bricks-search-form button:active {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		font-size: 22px;
		line-height: 1;
		border: 0 !important;
		border-bottom: 0 !important;
		outline: 0 !important;
		box-shadow: none !important;
		text-decoration: none !important;
		background: transparent !important;
	}
	#brx-header .brxe-search .bricks-search-form button i,
	#brx-header .brxe-search .bricks-search-form button svg {
		font-size: 22px;
		width: 22px;
		height: 22px;
		border: 0 !important;
		text-decoration: none !important;
	}
}

/* Responsive overlay tweaks */
@media ( max-width: 720px ) {
	.atek-search-overlay__panel { padding: 20px 14px 80px; }
	.atek-search-bar__icon { width: 44px; }
	.atek-search-input { font-size: 16px; padding: 14px 8px; }
	.atek-search-submit { padding: 0 14px; font-size: 14px; }
	.atek-search-status {
		font-size: clamp( 22px, 6vw, 28px );
		margin: 24px auto 18px;
	}
	.atek-search-results { padding-bottom: 16px; }
	.atek-search-group { padding: 20px 0; }
	.atek-search-item { margin-bottom: 22px; }
	.atek-search-item__title { font-size: clamp( 18px, 5vw, 22px ); }
	.atek-search-item__excerpt {
		font-size: 15px;
		line-height: 1.5;
	}
	.atek-search-page { padding: 32px 16px 60px; }
}

/* Very small phones only (iPhone SE 1st gen / Galaxy Fold-class) —
   let the Search submit button wrap below the input so the input stays
   usable. Devices ≥ 380px keep the original single-row layout. */
@media ( max-width: 380px ) {
	.atek-search-bar,
	.atek-search-page__form {
		flex-wrap: wrap;
	}
	.atek-search-submit,
	.atek-search-page__submit {
		width: 100%;
		padding: 12px 0;
		font-size: 15px;
	}
	.atek-search-bar__icon,
	.atek-search-page__icon { width: 40px; }
	.atek-search-clear,
	.atek-search-page__clear { width: 40px; }
}
