/* HND FAQ Pro – Search styles */

/* ── Search wrapper ──────────────────────────────────────── */

.hnd-faq-search-wrap {
	margin-bottom: 1rem;
	position: relative;
}

.hnd-faq-search-inner {
	display: flex;
	align-items: center;
	position: relative;
	background: #fff;
	border: 1px solid var(--hnd-faq-border-color);
	border-radius: var(--hnd-faq-border-radius);
	box-shadow: var(--hnd-faq-shadow);
	transition: border-color 0.2s;
}

.hnd-faq-search-inner:focus-within {
	border-color: var(--hnd-faq-accent);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--hnd-faq-accent) 15%, transparent);
}

.hnd-faq-search-icon {
	flex-shrink: 0;
	margin-left: 12px;
	color: #aaa;
	pointer-events: none;
}

.hnd-faq-search-input {
	flex: 1;
	border: 0px solid transparent !important;
	background: transparent;
	padding: 10px 8px 10px 8px;
	font-size: 0.95rem;
	color: inherit;
	outline: none;
	min-width: 0;
}

.hnd-faq-search-input::placeholder { color: #bbb; }

.hnd-faq-search-clear {
	flex-shrink: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: #aaa;
	cursor: pointer;
	font-size: 0.85rem;
	padding: 8px 12px;
	line-height: 1;
	transition: color 0.15s;
}

.hnd-faq-search-clear:hover { color: #333; }

/* ── Highlight ───────────────────────────────────────────── */

mark.hnd-faq-highlight {
	background: color-mix(in srgb, var(--hnd-faq-accent) 18%, transparent);
	color: inherit;
	border-radius: 2px;
	padding: 0 1px;
}

/* ── AJAX Dropdown ───────────────────────────────────────── */

.hnd-faq-search-results {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 100;
}

.hnd-faq-search-loading {
	text-align: center;
	color: #aaa;
	font-size: 0.85rem;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--hnd-faq-border-color);
	border-radius: var(--hnd-faq-border-radius);
}

.hnd-faq-search-dropdown {
	list-style: none;
	margin: 0;
	padding: 4px 0;
	background: #fff;
	border: 1px solid var(--hnd-faq-border-color);
	border-radius: var(--hnd-faq-border-radius);
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	max-height: 320px;
	overflow-y: auto;
}

.hnd-faq-search-result {
	padding: 10px 14px;
	cursor: pointer;
	border-bottom: 1px solid #f5f5f5;
	transition: background 0.15s;
}

.hnd-faq-search-result:last-child { border-bottom: none; }

.hnd-faq-search-result:hover,
.hnd-faq-search-result:focus {
	background: var(--hnd-faq-accent-bg);
	outline: none;
}

.hnd-faq-search-result.is-on-page::after {
	content: '↓';
	float: right;
	color: var(--hnd-faq-accent);
	font-size: 0.8rem;
}

.hnd-faq-search-result__title {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: #1a1a1a;
}

.hnd-faq-search-result__excerpt {
	display: block;
	font-size: 0.8rem;
	color: #777;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
