/**
 * FWT WC Search — dropdown styles.
 *
 * BEM block: fwt-search
 * Brand colors: Navy #0F2745 · Burgundy #6D102D
 */

.fwt-search__dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 9999;
	margin-top: 4px;
	max-height: 500px;
	overflow-y: auto;
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	box-shadow: 0 8px 24px rgba(15, 39, 69, 0.12);
	font-size: 14px;
	color: #1a1a1a;
}

.fwt-search__dropdown[hidden] {
	display: none;
}

.fwt-search__group-header {
	padding: 8px 16px;
	background: #f6f7f9;
	color: #0F2745;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-bottom: 1px solid #ececec;
}

.fwt-search__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid #f4f4f4;
	cursor: pointer;
	transition: background-color 120ms ease;
}

.fwt-search__item:last-child {
	border-bottom: none;
}

.fwt-search__item:hover,
.fwt-search__item.is-active {
	background: #f9f5ee;
	color: #0F2745;
	text-decoration: none;
}

.fwt-search__item--producer {
	font-style: italic;
}

.fwt-search__item-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fwt-search__item-meta {
	flex: 0 0 auto;
	color: #777;
	font-size: 12px;
	white-space: nowrap;
}

.fwt-search__item mark {
	background: transparent;
	color: inherit;
	font-weight: 700;
	border-bottom: 2px solid #6D102D;
	padding: 0;
}

.fwt-search__empty {
	padding: 16px;
	color: #888;
	font-style: italic;
	text-align: center;
}

/* Mobile: drop the dropdown into a full-width sheet below the search bar. */
@media (max-width: 640px) {
	.fwt-search__dropdown {
		max-height: 70vh;
		font-size: 15px;
	}

	.fwt-search__item {
		padding: 12px 16px;
	}
}
