/* Header search + dropdown. Neutral styling that inherits the theme's colors. */

.hollon-search {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.hollon-search__input {
	max-width: 100%;
	padding: 6px 10px;
	font: inherit;
	line-height: 1.4;
	border: 1px solid rgba( 0, 0, 0, 0.25 );
	border-radius: 3px;
	background: #fff;
	color: #222;
}

.hollon-search__submit {
	margin-left: 4px;
	padding: 6px 10px;
	font: inherit;
	cursor: pointer;
	border: 1px solid rgba( 0, 0, 0, 0.25 );
	border-radius: 3px;
	background: #f5f5f5;
	color: #222;
}

.hollon-search__results {
	position: absolute;
	top: calc( 100% + 4px );
	left: 0;
	z-index: 9999;
	min-width: 280px;
	max-width: 380px;
	max-height: 60vh;
	overflow-y: auto;
	text-align: left;
	background: #fff;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	border-radius: 3px;
	box-shadow: 0 6px 20px rgba( 0, 0, 0, 0.18 );
}

.hollon-search__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 12px;
	color: #222;
	text-decoration: none;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.06 );
}

.hollon-search__item:hover,
.hollon-search__item.is-active {
	background: #f0f4f8;
	color: #111;
}

.hollon-search__title {
	font-weight: 600;
	line-height: 1.3;
}

.hollon-search__badge {
	flex: 0 0 auto;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #667;
}

.hollon-search__all {
	display: block;
	padding: 9px 12px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	color: #1a4b8c;
	background: #fafbfc;
}

.hollon-search__empty {
	padding: 12px;
	color: #667;
}

/* Theme provides .screen-reader-text; this is a fallback if it does not. */
.hollon-search .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect( 1px, 1px, 1px, 1px );
	white-space: nowrap;
}

/*
 * Theme compatibility. The header bar styles every `.social-icon-wrapper li a`
 * (gray, 13px), and a custom rule hides `li:nth-child(5) a`, which is the slot
 * this form sits in. These selectors out-rank both. The header <li> also sets
 * font-family: FontAwesome, so text fonts are set explicitly.
 */
.hollon-search,
.hollon-search .hollon-search__input,
.hollon-search .hollon-search__results {
	font-family: 'josefin_sansregular', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	letter-spacing: normal;
}

.hollon-search .hollon-search__results a.hollon-search__item {
	display: flex !important;
	color: #222;
	font-size: 14px;
	letter-spacing: normal;
}

.hollon-search .hollon-search__results a.hollon-search__item:hover,
.hollon-search .hollon-search__results a.hollon-search__item.is-active {
	color: #111;
	background: #f0f4f8;
}

.hollon-search .hollon-search__results a.hollon-search__all {
	display: block !important;
	color: #1a4b8c;
	font-size: 13px;
}

.hollon-search .hollon-search__results a.hollon-search__all:hover {
	color: #0d2f5c;
}

/* The form sits at the right edge of the header, so open the panel leftward. */
.hollon-search .hollon-search__results {
	left: auto;
	right: 0;
	max-width: calc( 100vw - 24px );
}

/* On phones the header centers the form, so center the panel under it and
   keep a 12px margin on each side instead of anchoring to the right edge. */
@media ( max-width: 600px ) {
	.hollon-search .hollon-search__results {
		left: 50%;
		right: auto;
		transform: translateX( -50% );
		min-width: 0;
		width: calc( 100vw - 24px );
		max-width: 380px;
	}
}
