/* ==========================================================================
   Site search - Lyrics, Chords & Notes only, with live results + voice search.
   Loaded on every page (replaces the Ajax Search Lite shortcode).
   ========================================================================== */

.site-search {
	position: relative;
	max-width: 560px;
	margin: 0 auto;
}

.site-search__form {
	width: 100%;
}

.site-search__field {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 6px;
	background: #ffffff;
	border: 1px solid #dcdfe4;
	border-radius: 10px;
	padding: 5px;
}

/*
 * !important is used deliberately here: the theme's original sitewide rule
 * (style.css: input[type=text], input[type=search], ... { border: 1px solid
 * #e5e5ec; padding: 10px 20px; background-color: #fff; width: 100%; ... })
 * targets input[type=search] directly, which has HIGHER CSS specificity than
 * a plain class selector. Without !important that legacy rule wins and adds
 * its own border/padding/background inside our pill, which is exactly the
 * "double box" look. This is the only place in the new CSS that needs it.
 */
.site-search__input {
	box-sizing: border-box !important;
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	height: 38px !important;
	margin: 0 !important;
	padding: 0 8px 0 12px !important;
	border: none !important;
	outline: none;
	background: transparent !important;
	background-image: none;
	font-family: inherit;
	font-size: 16px !important;
	line-height: 38px;
	color: #1a1a1a !important;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	border-radius: 0 !important;
	box-shadow: none !important;
	transition: none !important;
}

.site-search__input::placeholder {
	color: #9ca3af;
}

/* Strip native OS search-input chrome (the extra rounded/inset look some
   browsers - especially Safari/Chrome on macOS and iOS - draw by default on
   <input type="search">) so only our own box shows, not a "pill in a pill". */
.site-search__input::-webkit-search-cancel-button,
.site-search__input::-webkit-search-decoration,
.site-search__input::-webkit-search-results-button,
.site-search__input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	display: none;
}

.site-search__mic,
.site-search__submit {
	box-sizing: border-box;
	flex: 0 0 auto;
	border: none;
	cursor: pointer;
	border-radius: 7px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.site-search__mic {
	width: 38px;
	height: 38px;
	background: transparent;
	color: #6b7280;
}

.site-search__mic:hover {
	background: #f3f4f6;
	color: #3454d1;
}

.site-search__mic.is-listening {
	background: #e11d48;
	color: #ffffff;
}

.site-search__submit {
	height: 38px;
	padding: 0 18px;
	background: #3454d1;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
}

.site-search__submit:hover {
	background: #2c46b8;
}

.site-search__results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	max-height: 360px;
	overflow-y: auto;
	z-index: 40;
	padding: 6px;
}

.site-search__results-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-search__result {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	text-decoration: none;
	color: #1a1a1a;
}

.site-search__result:hover,
.site-search__result:focus {
	background: #f3f4f6;
}

.site-search__result-title {
	font-size: 15px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.site-search__result-type {
	flex: 0 0 auto;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6b7280;
	background: #f3f4f6;
	padding: 3px 8px;
	border-radius: 999px;
}

.site-search__empty {
	margin: 0;
	padding: 14px 12px;
	font-size: 14px;
	color: #6b7280;
	text-align: center;
}

@media (max-width: 480px) {
	.site-search__field {
		padding: 4px 4px 4px 14px;
	}
	.site-search__submit {
		padding: 0 14px;
		font-size: 13px;
	}
	.site-search__result-title {
		font-size: 14px;
	}
}
