/* ==================================================
   Visit Bedford Search
   Stage 1 results-page redesign
================================================== */

/* --------------------------------------------------
   Existing homepage search
-------------------------------------------------- */

.vb-search {
	position: relative;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
}

.vb-search__input {
	width: 100%;
	height: 76px;
	padding: 0 200px 0 28px;
	border: none;
	border-radius: 20px;
	background: #fff;
	font-size: 1.2rem;
	color: #111827;
	box-shadow: 0 18px 45px rgba(0,0,0,.18);
	transition: .25s ease;
	box-sizing: border-box;
}

.vb-search__input:focus {
	outline: none;
	box-shadow:
		0 0 0 4px rgba(37,99,235,.18),
		0 18px 45px rgba(0,0,0,.18);
}

.vb-search__input::placeholder {
	color: #6b7280;
	opacity: 1;
}

.vb-search__button {
	position: absolute;
	top: 6px;
	right: 6px;
	height: 64px;
	padding: 0 34px;
	border: none;
	border-radius: 14px;
	background: #0057b8;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: .25s ease;
}

.vb-search__button:hover {
	background: #00479a;
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(0,87,184,.35);
}

.vb-search__results {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	background: #fff;
	border-radius: 14px;
	overflow: visible;
	box-shadow: 0 15px 40px rgba(0,0,0,.15);
	display: none;
	z-index: 99999;
}

.vb-search__results.active {
	display: block;
}

.vb-search__icon {
	display: none !important;
}

.vb-search__result {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 12px 16px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f1f1f1;
	transition: background .2s ease;
	cursor: pointer;
}

.vb-search__result:last-child {
	border-bottom: none;
}

.vb-search__result:hover {
	background: #f8f9fa;
}

.vb-search__image {
	width: 64px;
	height: 64px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
	background: #f3f3f3;
}

.vb-search__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vb-search__placeholder {
	width: 100%;
	height: 100%;
	background: #e5e7eb;
}

.vb-search__content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.vb-search__title {
	font-size: 16px;
	font-weight: 600;
	color: #1f2937;
	margin-bottom: 4px;
	line-height: 1.3;
}

.vb-search__meta {
	font-size: 13px;
	color: #6b7280;
	line-height: 1.4;
}


/* --------------------------------------------------
   Results hero
-------------------------------------------------- */

.vb-search-results-hero {
	padding: 54px 0 34px;
	background: #f8fafc;
}

.vb-search-results-hero-grid {
	display: grid;
	grid-template-columns: minmax(280px, .9fr) minmax(420px, 1.4fr);
	align-items: center;
	gap: 50px;
}

.vb-search-results-heading h1 {
	margin: 0 0 8px;
	color: #111827;
	font-size: clamp(2.2rem, 4vw, 3.5rem);
	line-height: 1.08;
	letter-spacing: -.025em;
}

.vb-search-results-heading p {
	margin: 0;
	color: #64748b;
	font-size: 1.05rem;
}

.vb-search-results-search {
	width: 100%;
}

.vb-search-results-search .vb-search {
	max-width: none;
}

.vb-search-results-search .vb-search__input {
	height: 68px;
	padding-left: 28px;
	padding-right: 190px;
	border-radius: 18px;
	box-shadow: 0 12px 35px rgba(15,23,42,.12);
}

.vb-search-results-search .vb-search__button {
	height: 56px;
	background: #0057b8;
	border-radius: 12px;
}

.vb-search-results-search .vb-search__button:hover {
	background: #003f88;
}


/* --------------------------------------------------
   Primary category pills
-------------------------------------------------- */

.vb-search-filters {
	padding: 22px 0 12px;
	background: #fff;
}

.vb-search-filter-primary {
	width: 100%;
	overflow: hidden;
}

.vb-search-category-pills {
	display: flex;
	align-items: center;
	gap: 10px;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 3px 2px 7px;
}

.vb-search-category-pills::-webkit-scrollbar {
	display: none;
}

.vb-search-category-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 19px;
	border: 1px solid #dbe2ea;
	border-radius: 999px;
	background: #fff;
	color: #475569;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: .18s ease;
	flex-shrink: 0;
}

