/* =========================================================
   ZTM Kielce — Wyniki wyszukiwania (search.php)
   assets/css/search-results.css
   Korzysta z tych samych zmiennych --ztm-* co header.css
   i widget-rozklady-jazdy-full.css, żeby strona wyników
   wyglądała spójnie z resztą serwisu, a nie jak goły HTML.
   ========================================================= */

/* ── Nagłówek strony ── */
.ztm-page-title {
	font-family: var(--ztm-font);
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 800;
	color: #1c2230;
	line-height: 1.3;
	margin: 0 0 6px;
}

.ztm-page-title span {
	color: var(--ztm-navy, #00399c);
}

.ztm-search-count {
	font-family: var(--ztm-font);
	font-size: 15px;
	color: var(--ztm-text-muted, #6b7280);
	margin: 0 0 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--ztm-border-grey, #e1e5ea);
}

.ztm-search-count strong {
	color: #1c2230;
	font-weight: 700;
}

/* ── Lista wyników ── */
.ztm-search-results {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ztm-search-item {
	background: var(--ztm-white, #fff);
	border: 1px solid var(--ztm-border-grey, #e1e5ea);
	border-radius: 12px;
	padding: 20px 22px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ztm-search-item:hover {
	border-color: var(--ztm-navy, #00399c);
	box-shadow: var(--ztm-elevation-1, 0 2px 10px rgba(20, 30, 60, 0.08));
	transform: translateY(-1px);
}

.ztm-search-item-title {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
}

.ztm-search-item-title a {
	color: #1c2230;
	text-decoration: none;
}

.ztm-search-item-title a:hover,
.ztm-search-item-title a:focus-visible {
	color: var(--ztm-navy, #00399c);
	text-decoration: underline;
}

.ztm-search-item-meta {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ztm-text-muted, #6b7280);
}

.ztm-search-item-meta svg {
	width: 15px;
	height: 15px;
	stroke: currentColor;
	flex-shrink: 0;
}

.ztm-search-item-excerpt {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.6;
	color: #3b4252;
}

.ztm-search-item-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--ztm-navy, #00399c);
	text-decoration: none;
}

.ztm-search-item-link svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	transition: transform 0.15s ease;
}

.ztm-search-item-link:hover svg,
.ztm-search-item-link:focus-visible svg {
	transform: translateX(3px);
}

.ztm-search-item-link:hover,
.ztm-search-item-link:focus-visible {
	text-decoration: underline;
}

/* ── Paginacja (paginate_links() core WP — klasy .page-numbers) ── */
.ztm-search-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 28px;
}

.ztm-search-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--ztm-border-grey, #e1e5ea);
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	color: #1c2230;
	text-decoration: none;
	background: var(--ztm-white, #fff);
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ztm-search-pagination a.page-numbers:hover,
.ztm-search-pagination a.page-numbers:focus-visible {
	border-color: var(--ztm-navy, #00399c);
	color: var(--ztm-navy, #00399c);
}

.ztm-search-pagination .page-numbers.current {
	background: var(--ztm-navy, #00399c);
	border-color: var(--ztm-navy, #00399c);
	color: var(--ztm-white, #fff);
}

.ztm-search-pagination .page-numbers.dots {
	border: none;
	background: none;
	color: var(--ztm-text-muted, #6b7280);
}

/* ── Brak wyników ── */
.ztm-search-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding: 32px 28px;
	background: #f7f8fb;
	border: 1px solid var(--ztm-border-grey, #e1e5ea);
	border-radius: 12px;
}

.ztm-search-empty-icon {
	width: 34px;
	height: 34px;
	stroke: var(--ztm-text-muted, #6b7280);
	margin-bottom: 10px;
}

.ztm-search-empty-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #1c2230;
}

.ztm-search-empty-title strong {
	color: var(--ztm-navy, #00399c);
}

.ztm-search-empty-hint {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--ztm-text-muted, #6b7280);
}

/* Formularz w bloku "brak wyników" — nie zakładamy dokładnych klas
   z searchform.php (rdzeń WP i motyw różnie je nazywają), więc celujemy
   ogólnie po typach pól, żeby zadziałało niezależnie od markupu. */
.ztm-search-empty-form form {
	display: flex;
	width: 100%;
	max-width: 420px;
	gap: 8px;
}

.ztm-search-empty-form input[type="search"],
.ztm-search-empty-form input[type="text"] {
	flex: 1;
	min-width: 0;
	height: 46px;
	padding: 0 16px;
	border: 1px solid var(--ztm-border-grey, #e1e5ea);
	border-radius: 8px;
	font-family: var(--ztm-font);
	font-size: 15px;
	color: #1c2230;
	background: var(--ztm-white, #fff);
}

.ztm-search-empty-form input[type="search"]:focus,
.ztm-search-empty-form input[type="text"]:focus {
	outline: none;
	border-color: var(--ztm-navy, #00399c);
	box-shadow: 0 0 0 3px rgba(0, 57, 156, 0.12);
}

.ztm-search-empty-form button,
.ztm-search-empty-form input[type="submit"] {
	flex-shrink: 0;
	height: 46px;
	padding: 0 22px;
	border: none;
	border-radius: 8px;
	background: var(--ztm-navy, #00399c);
	color: var(--ztm-white, #fff);
	font-family: var(--ztm-font);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}

.ztm-search-empty-form button:hover,
.ztm-search-empty-form input[type="submit"]:hover {
	background: #002c7a;
}

/* ── Wysokokontrastowy motyw (spójnie z .ztm-hc w search-live.css) ── */
body.ztm-hc .ztm-search-item {
	background: #000;
	border-color: #fff;
}
body.ztm-hc .ztm-search-item-title a { color: #fff; }
body.ztm-hc .ztm-search-item-title a:hover { color: #ff0; }
body.ztm-hc .ztm-search-item-excerpt { color: #eee; }
body.ztm-hc .ztm-search-pagination .page-numbers {
	background: #000;
	border-color: #fff;
	color: #fff;
}
body.ztm-hc .ztm-search-pagination .page-numbers.current {
	background: #ff0;
	border-color: #ff0;
	color: #000;
}
body.ztm-hc .ztm-search-empty {
	background: #000;
	border-color: #fff;
}
body.ztm-hc .ztm-search-empty-title { color: #fff; }
body.ztm-hc .ztm-search-empty-form input[type="search"] {
	background: #000;
	border-color: #fff;
	color: #fff;
}
body.ztm-hc .ztm-search-empty-form button {
	background: #ff0;
	color: #000;
}

/* ── Mobile ── */
@media (max-width: 640px) {
	.ztm-search-item {
		padding: 16px 18px;
	}
	.ztm-search-empty-form form {
		flex-direction: column;
		max-width: none;
	}
}