/* Abakon Search — style dopasowane do palety motywu abakon */

.abakon-search {
	--abakon-search-primary: #003b83;
	--abakon-search-accent: #0080ff;
	--abakon-search-border: #e5ebf2;
	--abakon-search-muted: #9696a3;
	--abakon-search-text: #33333e;

	position: relative;
	width: 100%;
	max-width: 420px;
	font-size: 15px;
	color: var(--abakon-search-text);
}

.abakon-search__form {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid var(--abakon-search-border);
	border-radius: 40px;
	overflow: hidden;
}

.abakon-search__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 8px 10px 18px;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	color: inherit;
	-webkit-appearance: none;
	appearance: none;
}

.abakon-search__input::-webkit-search-cancel-button {
	display: none;
}

.abakon-search__form:focus-within {
	border-color: var(--abakon-search-accent);
	box-shadow: 0 0 0 3px rgba(0, 128, 255, .12);
}

.abakon-search__clear,
.abakon-search__submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	cursor: pointer;
	line-height: 1;
}

.abakon-search__clear {
	width: 32px;
	height: 32px;
	background: transparent;
	color: var(--abakon-search-muted);
}

.abakon-search__submit {
	width: 46px;
	height: 44px;
	background: var(--abakon-search-primary);
	color: #fff;
	transition: background .2s ease;
}

.abakon-search__submit:hover,
.abakon-search__submit:focus {
	background: var(--abakon-search-accent);
	color: #fff;
}

/* Panel podpowiedzi */

.abakon-search__panel {
	position: absolute;
	z-index: 1050;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	max-height: 70vh;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--abakon-search-border);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0, 59, 131, .14);
	text-align: left;
}

.abakon-search__message {
	padding: 16px 18px;
	color: var(--abakon-search-muted);
}

.abakon-search__group + .abakon-search__group {
	border-top: 1px solid var(--abakon-search-border);
}

.abakon-search__group-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 18px 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--abakon-search-primary);
}

.abakon-search__group-more {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: var(--abakon-search-accent);
	text-decoration: underline;
}

.abakon-search__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.abakon-search__link {
	display: flex;
	gap: 12px;
	padding: 9px 18px;
	color: inherit;
	text-decoration: none;
	transition: background .15s ease;
}

.abakon-search__link:hover,
.abakon-search__link:focus,
.abakon-search__link.is-active {
	background: #f5f8fc;
	color: inherit;
	text-decoration: none;
}

.abakon-search__thumb {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border: 1px solid var(--abakon-search-border);
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.abakon-search__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.abakon-search__body {
	min-width: 0;
	display: block;
}

.abakon-search__title {
	display: block;
	font-weight: 600;
	line-height: 1.3;
}

.abakon-search__meta {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: var(--abakon-search-accent);
}

.abakon-search__excerpt {
	display: block;
	margin-top: 3px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--abakon-search-muted);
}

.abakon-search mark,
.abakon-search-results mark {
	background: rgba(0, 128, 255, .16);
	color: inherit;
	padding: 0 1px;
	border-radius: 2px;
}

.abakon-search__all {
	display: block;
	padding: 12px 18px;
	border-top: 1px solid var(--abakon-search-border);
	background: #fafbfd;
	font-weight: 600;
	text-align: center;
	color: var(--abakon-search-primary);
	text-decoration: none;
}

.abakon-search__all:hover {
	color: var(--abakon-search-accent);
}

/* Ikona lupy w nagłówku (obok hamburgera) */

.abakon-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 35px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #003b83;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: opacity .2s ease;
}

.abakon-search-toggle:hover,
.abakon-search-toggle:focus {
	opacity: .7;
	color: inherit;
}

