/* Поиск в шапке: форма и выпадающие подсказки */

.header-search {
	--header-search-h: 42px;
	position: relative;
	flex: 0 1 260px;
	/*min-width: 170px;*/
	max-width: 300px;
}

.header-search__form {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	height: var(--header-search-h);
	padding: 0 0.25rem 0 0.875rem;
	background: #ffffff;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search__form:focus-within {
	border-color: var(--color-accent);
	box-shadow: 0 0 0 2px rgba(32, 168, 184, 0.15);
}

.header-search__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	border: 0;
	background: transparent;
	font-family: var(--font-main);
	font-size: 0.9375rem;
	color: var(--color-text);
}

.header-search__input:focus-visible {
	outline: none;
}

.header-search__submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	color: var(--color-primary);
	border-radius: 50%;
	transition: color 0.2s ease;
}

.header-search__submit:hover,
.header-search__submit:focus-visible {
	color: var(--color-accent);
}

.header-search__icon {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	stroke-width: 2;
}

/* Выпадающая панель (JCTitleSearch добавляет div.title-search-result в body) */
div.title-search-result {
	z-index: 2100;
	overflow: hidden;
	padding: 0.35rem 0;
	background: #ffffff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-card);
	font-family: var(--font-main);
}

table.title-search-result {
	width: 100%;
	border-collapse: collapse;
}

table.title-search-result th,
table.title-search-result td {
	padding: 0.45rem 0.85rem;
	text-align: left;
	vertical-align: top;
}

table.title-search-result th {
	width: 1%;
	white-space: nowrap;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--color-text-muted);
}

table.title-search-result td a {
	display: block;
	font-size: 0.9375rem;
	color: var(--color-text);
	text-decoration: none;
}

table.title-search-result td a:hover,
table.title-search-result td a:focus-visible {
	color: var(--color-accent);
}

table.title-search-result td.title-search-all a {
	color: var(--color-text-accent);
	font-weight: 600;
}

table.title-search-result tr.title-search-selected td,
table.title-search-result tr.title-search-selected th {
	background: var(--color-bg-light);
}

table.title-search-result th.title-search-separator,
table.title-search-result td.title-search-separator {
	height: 0;
	padding: 0;
	font-size: 0;
	line-height: 0;
}

div.title-search-result .title-search-fader {
	display: none;
}

@media (max-width: 1100px) {
	.header-search {
		flex-basis: 200px;
	}
}

@media (max-width: 900px) {
	.header__inner {
		flex-wrap: wrap;
	}

	.header-search {
		order: 5;
		flex: 0 0 100%;
		width: auto;
		max-width: none;
		min-width: 0;
		margin-top: 2rem;
	}
}
