/**
 * Header service search. Isolated overlay; does not restyle Header 140 layout.
 */

.alphos-svc-search__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.alphos-svc-search-trigger-wrap {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	align-self: center;
	margin: 0;
	min-width: 44px;
}

.alphos-svc-search-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
}

.alphos-svc-search-trigger svg {
	display: block;
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
}

.alphos-svc-search-trigger:hover,
.alphos-svc-search-trigger:focus-visible,
.alphos-svc-search-trigger[aria-expanded="true"] {
	color: #69f0ae;
}

.alphos-svc-search-trigger:focus-visible {
	outline: 2px solid #00c853;
	outline-offset: 3px;
}

.alphos-svc-search {
	position: fixed;
	z-index: 10050;
	width: min(420px, calc(100vw - 24px));
	max-width: 480px;
}

.alphos-svc-search[hidden] {
	display: none !important;
}

.alphos-svc-search__panel {
	background: #151515;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	padding: 12px;
	max-height: min(70vh, 480px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.alphos-svc-search__input {
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	background: #0b0b0b;
	color: #ffffff;
	font-family: var(--alphos-font);
	font-size: 16px;
	line-height: 1.4;
}

.alphos-svc-search__input:focus {
	outline: 2px solid #00c853;
	outline-offset: 0;
	border-color: #00c853;
}

.alphos-svc-search__results {
	margin-top: 8px;
	overflow-x: hidden;
	overflow-y: auto;
	min-height: 48px;
	max-height: min(52vh, 360px);
}

.alphos-svc-search__status {
	margin: 8px 4px;
	color: #7a7a7a;
	font-size: 14px;
	line-height: 1.5;
}

.alphos-svc-search__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.alphos-svc-search__item {
	margin: 0;
	border-top: 1px solid #2a2a2a;
}

.alphos-svc-search__item:first-child {
	border-top: 0;
}

.alphos-svc-search__link {
	display: block;
	padding: 10px 8px 10px 12px;
	border-left: 2px solid transparent;
	text-decoration: none;
	color: inherit;
}

.alphos-svc-search__link:hover,
.alphos-svc-search__link:focus,
.alphos-svc-search__link.is-active {
	background: #0b0b0b;
	border-left-color: #00c853;
}

.alphos-svc-search__link:focus-visible {
	outline: 2px solid #00c853;
	outline-offset: -2px;
}

.alphos-svc-search__cat {
	display: block;
	margin: 0 0 4px;
	color: #7a7a7a;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.alphos-svc-search__name {
	display: block;
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.alphos-svc-search__desc {
	display: block;
	margin-top: 2px;
	color: #b5b5b5;
	font-size: 13px;
	line-height: 1.5;
}

.alphos-svc-search-mobile {
	list-style: none;
}

.alphos-svc-search-mobile a,
.alphos-svc-search-mobile button {
	width: 100%;
	display: block;
	min-height: 44px;
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid #2a2a2a;
	background: transparent;
	color: #ffffff;
	font-family: var(--alphos-font);
	font-size: 16px;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
}

.alphos-svc-search-mobile button:hover,
.alphos-svc-search-mobile button:focus-visible {
	color: #69f0ae;
}

.alphos-svc-search-mobile button:focus-visible {
	outline: 2px solid #00c853;
	outline-offset: -2px;
}

/*
 * Desktop trigger only. The inline SVG is collapsed by the child theme's
 * global `svg { height: auto }` and the kit paints generic header buttons
 * with the green CTA fill, which produced a blank green square.
 */
@media (min-width: 768px) {
	#tahefobu-header .alphos-svc-search-trigger {
		position: relative;
		width: 40px;
		height: 40px;
		background: transparent !important;
		background-image: none !important;
		border: 1px solid #2a2a2a !important;
		border-radius: 8px;
		color: #ffffff !important;
		box-shadow: none !important;
	}

	#tahefobu-header .alphos-svc-search-trigger svg {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
	}

	#tahefobu-header .alphos-svc-search-trigger::before {
		content: "";
		position: absolute;
		top: 10px;
		left: 10px;
		width: 13px;
		height: 13px;
		border: 2px solid currentColor;
		border-radius: 50%;
		box-sizing: border-box;
		background: transparent;
	}

	#tahefobu-header .alphos-svc-search-trigger::after {
		content: "";
		position: absolute;
		top: 22px;
		left: 21px;
		width: 8px;
		height: 2px;
		background: currentColor;
		border-radius: 1px;
		transform: rotate(45deg);
		transform-origin: left center;
	}

	#tahefobu-header .alphos-svc-search-trigger:hover,
	#tahefobu-header .alphos-svc-search-trigger:focus-visible,
	#tahefobu-header .alphos-svc-search-trigger[aria-expanded="true"] {
		color: #69f0ae !important;
		border-color: #00c853 !important;
		background: transparent !important;
	}

	#tahefobu-header .alphos-svc-search-trigger:focus-visible {
		outline: 2px solid #00c853;
		outline-offset: 3px;
	}
}

@media (max-width: 767px) {
	.alphos-svc-search-trigger-wrap {
		display: none !important;
	}

	.alphos-svc-search {
		width: calc(100vw - 24px);
		max-width: none;
		left: 12px !important;
		right: 12px;
	}
}
