/* Typeahead-Suche der Ressourcen-Übersicht (MKT-976).
   Wird per JS über der Filterleiste eingehängt. Dental-Brand (Grün) + bestehende Tokens. */

.td-rsearch {
	position: relative;
}
/* Eigenständig (Fallback ohne Filterleiste): eigene Zeile darüber. */
.td-rsearch:not(.td-rsearch--inbar) {
	max-width: 560px;
	margin-bottom: 22px;
}
/* In der Filterleiste: rechtsbündig und auf gleicher Höhe wie die Selects. */
.td-rsearch--inbar {
	margin-left: auto;
	align-self: stretch;
	flex: 0 1 340px;
}
.td-rsearch--inbar .td-rsearch__field {
	height: 100%;
}
/* Filterleiste: Selects links, Suche rechts; sauber umbrechen. */
#brxe-barflt {
	align-items: stretch;
	flex-wrap: wrap;
	row-gap: 12px;
}

.td-rsearch__field {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	/* tomedo-Rot (--primary) für Rahmen, Box-Shadow und Icon des Suchfelds. */
	border: 1px solid #dddedf;
	border-radius: var(--radius-l, 14px);
	padding: 0 16px;
	box-shadow: 0 6px 24px rgba(119, 119, 119, 0.18);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.td-rsearch__field:focus-within {
	border-color: #a5a5a5;
	box-shadow: none;

}

.td-rsearch__icon {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	color: #dddedf;
}

.td-rsearch__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font-family: inherit;
	font-size: 1.4rem;
	padding: 5px;
	color: var(--td-charcoal, #1f2937);
}
.td-rsearch__input::placeholder { font-size: 1.4rem; opacity: 0.7; }
.td-rsearch__input::-webkit-search-cancel-button { cursor: pointer; }

.td-rsearch__panel {
	position: absolute;
	z-index: 50;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--td-border, #e3e7ec);
	border-radius: var(--radius-l, 14px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
	padding: 6px;
	max-height: 420px;
	overflow-y: auto;
}

.td-rsearch__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
}
.td-rsearch__item:hover,
.td-rsearch__item.is-active {
	background: #f6eeee;
}

.td-rsearch__thumb {
	width: 46px;
	height: 46px;
	flex: 0 0 auto;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	background-color: #f1f4f7;
}
.td-rsearch__thumb--empty {
	background: linear-gradient(135deg, #e9eef0, #dfe7e3);
}

.td-rsearch__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.td-rsearch__title {
	font-weight: 600;
	font-size: 1.4rem;
	line-height: 1.3;
	color: var(--td-charcoal, #1f2937);
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.td-rsearch__title mark {
	background: rgba(107, 11, 11, 0.16);
	color: inherit;
	padding: 0 1px;
	border-radius: 3px;
}
.td-rsearch__type {
	font-size: 1.2rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color:  #db1f3e;
}

.td-rsearch__empty {
	padding: 16px 14px;
	color: var(--td-muted, #6b7280);
	font-size: 1.4rem;
}

@media (max-width: 767px) {
	.td-rsearch:not(.td-rsearch--inbar) { max-width: none; }
	/* Auf dem Smartphone klappt die Filterleiste in eine Spalte – Suche dann volle Breite. */
	.td-rsearch--inbar { flex-basis: 100%; margin-left: 0; }
}
