/* ═══ Wyszukiwanie szczegółowe + synchronizacja z filtrami listingu ═══
   Tokeny spójne z kreatorem (/dodaj, kreator.css) i .listing-filters (style.css) */

.srch-page {
	--srch-brand: #7b34a0;
	--srch-brand-dark: #4b3894;
	--srch-brand-light: #efeafb;
	--srch-cta-grad: linear-gradient(135deg, #6a2485 0%, #8e2aa8 100%);
	--srch-card: #ffffff;
	--srch-input-bg: #fbfafd;
	--srch-subtle: #f1ecf8;
	--srch-border: rgba(186, 167, 208, 0.34);
	--srch-border-strong: #dcd2ec;
	--srch-text: #3c1d56;
	--srch-text-2: #7c7394;
	--srch-label: #6a4a88;
	--srch-r-card: 22px;
	--srch-r-ctl: 16px;
	--srch-gap: 16px;

	max-width: 980px;
	margin: 0 auto;
	padding: 20px 16px 110px;
	color: var(--srch-text);
	font-size: 14px;
}

/* ── Nagłówek ── */
.srch-head { margin-bottom: 20px; }
.srch-title {
	font-size: 24px;
	line-height: 1.25;
	font-weight: 800;
	color: var(--srch-text);
	margin: 0 0 10px;
}
.srch-lead { color: var(--srch-text-2); font-size: 14px; line-height: 1.55; margin: 0; max-width: 720px; }
.srch-lead strong { color: var(--srch-text); }

/* ── Karty-sekcje ── */
.srch-card {
	background: var(--srch-card);
	border: 1px solid var(--srch-border);
	border-radius: var(--srch-r-card);
	box-shadow: 0 10px 22px rgba(72, 32, 90, 0.04);
	padding: 18px 16px;
	margin-bottom: var(--srch-gap);
}
.srch-card__title {
	display: flex; align-items: center; gap: 10px;
	font-size: 16px; font-weight: 700; color: var(--srch-text);
	margin: 0 0 16px;
}
.srch-card__dot {
	display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; flex: 0 0 26px;
	border-radius: 50%;
	background: var(--srch-brand-light); color: var(--srch-brand-dark);
	font-size: 13px; font-weight: 800;
}

/* ── Pola / etykiety ── */
.srch-field { margin-bottom: var(--srch-gap); min-width: 0; position: relative; }
.srch-field:last-child { margin-bottom: 0; }
.srch-label {
	display: block; margin: 0 0 8px;
	color: var(--srch-label);
	font-size: 11px; font-weight: 800;
	letter-spacing: 0.06em; text-transform: uppercase;
}
.srch-label__note { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--srch-text-2); }
.srch-hint { display: block; font-size: 12px; color: var(--srch-text-2); margin-top: 8px; }
.srch-hint--save { margin: 0 0 12px; font-size: 13px; line-height: 1.5; }
.srch-hint--save a { color: var(--srch-brand); font-weight: 700; }

.srch-grid2 { display: grid; grid-template-columns: 1fr; gap: var(--srch-gap); margin-bottom: var(--srch-gap); }
.srch-grid3 { display: grid; grid-template-columns: 1fr; gap: var(--srch-gap); margin-bottom: var(--srch-gap); }
.srch-grid2 .srch-field, .srch-grid3 .srch-field { margin-bottom: 0; }