.vb-search-category-pill:hover {
	border-color: #0057b8;
	color: #0057b8;
	transform: translateY(-1px);
}

.vb-search-category-pill.is-active {
	border-color: #0057b8;
	background: #0057b8;
	color: #fff;
	box-shadow: 0 5px 14px rgba(0,87,184,.18);
}

.vb-search-category-pill.is-active:hover {
	color: #fff;
}


/* --------------------------------------------------
   Filter panel
-------------------------------------------------- */

.vb-search-filter-panel {
	margin-top: 14px;
	padding: 24px 26px;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 8px 30px rgba(15,23,42,.06);
}

.vb-search-filter-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 24px;
}

.vb-search-filter-panel-header strong {
	display: block;
	color: #111827;
	font-size: 18px;
}

.vb-search-filter-panel-count {
	display: inline-block;
	margin-top: 4px;
	color: #64748b;
	font-size: 13px;
}

.vb-search-filter-clear-all,
.vb-search-active-clear {
	color: #0057b8;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.vb-search-filter-clear-all:hover,
.vb-search-active-clear:hover {
	text-decoration: underline;
}

.vb-search-filter-group {
	margin: 0 0 24px;
	padding: 0;
	border: 0;
}

.vb-search-filter-group:last-of-type {
	margin-bottom: 0;
}

.vb-search-filter-group legend {
	margin: 0 0 12px;
	padding: 0;
	color: #111827;
	font-size: 15px;
	font-weight: 800;
}

.vb-search-filter-options {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

.vb-search-filter-pill {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid #dbe2ea;
	border-radius: 999px;
	background: #fff;
	color: #475569;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: .18s ease;
}

.vb-search-filter-pill:hover {
	border-color: #0057b8;
	color: #0057b8;
	background: #f8fbff;
}

.vb-search-filter-pill input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.vb-search-filter-pill-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: 1px solid #cbd5e1;
	border-radius: 50%;
	font-size: 11px;
	line-height: 1;
}

.vb-search-filter-pill.is-selected {
	border-color: #0057b8;
	background: #0057b8;
	color: #fff;
	box-shadow: 0 4px 12px rgba(0,87,184,.16);
}

.vb-search-filter-pill.is-selected .vb-search-filter-pill-check {
	border-color: rgba(255,255,255,.8);
	background: rgba(255,255,255,.14);
	color: #fff;
}

.vb-search-filter-pill:has(input:focus-visible) {
	outline: 3px solid rgba(0,87,184,.18);
	outline-offset: 2px;
}

.vb-search-filter-form-actions {
	display: flex;
	justify-content: flex-start;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #edf0f2;
}

.vb-search-filter-apply {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: #0057b8;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: .18s ease;
}

.vb-search-filter-apply:hover {
	background: #003f88;
	transform: translateY(-1px);
}


/* --------------------------------------------------
   Active filters
-------------------------------------------------- */

.vb-search-active-filters {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
	padding: 14px 16px;
	border-radius: 14px;
	background: #f0f7ff;
}

.vb-search-active-label {
	margin-right: 2px;
	color: #475569;
	font-size: 13px;
	font-weight: 700;
}

.vb-search-active-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 32px;
	padding: 0 11px;
	border: 1px solid #b8d5f5;
	border-radius: 999px;
	background: #fff;
	color: #0057b8;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.vb-search-active-pill span {
	font-size: 17px;
	line-height: 1;
}

.vb-search-active-pill:hover {
	border-color: #0057b8;
}


/* --------------------------------------------------
   Results toolbar
-------------------------------------------------- */

.vb-search-results-content {
	padding: 18px 0 60px;
	background: #f8fafc;
}

.vb-search-results-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
}

.vb-search-results-toolbar-summary {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	color: #64748b;
}

.vb-search-results-toolbar-summary strong {
	color: #111827;
	font-size: 1.15rem;
}

.vb-search-results-toolbar-summary span {
	font-size: 14px;
}

.vb-search-results-range {
	margin-left: 10px;
	padding-left: 10px;
	border-left: 1px solid #cbd5e1;
}

.vb-search-per-page {
	display: flex;
	align-items: center;
	gap: 9px;
}

.vb-search-per-page label {
	color: #64748b;
	font-size: 13px;
	font-weight: 600;
}

