/* WP AI Search — [ai_search] form + "Popular Searches" section */
.wp-ai-search-form-wrap {
	margin: 0 0 1rem;
}

.wp-ai-search-form {
	display: flex;
	gap: .5rem;
	align-items: stretch;
}

.wp-ai-search-form .wp-ai-search-field {
	flex: 1 1 auto;
	min-width: 0;
}

.wp-ai-search-form .wp-ai-search-submit {
	flex: 0 0 auto;
	cursor: pointer;
}

.wp-ai-popular {
	margin: 1rem 0 1.5rem;
	text-align: center;
}

/* Disclosure toggle: "Popular Searches" + caret. */
.wp-ai-popular-toggle {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	margin: 0 auto;
	padding: .25rem .25rem;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	line-height: 1.3;
}

.wp-ai-popular-title {
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.3;
}

/* CSS chevron drawn from two borders; tinted with the accent color. */
.wp-ai-popular-caret {
	display: inline-block;
	width: .5em;
	height: .5em;
	margin-top: -.18em;
	border-right: 2px solid var(--wp-ai-accent, #2B5BD7);
	border-bottom: 2px solid var(--wp-ai-accent, #2B5BD7);
	transform: rotate(45deg);
	transition: transform .18s ease;
}

.wp-ai-popular-toggle[aria-expanded="true"] .wp-ai-popular-caret {
	margin-top: .18em;
	transform: rotate(225deg);
}

.wp-ai-popular-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem;
	margin-top: .85rem;
}

/* Beat the [hidden] UA rule despite display:flex above. */
.wp-ai-popular-list[hidden] {
	display: none;
}

.wp-ai-popular-term {
	display: inline-block;
	padding: .4rem .9rem;
	border: 1px solid rgba(127, 127, 127, 0.45);
	border-radius: 999px;
	font-size: .85rem;
	line-height: 1.3;
	text-decoration: none;
	color: inherit;
	background: transparent;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.wp-ai-popular-term:hover,
.wp-ai-popular-term:focus {
	border-color: var(--wp-ai-accent, #2B5BD7);
	color: var(--wp-ai-accent, #2B5BD7);
	background-color: rgba(127, 127, 127, 0.08);
}