/* ── Kontrolki ── */
.srch-input, .srch-select {
	width: 100%;
	min-height: 48px;
	border: 1px solid var(--srch-border);
	border-radius: var(--srch-r-ctl);
	background: #fff;
	color: var(--srch-text);
	font-size: 14px; font-weight: 600;
	padding: 0 16px;
	outline: 0;
	-moz-appearance: textfield;
}
.srch-input::-webkit-outer-spin-button, .srch-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.srch-input::placeholder { color: #a99cc0; font-weight: 500; }
.srch-input:focus, .srch-select:focus {
	border-color: rgba(116, 63, 150, 0.52);
	box-shadow: 0 0 0 4px rgba(142, 42, 168, 0.10);
}
.srch-input--sm { min-height: 42px; max-width: 90px; padding: 0 12px; }

/* ── Zakresy od–do ── */
.srch-range { display: flex; align-items: center; gap: 10px; }
.srch-range .srch-input { flex: 1 1 0; min-width: 0; }
.srch-range__sep { color: #8e78a1; font-weight: 800; flex: 0 0 auto; }
.srch-range__unit, .srch-range__label { color: var(--srch-text-2); font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.srch-range--inline { margin-top: 12px; flex-wrap: wrap; }

/* ── Chipy (label > input ukryty + span) ── */
.srch-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.srch-chip { position: relative; display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; }
.srch-chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.srch-chip span {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 40px; padding: 0 16px;
	border-radius: 999px;
	border: 1px solid var(--srch-border);
	background: #fff; color: #5a3575;
	font-size: 13px; font-weight: 700; white-space: nowrap;
	transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.srch-chip input:focus-visible + span { outline: 2px solid var(--srch-brand); outline-offset: 2px; }
.srch-chip input:checked + span {
	border-color: rgba(116, 63, 150, 0.42);
	background: linear-gradient(135deg, rgba(101, 43, 129, 0.11) 0%, rgba(142, 42, 168, 0.13) 100%);
	color: #3f1657;
	box-shadow: 0 8px 18px rgba(115, 32, 145, 0.08);
	font-weight: 800;
}

/* ── Przełączniki ── */
.srch-toggles { display: flex; flex-wrap: wrap; gap: 12px; }
.srch-toggle {
	position: relative; display: inline-flex; align-items: center;
	min-height: 46px; padding: 0 16px 0 54px;
	border-radius: 18px;
	border: 1px solid var(--srch-border);
	background: #fff; color: #4d2a67;
	font-size: 13px; font-weight: 700; cursor: pointer;
}
.srch-toggle input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.srch-toggle span::before {
	content: ""; position: absolute; left: 16px; top: 50%;
	width: 28px; height: 16px; margin-top: -8px; border-radius: 999px;
	background: rgba(125, 96, 150, 0.28);
	transition: background 0.18s ease;
}
.srch-toggle span::after {
	content: ""; position: absolute; left: 18px; top: 50%;
	width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
	background: #fff; box-shadow: 0 2px 6px rgba(47, 24, 77, 0.18);
	transition: transform 0.18s ease;
}
.srch-toggle input:checked + span::before { background: linear-gradient(135deg, #d81b60 0%, #7e56a8 100%); }
.srch-toggle input:checked + span::after { transform: translateX(12px); }

/* ── Checkboxy w siatce usług ── */
.srch-collapse {
	border: 1px solid var(--srch-border);
	border-radius: var(--srch-r-ctl);
	background: #fff;
}
.srch-collapse summary {
	list-style: none;
	display: flex; align-items: center; gap: 10px;
	min-height: 48px; padding: 0 44px 0 16px;
	font-size: 14px; font-weight: 700; color: var(--srch-text);
	cursor: pointer; position: relative;
}
.srch-collapse summary::-webkit-details-marker { display: none; }
.srch-collapse summary::after {
	content: ""; position: absolute; right: 18px; top: 50%;
	width: 9px; height: 9px; margin-top: -6px;
	border-right: 2px solid #6e4c8b; border-bottom: 2px solid #6e4c8b;
	transform: rotate(45deg); transition: transform 0.18s ease;
}
.srch-collapse[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.srch-collapse[open] summary { border-bottom: 1px solid var(--srch-border); }
.srch-collapse__grid {
	display: grid; grid-template-columns: 1fr;
	gap: 2px; padding: 10px;
	max-height: 320px; overflow-y: auto;
}
.srch-check {
	display: flex; align-items: center; gap: 10px;
	min-height: 40px; padding: 0 10px;
	border-radius: 12px; cursor: pointer;
	color: var(--srch-text); font-size: 13px; font-weight: 600;
}
.srch-check:hover { background: rgba(121, 79, 157, 0.06); }
.srch-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--srch-brand); flex: 0 0 18px; }
.srch-badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 24px; height: 24px; padding: 0 8px;
	border-radius: 999px;
	background: var(--srch-brand-light); color: var(--srch-brand-dark);
	font-size: 12px; font-weight: 800;
}

/* ── Autouzupełnianie miasta ── */
.srch-autocomplete {
	position: absolute; z-index: 40; left: 0; right: 0; top: 100%;
	background: #fff; border: 1px solid var(--srch-border-strong);
	border-radius: var(--srch-r-ctl); margin: 6px 0 0; padding: 6px; list-style: none;
	max-height: 260px; overflow-y: auto;
	box-shadow: 0 24px 40px rgba(72, 32, 90, 0.14);
}
.srch-autocomplete li { padding: 11px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.srch-autocomplete li:hover, .srch-autocomplete li.is-focused { background: var(--srch-brand-light); }
.srch-autocomplete li .under { display: block; font-size: 12px; color: var(--srch-text-2); font-weight: 500; }

/* ── Zapis wyszukiwania ── */
.srch-save-row { display: flex; flex-direction: column; gap: 10px; }

/* ── Przyciski / pasek akcji ── */
.srch-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 52px; padding: 0 26px;
	border-radius: 999px; border: 1px solid transparent;
	font-size: 15px; font-weight: 800; cursor: pointer;
	text-decoration: none; text-align: center;
	touch-action: manipulation;
}
.srch-btn:focus-visible { outline: 2px solid var(--srch-brand); outline-offset: 2px; }
.srch-btn--primary {
	background: var(--srch-cta-grad); color: #fff;
	box-shadow: 0 14px 26px rgba(115, 32, 145, 0.22);
	flex: 1 1 auto;
}
.srch-btn--primary:hover { filter: brightness(1.06); color: #fff; }
.srch-btn--ghost { background: #fff; color: var(--srch-text-2); border-color: var(--srch-border); flex: 0 0 auto; }
.srch-btn--ghost:hover { color: var(--srch-text); }
.srch-btn--outline { background: #fff; color: var(--srch-brand-dark); border-color: rgba(116, 63, 150, 0.42); min-height: 48px; }
.srch-btn--outline:hover { background: var(--srch-brand-light); color: var(--srch-brand-dark); }

.srch-actionbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
	display: flex; gap: 10px; align-items: center;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	border-top: 1px solid var(--srch-border);
	box-shadow: 0 -10px 30px rgba(72, 32, 90, 0.10);
}
.srch-actionbar__count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 22px; height: 22px; padding: 0 7px;
	border-radius: 999px; background: rgba(255, 255, 255, 0.24);
	font-size: 12px; font-weight: 800;
}

/* ── SEO: miasta + treść ── */
.srch-seo { margin-top: 28px; }
.srch-seo__title { font-size: 17px; font-weight: 800; color: var(--srch-text); margin: 0 0 14px; }
.srch-seo--text p { color: var(--srch-text-2); font-size: 13px; line-height: 1.6; max-width: 760px; }
.srch-seo--text a { color: var(--srch-brand); font-weight: 700; }
.srch-citylinks { display: flex; flex-wrap: wrap; gap: 8px; }
.srch-citylink {
	display: inline-flex; align-items: center; gap: 7px;
	min-height: 38px; padding: 0 14px;
	border-radius: 999px; border: 1px solid var(--srch-border);
	background: #fff; color: #5a3575;
	font-size: 13px; font-weight: 700; text-decoration: none;
	transition: border-color 0.18s ease, background 0.18s ease;
}
.srch-citylink:hover { border-color: rgba(116, 63, 150, 0.42); background: var(--srch-brand-light); color: var(--srch-brand-dark); }
.srch-citylink span { font-size: 11px; font-weight: 800; color: #a08cb5; }

/* ── Aktywne filtry na listingu (chipy z ×) ── */
.srch-active-filters {
	display: flex; flex-wrap: wrap; gap: 8px;
	margin: 12px 0 4px;
}
.srch-active-filters__chip {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 36px; padding: 0 8px 0 14px;
	border-radius: 999px;
	border: 1px solid rgba(116, 63, 150, 0.34);
	background: linear-gradient(135deg, rgba(101, 43, 129, 0.09) 0%, rgba(142, 42, 168, 0.11) 100%);
	color: #3f1657; font-size: 12px; font-weight: 800;
	text-decoration: none; white-space: nowrap;
}
.srch-active-filters__chip b { font-weight: 600; color: #6a4a88; }
.srch-active-filters__x {
	display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 50%;
	background: rgba(116, 63, 150, 0.14);
	color: #4b2b66; font-size: 13px; font-weight: 800; line-height: 1;
}
.srch-active-filters__chip:hover .srch-active-filters__x { background: rgba(116, 63, 150, 0.28); color: #fff; }
.srch-active-filters__clear {
	display: inline-flex; align-items: center;
	min-height: 36px; padding: 0 12px;
	color: #8a729f; font-size: 12px; font-weight: 700; text-decoration: underline;
}

/* ── Link „wyszukiwanie szczegółowe” w filtrach listingu ── */
.listing-filters__morelink {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 24px; margin-right: auto;
	color: #7b34a0; font-size: 12px; font-weight: 800; text-decoration: none;
}
.listing-filters__morelink:hover { color: #4b3894; text-decoration: underline; }
.listing-filters__footer { gap: 12px; }

.srch-offcanvas-morelink {
	display: block;
	margin: 0 0 14px;
	padding: 12px 16px;
	border-radius: 16px;
	border: 1px dashed rgba(116, 63, 150, 0.42);
	background: #f6f0fc;
	color: #7b34a0;
	font-size: 13px; font-weight: 800; text-decoration: none; text-align: center;
}
.srch-offcanvas-morelink:hover { color: #4b3894; }

/* ═══ Desktop ═══ */
@media (min-width: 768px) {
	.srch-page { padding: 28px 24px 40px; font-size: 15px; }
	.srch-title { font-size: 30px; }
	.srch-lead { font-size: 15px; }
	.srch-card { padding: 24px; }
	.srch-card__title { font-size: 18px; }
	.srch-grid2 { grid-template-columns: 1fr 1fr; }
	.srch-grid3 { grid-template-columns: 1fr 1fr 1fr; }
	.srch-collapse__grid { grid-template-columns: repeat(3, 1fr); max-height: 380px; }
	.srch-save-row { flex-direction: row; }
	.srch-save-row .srch-input { max-width: 420px; }
	.srch-actionbar {
		position: sticky; bottom: 16px;
		border: 1px solid var(--srch-border);
		border-radius: var(--srch-r-card);
		padding: 12px 16px;
		justify-content: flex-end;
	}
	.srch-btn--primary { flex: 0 0 auto; min-width: 260px; }
}

@media (min-width: 1200px) {
	.srch-collapse__grid { grid-template-columns: repeat(4, 1fr); }
}