.vb-search-per-page select {
	min-height: 40px;
	padding: 0 34px 0 12px;
	border: 1px solid #dbe2ea;
	border-radius: 10px;
	background: #fff;
	color: #374151;
	font-weight: 600;
}


/* --------------------------------------------------
   Results grid
-------------------------------------------------- */

.vb-search-results-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
}


/* --------------------------------------------------
   Pagination / empty state
-------------------------------------------------- */

.vb-search-pagination {
	margin-top: 36px;
}

.vb-search-pagination ul {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vb-search-pagination a,
.vb-search-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0 12px;
	border: 1px solid #dbe2ea;
	border-radius: 999px;
	background: #fff;
	color: #374151;
	text-decoration: none;
	font-weight: 600;
}

.vb-search-pagination .current {
	border-color: #0057b8;
	background: #0057b8;
	color: #fff;
}

.vb-empty-state {
	max-width: 720px;
	margin: 40px auto 20px;
	padding: 60px 30px;
	text-align: center;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	background: #fff;
}

.vb-empty-state-icon {
	margin-bottom: 12px;
	color: #0057b8;
	font-size: 42px;
}

.vb-empty-state h2 {
	margin: 0 0 10px;
	color: #111827;
}

.vb-empty-state p {
	max-width: 560px;
	margin: 8px auto;
	color: #64748b;
	line-height: 1.6;
}


/* --------------------------------------------------
   Mobile
-------------------------------------------------- */

@media (max-width: 900px) {

	.vb-search-results-hero-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.vb-search-results-heading h1 {
		font-size: 2.3rem;
	}

	.vb-search-results-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vb-search-results-toolbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.vb-search-per-page {
		width: 100%;
		justify-content: space-between;
	}

}

@media (max-width: 768px) {

	.vb-search-results-hero {
		padding: 38px 0 24px;
	}

	.vb-search-results-heading h1 {
		font-size: 2rem;
	}

	.vb-search-results-search .vb-search__input {
		height: 60px;
		padding: 0 20px;
		border-radius: 15px;
	}

	.vb-search-results-search .vb-search__button {
		position: static;
		width: 100%;
		height: 52px;
		margin-top: 10px;
		border-radius: 13px;
	}

	.vb-search-results-search .vb-search__input {
		padding-right: 20px;
	}

	.vb-search-filters {
		padding-top: 16px;
	}

	.vb-search-category-pills {
		flex-wrap: nowrap;
		overflow-x: auto;
	}

	.vb-search-filter-panel {
		padding: 20px 16px;
		border-radius: 16px;
	}

	.vb-search-filter-panel-header {
		align-items: flex-start;
	}

	.vb-search-filter-options {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		padding-bottom: 4px;
	}

	.vb-search-filter-options::-webkit-scrollbar {
		display: none;
	}

	.vb-search-filter-pill {
		flex-shrink: 0;
	}


	.vb-search-results-content {
		padding-bottom: 40px;
	}

	.vb-search-results-range {
		width: 100%;
		margin-left: 0;
		padding-left: 0;
		border-left: 0;
		margin-top: 4px;
	}

	.vb-search-active-filters {
		align-items: flex-start;
	}

}

@media (max-width: 480px) {

	.vb-search-results-heading h1 {
		font-size: 1.85rem;
	}

	.vb-search-filter-panel-header strong {
		font-size: 16px;
	}

}

/* ==================================================
   Search Results
   Keep the existing Business Card layout
   ================================================== */

.vb-search-results-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

/* ==================================================
   Filter Pill States
================================================== */

/*
 * CLICKED but NOT YET APPLIED
 * Blue outline + pale blue background.
 */
.vb-search-filter-pill:not(.is-selected):has(input:checked) {
	border-color: #0057b8 !important;
	background: #f0f7ff !important;
	color: #0057b8 !important;
	box-shadow: inset 0 0 0 1px #0057b8;
}


/*
 * ACTUALLY APPLIED
 * Solid dark blue after Apply Filters
 */
.vb-search-filter-pill.is-selected {
	border-color: #003f88 !important;
	background: #003f88 !important;
	color: #fff !important;
	box-shadow: 0 4px 12px rgba(0,87,184,.18);
}


