/* ── Wyszukiwarka ogłoszeń [moto_search] ─────────────────────────────────────── */

.moto-search {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 4px 28px rgba(0, 0, 0, .08);
	padding: 28px 24px 22px;
}

/* Wiersze pól */
.moto-search__row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 16px;
}

.moto-search__field {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

/* Etykieta */
.moto-search__label {
	color: #2D3748;
	font-size: 14px;
	font-weight: 500;
	line-height: normal;
}

/* Wspólne style dla select i input */
.moto-search__select,
.moto-search__input {
	height: 46px;
	border: 1.5px solid #e5e7eb;
	border-radius: 9px;
	padding: 0 38px 0 13px;
	font-size: 14px;
	color: #111827;
	background-color: #f9fafb;
	outline: none;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
	width: 100%;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
}

.moto-search__input {
	background-image: none;
	padding-right: 13px;
}

.moto-search__select:focus,
.moto-search__input:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
	background-color: #fff;
}

.moto-search__select:disabled {
	opacity: .45;
	cursor: not-allowed;
}

/* ── Multiselect: Lokalizacja ────────────────────────────────────────────────── */

.moto-search__multiselect {
	position: relative;
}

.moto-search__multiselect-trigger {
	height: 46px;
	border: 1.5px solid #e5e7eb;
	border-radius: 9px;
	padding: 0 38px 0 13px;
	font-size: 14px;
	color: #111827;
	background-color: #f9fafb;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	cursor: pointer;
	display: flex;
	align-items: center;
	user-select: none;
	transition: border-color .15s, background-color .15s;
	box-sizing: border-box;
}

.ms-trigger-icon { display: none; }

.ms-trigger-text {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	display: block;
	min-width: 0;
}

.moto-search__multiselect-trigger:hover,
.moto-search__multiselect.is-open .moto-search__multiselect-trigger {
	border-color: #3b82f6;
	background-color: #fff;
}

.moto-search__multiselect.is-open .moto-search__multiselect-trigger {
	box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
}

/* Dropdown */
.moto-search__multiselect-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 5px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1.5px solid #e5e7eb;
	border-radius: 9px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
	z-index: 200;
	max-height: 230px;
	overflow-y: auto;
	padding: 6px 0;
}

.moto-search__multiselect.is-open .moto-search__multiselect-dropdown {
	display: block;
}

.ms-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	font-size: 14px;
	color: #374151;
	cursor: pointer;
	transition: background .1s;
}

.ms-option:hover {
	background: #f3f4f6;
}

.ms-option input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #3b82f6;
	cursor: pointer;
	flex-shrink: 0;
	margin: 0;
}

.ms-empty {
	display: block;
	padding: 10px 14px;
	font-size: 13px;
	color: #9ca3af;
	font-style: italic;
}

/* ── Aktywne filtry — chipy pod nagłówkiem panelu ────────────────────────────── */

.cf__active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	padding: 0;
	margin-bottom: 16px;
}

.cf__chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 11px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 99px;
	font-size: 12.5px;
	font-weight: 500;
	color: #1d4ed8;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s;
}

.cf__chip:hover {
	background: #dbeafe;
	border-color: #93c5fd;
	color: #1e40af;
	text-decoration: none;
}

.cf__chip svg {
	flex-shrink: 0;
	opacity: .65;
}

.cf__chip:hover svg {
	opacity: 1;
}

/* ── Komunikat pustego formularza ────────────────────────────────────────────── */

.moto-search__empty-msg {
	font-size: 13px;
	font-weight: 500;
	color: #92400e;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 8px;
	padding: 9px 14px;
	margin-right: auto;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .2s, transform .2s;
	pointer-events: none;
}

.moto-search__empty-msg.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ── Przycisk wyszukaj ───────────────────────────────────────────────────────── */

.moto-search__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 14px;
	padding-top: 4px;
}

/* ── Responsywność ────────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
	.moto-search__row {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.moto-search {
		padding: 20px 16px 18px;
	}
	.moto-search__row {
		grid-template-columns: 1fr;
		gap: 12px;
		margin-bottom: 12px;
	}
	.moto-search__actions {
		justify-content: stretch;
	}
}
