.baba-search {
	width: 100%;
}

.baba-search--align-center { text-align: center; }
.baba-search--align-right  { text-align: right; }

.baba-search__form {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	max-width: 520px;
	background: #fff;
	border-radius: 40px;
	padding: 0 0 0 22px;
	box-sizing: border-box;
	box-shadow: 0 10px 30px rgba(40, 20, 90, .08);
}

.baba-search--align-center .baba-search__form { margin-left: auto; margin-right: auto; }
.baba-search--align-right  .baba-search__form { margin-left: auto; }

/* Selektor ma TYP ELEMENTU celowo.

   `reset.css` motywu ustawia `input[type="search"] { border: 1px solid #666;
   padding: .5rem 1rem }` — specyficzność 0,1,1 bije samą klasę 0,1,0. Skutek był
   podwójny: wokół pola rysowało się szare obramowanie, którego nie ma w projekcie,
   a 32 px wypełnienia zjadało miejsce na tekst i placeholder „WYSZUKAJ KURSU”
   (172 px przy wersalikach i świetle 1,53) nie mieścił się w 156 px — ucinało go
   na „WYSZUKAJ KUR”.

   `input.baba-search__input` to remis 0,1,1, a remis rozstrzyga kolejność:
   `baba-search.css` idzie po `reset.css`. Bez `!important` — reset go nie używa. */
input.baba-search__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	color: #2b2b3a;
	padding: 12px 0;
	-webkit-appearance: none;
	        appearance: none;
}

.baba-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Akcent szukajki to kolor nadrzędny motywu (#4F1964) — ten sam, co tło belki
   promocyjnej w nagłówku. Wcześniej stał tu granat #2e17e6, który nie pochodził
   z żadnej makiety; ten sam kolor niesie podświetlenie frazy w podpowiedziach,
   „Zobacz wszystkie wyniki” i hasła przy najechaniu.

   Tło lupy i kolor haseł mają też kontrolki widżetu z tymi samymi domyślnymi
   (`class-baba-search-widget.php`) — i to one wygrywają, bo CSS generowany przez
   Elementora ma cztery klasy i ładuje się po tym arkuszu. Zmiana w jednym miejscu
   bez drugiego nic tu nie ruszy. */
.baba-search__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 50%;
	background: #4f1964;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease;
}

.baba-search__btn:hover { background: #3b134b; }
.baba-search__btn:active { transform: scale(.94); }
.baba-search__btn svg { width: 20px; height: 20px; display: block; }

.baba-search__popular {
	margin-top: 40px;
}

.baba-search__heading {
	margin: 0 0 22px;
	color: #8a8a9c;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.baba-search__tags {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 14px;
	text-align: left;
}

.baba-search__tag {
	display: inline-block;
	color: #8a8a9c;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color .2s ease;
}

.baba-search__tag:hover,
.baba-search__tag:focus-visible {
	color: #4f1964;
}

/* ====== AUTOPODPOWIEDZI ====== */
.baba-search {
	position: relative;
}

/* Kotwica panelu – tylko wokół pola, żeby lista wisiała tuż pod nim. */
.baba-search__field {
	position: relative;
	width: 100%;
	max-width: 520px;
}

.baba-search--align-center .baba-search__field { margin-left: auto; margin-right: auto; }
.baba-search--align-right  .baba-search__field { margin-left: auto; }

.baba-search__field .baba-search__form { max-width: none; }

.baba-search__ac {
	position: absolute;
	z-index: 999;
	left: 0;
	right: 0;
	top: calc(100% + 10px);
	max-height: 400px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 6px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 20px 50px rgba(40, 20, 90, .18);
	text-align: left;
}

.baba-search__ac[hidden] { display: none; }

/* Delikatny pasek przewijania */
.baba-search__ac::-webkit-scrollbar { width: 8px; }
.baba-search__ac::-webkit-scrollbar-thumb { background: #e4dff0; border-radius: 8px; }

.baba-search__ac-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.baba-search__ac-item { margin: 0; }

.baba-search__ac-link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border-radius: 12px;
	color: #2b2b3a;
	text-decoration: none;
	transition: background-color .15s ease;
}

/* Kolor tekstu musi tu być podany jawnie, choć reguła wyżej już go ustawia.
   Ustawienia witryny w Elementorze niosą `.elementor-kit-… a:hover { color:
   var(--e-global-color-accent) }`, a ten akcent to #E0FC00 — jaskrawa limonka.
   Bez własnej deklaracji podpowiedź robiła się po najechaniu limonkowa. */
.baba-search__ac-item.is-active .baba-search__ac-link,
.baba-search__ac-link:hover {
	background: #f5f2fc;
	color: #4F1964;
}

.baba-search__ac-thumb {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 10px;
	overflow: hidden;
	background: #efe7f3;
	line-height: 0;
}

.baba-search__ac-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.baba-search__ac-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

/* Motywy często narzucają wersaliki na tytuły – tu ich nie chcemy. */
.baba-search__ac-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: none;
	letter-spacing: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.baba-search__mark {
	background: transparent;
	color: #4f1964;
	font-weight: 800;
	padding: 0;
}

.baba-search__ac-type {
	color: #9a97a8;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.baba-search__ac-info {
	padding: 18px;
	color: #8a8a9c;
	font-size: 13px;
	text-align: center;
}

.baba-search__ac-all {
	display: block;
	margin-top: 4px;
	padding: 13px 14px;
	border-top: 1px solid #f0edf7;
	color: #4f1964;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	text-transform: none;
	text-decoration: none;
	border-radius: 0 0 12px 12px;
}

.baba-search__ac-all:hover { background: #f5f2fc; }

@media (max-width: 767px) {
	.baba-search__ac { max-height: 320px; border-radius: 14px; }
	.baba-search__ac-thumb { width: 42px; height: 42px; }
	.baba-search__ac-title { font-size: 13px; }
}