/*
 * Applied pill check circle
 */
.vb-search-filter-pill.is-selected .vb-search-filter-pill-check {
	border-color: rgba(255,255,255,.8);
	background: rgba(255,255,255,.14);
	color: #fff;
}


/*
 * Unapplied selected pill check circle
 */
.vb-search-filter-pill:not(.is-selected):has(input:checked) .vb-search-filter-pill-check {
	border-color: #0057b8;
	background: #fff;
	color: #0057b8;
}

/* ==================================================
   Stage 1 - More Filters
================================================== */

/* Extra filter groups are hidden by the HTML hidden attribute */
.vb-search-extra-filter-groups[hidden] {
	display: none !important;
}

.vb-search-extra-filter-groups {
	display: block;
	margin-top: 24px;
}


/* More filters button */

.vb-search-filter-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;

	margin: 6px 0 22px;
	padding: 10px 18px;

	border: 1px solid #d9dfdc;
	border-radius: 999px;

	background: #fff;
	color: #0057b8;

	font-size: 14px;
	font-weight: 700;

	cursor: pointer;

	transition:
		background .2s ease,
		border-color .2s ease,
		color .2s ease,
		transform .2s ease;
}

.vb-search-filter-more:hover {
	border-color: #0057b8;
	background: #f0f7ff;
	transform: translateY(-1px);
}

.vb-search-filter-more-icon {
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
}


/* Filter group spacing */

.vb-search-filter-group {
	margin: 0 0 22px;
	padding: 0;
	border: 0;
}

.vb-search-filter-group legend {
	margin-bottom: 10px;
	padding: 0;

	font-size: 15px;
	font-weight: 700;
	color: #1f2937;
}


/* Filter pills */

.vb-search-filter-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vb-search-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;

	min-height: 40px;
	padding: 0 14px;

	border: 1px solid #d9dfdc;
	border-radius: 999px;

	background: #fff;
	color: #374151;

	font-size: 14px;
	font-weight: 600;

	cursor: pointer;

	transition:
		background .2s ease,
		border-color .2s ease,
		color .2s ease,
		box-shadow .2s ease;
}

.vb-search-filter-pill input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}


/* Clicked but not yet applied */

.vb-search-filter-pill:not(.is-selected):has(input:checked) {
	border-color: #0057b8 !important;
	background: #f0f7ff !important;
	color: #0057b8 !important;
	box-shadow: inset 0 0 0 1px #0057b8;
}


/* Applied */

.vb-search-filter-pill.is-selected {
	border-color: #003f88 !important;
	background: #003f88 !important;
	color: #fff !important;
	box-shadow: 0 4px 12px rgba(0,87,184,.18);
}


/* Check / plus icon */

.vb-search-filter-pill-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	width: 20px;
	height: 20px;

	border: 1px solid #d1d5db;
	border-radius: 50%;

	font-size: 12px;
	line-height: 1;
}

.vb-search-filter-pill:not(.is-selected):has(input:checked)
	.vb-search-filter-pill-check {
	border-color: #0057b8;
	color: #0057b8;
	background: #fff;
}

.vb-search-filter-pill.is-selected
	.vb-search-filter-pill-check {
	border-color: rgba(255,255,255,.8);
	color: #fff;
	background: rgba(255,255,255,.12);
}


/* Apply button */

.vb-search-filter-form-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}

.vb-search-filter-apply {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 46px;
	padding: 0 24px;

	border: 0;
	border-radius: 12px;

	background: #0057b8;
	color: #fff;

	font-size: 15px;
	font-weight: 700;

	cursor: pointer;

	transition:
		background .2s ease,
		transform .2s ease,
		box-shadow .2s ease;
}

.vb-search-filter-apply:hover {
	background: #003f88;
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(0,87,184,.22);
}


/* Mobile */

@media (max-width: 768px) {

	.vb-search-filter-options {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 5px;

		scrollbar-width: none;
	}

	.vb-search-filter-options::-webkit-scrollbar {
		display: none;
	}

	.vb-search-filter-pill {
		flex-shrink: 0;
	}

	.vb-search-filter-more {
		margin-bottom: 18px;
	}

}