.pkdev-search {
	max-width: var(--hv-max-screen-width);
	margin-inline: auto;
	padding-inline: var(--hv-space-m);
	padding-block: var(--hv-space-l);
}

.pkdev-search__grid {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: var(--hv-space-l);
}

.pkdev-search__sidebar {
	background: var(--hv-bg-cloud);
	border-radius: var(--hv-radius-m);
	padding: var(--hv-space-m);
	align-self: start;
	position: sticky;
	top: 130px;
	display: flex;
	flex-direction: column;
	gap: var(--hv-space-m);
}

.pkdev-search__label {
	display: block;
	font-family: var(--cf-font-family--mulish);
	font-weight: 500;
	font-size: var(--hv-text-s);
	color: var(--hv-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: var(--hv-space-2xs);
}

.pkdev-search__input {
	width: 100%;
	padding: var(--hv-space-xs) var(--hv-space-s);
	border: 1px solid var(--hv-border-primary);
	border-radius: var(--hv-radius-s);
	background: var(--hv-light);
	font-family: var(--cf-font-family--mulish);
	font-size: var(--hv-text-m);
	color: var(--hv-text-primary);
}

.pkdev-search__input:focus {
	outline: none;
	border-color: var(--hv-border-focus);
	box-shadow: 0 0 0 3px var(--hv-teal-20);
}

.pkdev-search__buttons {
	display: flex;
	flex-direction: column;
	gap: var(--hv-space-2xs);
}

.pkdev-search__btn {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--hv-space-xs) var(--hv-space-s);
	border: 1px solid var(--hv-border-primary);
	border-radius: var(--hv-radius-s);
	background: var(--hv-light);
	color: var(--hv-text-primary);
	font-family: var(--cf-font-family--mulish);
	font-weight: 500;
	font-size: var(--hv-text-s);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pkdev-search__btn:hover:not(:disabled) {
	background: var(--hv-navy);
	border-color: var(--hv-navy);
	color: var(--hv-text-inverse);
}

.pkdev-search__btn.is-active {
	background: var(--hv-teal);
	color: var(--hv-text-inverse);
	border-color: var(--hv-teal);
}

.pkdev-search__btn.is-active:hover {
	background: var(--hv-navy);
	border-color: var(--hv-navy);
}

.pkdev-search__btn.is-empty {
	opacity: 0.5;
	cursor: not-allowed;
}

.pkdev-search__btn-count {
	font-size: var(--hv-text-xs);
	opacity: 0.7;
	margin-left: var(--hv-space-2xs);
}

.pkdev-search__meta {
	margin-bottom: var(--hv-space-m);
	font-family: var(--cf-font-family--mulish);
	font-size: var(--hv-text-l);
	color: var(--hv-text-secondary);
}

.pkdev-search__results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--hv-space-m);
}

.pkdev-card {
	position: relative;
	background: var(--hv-light);
	border: 1px solid var(--hv-border-primary);
	border-radius: var(--hv-radius-m);
	padding: var(--hv-card-space);
	display: flex;
	flex-direction: column;
	gap: var(--hv-space-2xs);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pkdev-card:hover {
	box-shadow: var(--hv-shadow-m);
	transform: translateY(-2px);
}

.pkdev-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--hv-space-2xs);
}

.hv-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: var(--hv-radius-full);
	font-family: var(--cf-font-family--mulish);
	font-weight: 600;
	font-size: var(--hv-text-xs);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--hv-text-inverse);
	line-height: 1.4;
}

.hv-badge--pro {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: .35em .75em;
	background-color: var(--hv-gold);
	color: var(--hv-light);
	font-weight: 700;
	line-height: 1;
	letter-spacing: .05em;
	box-shadow: var(--hv-shadow-xs);
}

.pkdev-card__title {
	font-family: var(--cf-font-family--lora);
	font-weight: 600;
	font-size: var(--hv-text-l);
	color: var(--hv-text-heading);
	margin: 0;
	line-height: 1.3;
}

.pkdev-card__title a {
	color: inherit;
	text-decoration: none;
}

.pkdev-card__title a:hover {
	color: var(--hv-teal);
}

.pkdev-card__excerpt {
	font-family: var(--cf-font-family--mulish);
	font-size: var(--hv-text-s);
	color: var(--hv-text-primary);
	line-height: 1.5;
}

