/* ── Archive Place — /places/ ─────────────────────────────────────────────── */

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.ap-hero {
	background: #0d0d0d;
	border-bottom: 1px solid #18181b;
	padding: 3.5rem 2rem 3rem;
}

.ap-hero__inner {
	max-width: 1280px;
	margin: 0 auto;
}

.ap-hero__eyebrow {
	display: block;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #ef4444;
	margin-bottom: 0.75rem;
}

.ap-hero__title {
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	color: #fafafa;
	margin: 0 0 0.75rem;
	line-height: 1.05;
}

.ap-hero__meta {
	font-size: 0.9375rem;
	color: #52525b;
	margin: 0;
}

.ap-hero__meta strong {
	color: #a1a1aa;
	font-weight: 600;
}

/* ── Filter toolbar ─────────────────────────────────────────────────────────── */

.ap-toolbar {
	background: #111113;
	border-bottom: 1px solid #1c1c1f;
	padding: 0.875rem 2rem;
	position: sticky;
	top: 0;
	z-index: 100;
}

.ap-toolbar__inner {
	max-width: 1280px;
	margin: 0 auto;
}

.ap-filters {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

/* Severity pill strip — single scrollable row */
.ap-filters__pills {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #3f3f46 transparent;
	padding-bottom: 3px; /* prevent thumb from being clipped */
}

.ap-filters__pills::-webkit-scrollbar        { height: 4px; }
.ap-filters__pills::-webkit-scrollbar-track  { background: transparent; }
.ap-filters__pills::-webkit-scrollbar-thumb  { background-color: #3f3f46; border-radius: 999px; }
.ap-filters__pills::-webkit-scrollbar-thumb:hover { background-color: #ef4444; }

.ap-filters__label {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #3f3f46;
	white-space: nowrap;
}

.ap-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	border: 1px solid #27272a;
	background: transparent;
	color: #71717a;
	text-decoration: none;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
	white-space: nowrap;
	line-height: 1;
}

.ap-pill:hover {
	color: #fafafa;
	border-color: #3f3f46;
}

.ap-pill--active {
	background: #18181b;
	border-color: #3f3f46;
	color: #fafafa;
}

/* Severity pill colours when active */
.ap-pill--bad.ap-pill--active       { border-color: rgba(251,191,36,0.4);  color: #fbbf24; background: rgba(161,113,0,0.15); }
.ap-pill--very-bad.ap-pill--active  { border-color: rgba(251,146,60,0.4);  color: #fb923c; background: rgba(154,52,0,0.15); }
.ap-pill--terrible.ap-pill--active  { border-color: rgba(248,113,113,0.4); color: #f87171; background: rgba(153,27,27,0.15); }

/* Dropdowns group */
.ap-filters__selects {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-left: auto;
}

/* ── Custom dropdown ─────────────────────────────────────────────────────── */

.ap-dropdown {
	position: relative;
}

/* Trigger button — looks like the old <select> */
.ap-dropdown__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	font-family: inherit;
	font-weight: 500;
	color: #a1a1aa;
	background: #18181b;
	border: 1px solid #27272a;
	border-radius: 8px;
	padding: 0.45rem 0.75rem;
	cursor: pointer;
	white-space: nowrap;
	transition: border-color 0.15s, color 0.15s;
	user-select: none;
}

.ap-dropdown__trigger:hover,
.ap-dropdown[data-open] .ap-dropdown__trigger {
	border-color: #3f3f46;
	color: #fafafa;
}

.ap-dropdown__chevron {
	flex-shrink: 0;
	color: #52525b;
	transition: transform 0.2s;
}

.ap-dropdown[data-open] .ap-dropdown__chevron {
	transform: rotate(180deg);
}

/* Panel */
.ap-dropdown__panel {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 300;
	min-width: 200px;
	background: #111113;
	border: 1px solid #27272a;
	border-radius: 12px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.04);
	padding: 4px;
	animation: ap-dd-in 0.12s ease;
}

@keyframes ap-dd-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Scrollable area with styled scrollbar */
.ap-dropdown__scroll {
	max-height: 280px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #3f3f46 transparent;
}

.ap-dropdown__scroll::-webkit-scrollbar       { width: 4px; }
.ap-dropdown__scroll::-webkit-scrollbar-track { background: transparent; }
.ap-dropdown__scroll::-webkit-scrollbar-thumb {
	background-color: #3f3f46;
	border-radius: 999px;
}
.ap-dropdown__scroll::-webkit-scrollbar-thumb:hover { background-color: #ef4444; }

/* Group header */
.ap-dropdown__group {
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #3f3f46;
	padding: 0.6rem 0.625rem 0.25rem;
	pointer-events: none;
	user-select: none;
}

.ap-dropdown__group:first-child { padding-top: 0.25rem; }

/* Option rows */
.ap-dropdown__option {
	display: block;
	width: 100%;
	text-align: left;
	font-size: 0.8125rem;
	font-family: inherit;
	font-weight: 400;
	color: #a1a1aa;
	background: transparent;
	border: none;
	border-radius: 7px;
	padding: 0.45rem 0.625rem;
	cursor: pointer;
	transition: background 0.1s, color 0.1s;
	white-space: nowrap;
}

.ap-dropdown__option:hover {
	background: #1c1c1f;
	color: #fafafa;
}

.ap-dropdown__option--selected {
	color: #ef4444;
	font-weight: 600;
}

.ap-clear {
	font-size: 0.75rem;
	font-weight: 600;
	color: #52525b;
	text-decoration: none;
	padding: 0.375rem 0.625rem;
	border-radius: 6px;
	transition: color 0.15s, background 0.15s;
	white-space: nowrap;
}

.ap-clear:hover { color: #ef4444; background: rgba(239,68,68,0.06); }

/* ── Results area ───────────────────────────────────────────────────────────── */

.ap-results {
	background: #0a0a0a;
	padding: 2.5rem 2rem 6rem;
}

.ap-results__inner {
	max-width: 1280px;
	margin: 0 auto;
}

.ap-count {
	font-size: 0.8125rem;
	color: #52525b;
	margin: 0 0 1.5rem;
}

.ap-count strong { color: #a1a1aa; }

/* ── Uniform card grid (overrides the magazine layout from front-page.css) ── */

.ap-grid {
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: none;
	grid-auto-rows: 260px;
}

/* Every card is the same size — no featured span */
.ap-grid .place-card {
	grid-column: auto;
	grid-row: auto;
}

/* Show excerpt on every card */
.ap-grid .place-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.srp-pagination {
	margin-top: 3rem;
}

.srp-pagination .nav-links {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	flex-wrap: wrap;
}

.srp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 0.625rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	color: #71717a;
	border: 1px solid #27272a;
	background: transparent;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.srp-pagination .page-numbers:hover,
.srp-pagination .page-numbers:focus-visible {
	color: #ef4444;
	border-color: rgba(239, 68, 68, 0.4);
	background: rgba(239, 68, 68, 0.06);
}

.srp-pagination .page-numbers.current {
	color: #fff;
	background: #ef4444;
	border-color: #ef4444;
}

.srp-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	cursor: default;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
	.ap-grid {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 220px;
	}
}

@media (max-width: 768px) {
	.ap-hero       { padding: 2rem 1.25rem 1.75rem; }
	.ap-toolbar    { padding: 0.75rem 1.25rem; position: static; }
	.ap-results    { padding: 1.5rem 1.25rem 4rem; }

	.ap-filters {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.ap-filters__selects {
		margin-left: 0;
		width: 100%;
	}

	.ap-select { flex: 1; min-width: 0; }
}

@media (max-width: 600px) {
	.ap-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: 220px;
		gap: 0.75rem;
	}
}

@media (max-width: 480px) {
	.ap-pill { font-size: 0.6875rem; padding: 0.3rem 0.6rem; }
}