header .nav-wrapper .abakon-search-toggle--header {
	margin-left: 14px;
	color: var(--darkblue, #003b83);
}

/*
 * Poniżej 991 px motyw ukrywa .nav-menu i wypycha hamburger przez margin-left:auto.
 * Przenosimy to zadanie na lupę, żeby oba elementy stały razem po prawej.
 */
@media (max-width: 991px) {
	header .nav-wrapper .abakon-search-toggle--header {
		margin-left: auto;
	}

	header .nav-wrapper .abakon-search-toggle--header + .navbar-toggler {
		margin-left: 0;
	}
}

/* Wariant regionalny motywu: toggler ma bootstrapowe .ms-auto z !important. */
header .nav-wrapper .abakon-search-toggle--header + .navbar-toggler.ms-auto {
	margin-left: 0 !important;
}

header .nav-wrapper .abakon-search-toggle--header:has(+ .navbar-toggler.ms-auto) {
	margin-left: auto;
}

/* Tam, gdzie motyw rozjaśnia hamburger, rozjaśniamy też lupę. */
@media (max-width: 767px) {
	.home .header-sticky .nav-wrapper .abakon-search-toggle--header,
	body .header-sticky .nav-wrapper .abakon-search-toggle--header {
		color: #fff;
	}
}

/* Modal wyszukiwarki */

.abakon-search-modal[hidden] {
	display: none;
}

.abakon-search-modal {
	position: fixed;
	inset: 0;
	z-index: 1100;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 12vh 16px 24px;
	opacity: 0;
	transition: opacity .18s ease;
}

.abakon-search-modal.is-visible {
	opacity: 1;
}

.abakon-search-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 24, 45, .62);
	backdrop-filter: blur(2px);
}

.abakon-search-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 720px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 30, 70, .28);
	transform: translateY(-12px);
	transition: transform .18s ease;
}

.abakon-search-modal.is-visible .abakon-search-modal__dialog {
	transform: translateY(0);
}

.abakon-search-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #9696a3;
	font-size: 18px;
	cursor: pointer;
}

.abakon-search-modal__close:hover,
.abakon-search-modal__close:focus {
	background: #f0f4f9;
	color: #003b83;
}

.abakon-search-modal__inner {
	padding: 26px 24px 22px;
}

.abakon-search-modal__title {
	margin: 0 0 14px;
	padding-right: 40px;
	font-size: 20px;
	font-weight: 700;
	color: #003b83;
}

.abakon-search-modal__hint {
	margin: 12px 0 0;
	font-size: 13px;
	color: #9696a3;
}

/* Formularz w modalu — panel wyników rośnie w dół, bez pozycjonowania absolutnego */

.abakon-search--modal {
	max-width: 100%;
}

.abakon-search--modal .abakon-search__form {
	border-radius: 10px;
}

.abakon-search--modal .abakon-search__input {
	padding: 14px 8px 14px 18px;
	font-size: 17px;
}

.abakon-search--modal .abakon-search__submit {
	height: 52px;
	width: 56px;
}

.abakon-search--modal .abakon-search__panel {
	position: static;
	margin-top: 12px;
	max-height: 52vh;
	box-shadow: none;
	border-radius: 10px;
}

@media (max-width: 575px) {
	.abakon-search-modal {
		padding: 0;
		align-items: stretch;
	}

	.abakon-search-modal__dialog {
		max-width: 100%;
		border-radius: 0;
		min-height: 100%;
	}

	.abakon-search-modal__inner {
		padding: 22px 16px 18px;
	}

	.abakon-search--modal .abakon-search__panel {
		max-height: none;
	}
}

/* Blokada przewijania tła przy otwartym modalu */

html.abakon-search-modal-open,
html.abakon-search-modal-open body {
	overflow: hidden;
}

/* Strona wyników */

.abakon-search-results {
	padding: 40px 0 60px;
}

.abakon-search-results__form {
	margin-bottom: 28px;
}

.abakon-search-results__count {
	margin-bottom: 24px;
	color: #6c757d;
}

.abakon-search-results__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.abakon-search-results__item {
	display: flex;
	gap: 18px;
	padding: 18px 0;
	border-bottom: 1px solid #e5ebf2;
}

.abakon-search-results__thumb {
	flex: 0 0 96px;
	width: 96px;
}

.abakon-search-results__thumb img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
	max-height: 100px;
	object-fit: scale-down;
}

.abakon-search-results__title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.3;
}

.abakon-search-results__title a {
	color: #003b83;
	text-decoration: none;
}

.abakon-search-results__title a:hover {
	color: #0080ff;
}

.abakon-search-results__badge {
	display: inline-block;
	margin-bottom: 6px;
	padding: 2px 10px;
	border-radius: 20px;
	background: #e5ebf2;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #003b83;
}

.abakon-search-results__meta {
	margin: 0 0 6px;
	font-size: 13px;
	color: #0080ff;
}

.abakon-search-results__excerpt {
	margin: 0;
	color: #55555f;
}

@media (max-width: 575px) {
	.abakon-search-results__thumb {
		display: none;
	}
}

/* Dostępność — klasa może nie istnieć w motywie */

.abakon-search .screen-reader-text,
.abakon-search-results .screen-reader-text,
.abakon-search-toggle .screen-reader-text,
.abakon-search-modal .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