.pkdev-card__excerpt strong {
	color: var(--hv-teal);
	font-weight: 600;
}

.pkdev-card__link {
	font-family: var(--cf-font-family--mulish);
	font-weight: 600;
	font-size: var(--hv-text-s);
	color: var(--hv-teal);
	text-decoration: none;
	margin-top: auto;
	align-self: flex-start;
}

.pkdev-card__link:hover {
	color: var(--hv-teal-d-1);
}

.pkdev-search__loadmore {
	margin-top: var(--hv-space-l);
	text-align: center;
}

.pkdev-search__loadmore-btn {
	padding: var(--hv-space-xs) var(--hv-space-m);
	background: var(--hv-teal);
	color: var(--hv-text-inverse);
	border: none;
	border-radius: var(--hv-radius-s);
	font-family: var(--cf-font-family--mulish);
	font-weight: 600;
	font-size: var(--hv-text-m);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.pkdev-search__loadmore-btn:hover:not(:disabled) {
	background: var(--hv-teal-d-1);
}

.pkdev-search__loadmore-btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

.pkdev-search__empty {
	text-align: center;
	padding: var(--hv-space-xl) var(--hv-space-m);
	font-family: var(--cf-font-family--lora);
	font-style: italic;
	font-size: var(--hv-text-l);
	color: var(--hv-text-secondary);
}

.pkdev-card--skeleton {
	height: 200px;
	background: linear-gradient(90deg, var(--hv-navy-5) 25%, var(--hv-navy-10) 50%, var(--hv-navy-5) 75%);
	background-size: 200% 100%;
	animation: pkdev-shimmer 1.4s ease-in-out infinite;
}

@keyframes pkdev-shimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

@media (max-width: 767px) {
	.pkdev-search__grid {
		grid-template-columns: 1fr;
	}

	.pkdev-search__sidebar {
		position: static;
	}
}
/* ---------- Bottom bar while scrolling results (same look as the archive bar in finder.css) ---------- */
[x-cloak] {
	display: none;
}

.pkdev-search__bar {
	position: fixed;
	inset-block-end: -140px;
	left: var(--pkdev-bar-l, 0);
	width: var(--pkdev-bar-w, 100%);
	z-index: 940;
	display: flex;
	align-items: stretch;
	padding-block-end: env(safe-area-inset-bottom);
	background: var(--hv-navy);
	color: var(--hv-text-inverse);
	font-family: var(--cf-font-family--mulish);
	border-block-start: 3px solid var(--hv-olive);
	border-radius: var(--hv-radius-m) var(--hv-radius-m) 0 0;
	box-shadow: var(--hv-shadow-xl);
	visibility: hidden;
	/* Slides via the bottom offset, not `transform` (Chrome left the text blurred after a transform animation). */
	transition: inset-block-end 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.25s;
}

.pkdev-search__bar.is-visible {
	inset-block-end: 0;
	visibility: visible;
	transition: inset-block-end 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pkdev-search__bar button {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 60px;
	margin: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.pkdev-search__bar button:hover {
	opacity: 0.85;
}

.pkdev-search__bar button:active {
	opacity: 0.7;
}

.pkdev-search__bar button:focus-visible {
	outline: 2px solid var(--hv-gold);
	outline-offset: -4px;
}

.pkdev-search__bar-main {
	flex: 1 1 auto;
	min-width: 0;
	padding: 8px 20px;
	text-align: start;
	font-family: var(--cf-font-family--mulish);
}

.pkdev-search__bar-main svg {
	flex: none;
	color: var(--hv-light-sage);
}

.pkdev-search__bar-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pkdev-search__bar-title {
	font-size: var(--hv-text-s);
	font-weight: 700;
	line-height: 1.2;
}

.pkdev-search__bar-sub {
	font-size: var(--hv-text-xs);
	line-height: 1.3;
	color: var(--hv-navy-l-4);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pkdev-search__bar-sub:empty {
	display: none;
}

.pkdev-search__bar .pkdev-search__bar-filters {
	flex: none;
	padding: 0 18px;
	border-inline-start: 1px solid hsla(0, 0%, 100%, 0.18);
	font-family: var(--cf-font-family--mulish);
	font-weight: 700;
	font-size: var(--hv-text-s);
}

html.pkdev-search-bar-on .hv-consent-fab {
	bottom: calc(76px + env(safe-area-inset-bottom));
}

/* ---------- Mobile: the sidebar opens as a bottom sheet from the bar ---------- */
.pkdev-search__sheet-head,
.pkdev-search__sheet-show {
	display: none;
}

.pkdev-search__overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: var(--hv-bg-overlay);
}

html.pkdev-search-lock {
	overflow: hidden;
}

@media (max-width: 767px) {
	.pkdev-search__bar-main {
		padding-inline: 14px 8px;
		gap: 8px;
	}

	.pkdev-search__bar .pkdev-search__bar-filters {
		padding: 0 12px;
	}

	.pkdev-search__sidebar.is-sheet {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 1001;
		max-height: 85dvh;
		overflow-y: auto;
		overscroll-behavior: contain;
		border-radius: var(--hv-radius-m) var(--hv-radius-m) 0 0;
		box-shadow: var(--hv-shadow-xl);
		padding-block-end: calc(var(--hv-space-m) + env(safe-area-inset-bottom));
		animation: pkdev-sheet-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
	}

	.pkdev-search__sidebar.is-sheet .pkdev-search__sheet-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.pkdev-search__sheet-title {
		font-family: var(--cf-font-family--lora);
		font-size: var(--hv-text-xl);
		font-weight: 600;
		color: var(--hv-text-heading);
	}

	.pkdev-search__sheet-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		border: 1px solid var(--hv-border-secondary);
		border-radius: var(--hv-radius-full);
		background: var(--hv-bg-primary);
		color: var(--hv-text-heading);
		cursor: pointer;
		transition: opacity 0.15s ease;
	}

	.pkdev-search__sheet-close:hover {
		opacity: 0.85;
	}

	.pkdev-search__sheet-close:focus-visible {
		outline: 2px solid var(--hv-border-focus);
		outline-offset: 2px;
	}

	.pkdev-search__sidebar.is-sheet .pkdev-search__sheet-show {
		display: block;
		width: 100%;
		min-height: 48px;
		padding: var(--hv-space-xs) var(--hv-space-m);
		border: 0;
		border-radius: var(--hv-radius-s);
		background: var(--hv-navy);
		color: var(--hv-text-inverse);
		font-family: var(--cf-font-family--mulish);
		font-weight: 600;
		font-size: var(--hv-text-m);
		cursor: pointer;
		transition: opacity 0.15s ease;
	}

	.pkdev-search__sheet-show:hover {
		opacity: 0.9;
	}

	.pkdev-search__sheet-show:focus-visible {
		outline: 2px solid var(--hv-border-focus);
		outline-offset: 2px;
	}
}

@keyframes pkdev-sheet-in {
	from {
		transform: translateY(100%);
	}

	to {
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pkdev-search__bar,
	.pkdev-search__bar.is-visible,
	.pkdev-search__sidebar.is-sheet {
		transition: none;
		animation: none;
	}
}

@media print {
	.pkdev-search__bar,
	.pkdev-search__overlay {
		display: none;
	}
}

/* ---------- Card body (one per kind: post / link / file) keeps the card's column layout ---------- */
.pkdev-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--hv-space-2xs);
}

.pkdev-card__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: color 0.15s ease;
}

.pkdev-card__link:focus-visible {
	outline: 2px solid var(--hv-border-focus);
	outline-offset: 2px;
	border-radius: var(--hv-radius-xs);
}

.pkdev-card__link:active {
	transform: translateY(1px);
}

/* Soubor: download button styled as the card's text link */
.pkdev-card__download {
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.pkdev-card__download:hover {
	color: var(--hv-teal-d-1);
}

.pkdev-card__download:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* Soubor access badge for registered users (PRO uses .hv-badge--pro) */
.hv-badge--reg {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: .35em .75em;
	background-color: var(--hv-sage);
	color: var(--hv-text-inverse);
	font-weight: 700;
	line-height: 1;
	letter-spacing: .05em;
	box-shadow: var(--hv-shadow-xs);
}

.pkdev-search__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* „Načíst další · zbývá N“ */
.pkdev-search__loadmore-count {
	font-size: var(--hv-text-s);
	font-weight: 500;
	opacity: 0.85;
}

.pkdev-search__loadmore-count::before {
	content: '\00B7'; /* escaped: the file is served without a charset */
	margin-inline-end: 6px;
}
