.bpds-directory {
	--bpds-accent: #118f8b;
	--bpds-border: #d8e0e4;
	--bpds-text: #18252b;
	--bpds-muted: #5d6b73;
	width: 100%;
	color: var(--bpds-text);
	font-size: 15px;
}

.bpds-search {
	margin: 0 0 18px;
	padding: 18px;
	border: 1px solid var(--bpds-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(18, 37, 43, 0.06);
}

.bpds-search-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.bpds-heading {
	margin: 0;
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: 0;
}

.bpds-location-name {
	max-width: 42%;
	margin-left: auto;
	color: var(--bpds-muted);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	text-align: right;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bpds-filter-row {
	display: grid;
	grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(120px, 1fr)) minmax(132px, auto);
	gap: 12px;
	align-items: end;
}

.bpds-button-group {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	flex-wrap: nowrap;
	white-space: nowrap;
	width: 100%;
}

.bpds-location-controls {
	display: flex;
	align-items: flex-end;
	align-self: end;
	width: 100%;
}

.bpds-field {
	display: grid;
	gap: 6px;
	min-width: 0;
	color: var(--bpds-muted);
	font-size: 13px;
	font-weight: 600;
}

.bpds-field input,
.bpds-field select {
	width: 100%;
	min-height: 42px;
	padding: 9px 11px;
	border: 1px solid var(--bpds-border);
	border-radius: 6px;
	background: #fff;
	color: var(--bpds-text);
	font: inherit;
}

.bpds-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 15px;
	border: 0;
	border-radius: 6px;
	background: var(--bpds-accent);
	color: #fff;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bpds-submit {
	width: 100%;
	flex: 1 1 132px;
}

.bpds-submit:hover,
.bpds-submit:focus {
	background: #0d6f6c;
	color: #fff;
}

.bpds-status {
	min-height: 20px;
	margin-bottom: 8px;
	color: var(--bpds-muted);
	font-size: 13px;
}

.bpds-content {
	display: grid;
	grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.35fr);
	gap: 18px;
	align-items: start;
}

.bpds-layout-grid .bpds-content {
	grid-template-columns: 1fr;
}

.bpds-layout-stack .bpds-content {
	grid-template-columns: 1fr;
}

.bpds-results {
	display: grid;
	gap: 18px;
}

.bpds-layout-grid .bpds-results {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bpds-card {
	position: relative;
	display: grid;
	gap: 22px;
	align-items: center;
	min-height: 178px;
	padding: 26px 34px;
	border: 1px solid var(--bpds-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
}

.bpds-card-has-image {
	grid-template-columns: 190px minmax(0, 1fr);
}

.bpds-card-image {
	width: 100%;
	height: 118px;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	border-radius: 6px;
	background: transparent;
}

.bpds-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.bpds-card-has-image .bpds-card-main,
.bpds-card-has-image .bpds-card-actions {
	grid-column: 2;
}

.bpds-card-title {
	margin: 0 0 6px;
	color: var(--bpds-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 4px;
}

.bpds-card-title a {
	color: inherit;
	text-decoration: none;
}

.bpds-badges {
	position: absolute;
	top: 22px;
	right: 26px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-width: 42%;
	justify-content: flex-end;
	z-index: 2;
}

.bpds-badges span {
	padding: 8px 12px;
	border-radius: 999px;
	background: #f2f2f2;
	color: #4d4d4d;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.bpds-summary,
.bpds-address,
.bpds-distance {
	margin: 0 0 10px;
	color: var(--bpds-muted);
	line-height: 1.45;
}

.bpds-summary {
	margin-bottom: 8px;
	color: var(--bpds-text);
	font-size: 16px;
}

.bpds-address {
	font-size: 16px;
}

.bpds-distance {
	color: var(--bpds-text);
	font-weight: 700;
}

.bpds-card-actions {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 8px;
	align-items: flex-start;
	margin-top: 14px;
}

.bpds-card-actions a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--bpds-accent);
	font-weight: 700;
	text-decoration: none;
}

.bpds-contact-icon {
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	fill: currentColor;
}

.bpds-map-wrap {
	position: sticky;
	top: 24px;
	min-height: 520px;
	overflow: hidden;
	border: 1px solid var(--bpds-border);
	border-radius: 8px;
	background: #dfe7eb;
}

.bpds-mobile-map-button,
.bpds-map-close {
	display: none;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 15px;
	border: 0;
	border-radius: 6px;
	background: var(--bpds-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.bpds-mobile-map-button:hover,
.bpds-mobile-map-button:focus,
.bpds-map-close:hover,
.bpds-map-close:focus {
	background: #0d6f6c;
	color: #fff;
}

.bpds-map {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: inherit;
	overflow: hidden;
}

.bpds-tile {
	position: absolute;
	width: 256px;
	height: 256px;
	max-width: none;
	user-select: none;
	pointer-events: none;
}

.bpds-marker {
	position: absolute;
	z-index: 3;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50% 50% 50% 0;
	background: var(--bpds-accent);
	box-shadow: 0 4px 12px rgba(18, 37, 43, 0.35);
	cursor: pointer;
	transform: translate(-50%, -100%) rotate(-45deg);
}

.bpds-marker > span {
	position: absolute;
	inset: 8px;
	display: block;
	border-radius: 999px;
	background: #fff;
}

.bpds-popup {
	position: absolute;
	left: 50%;
	bottom: 36px;
	display: none;
	width: 240px;
	padding: 10px;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 8px 22px rgba(18, 37, 43, 0.24);
	color: var(--bpds-text);
	text-align: left;
	transform: translateX(-50%) rotate(45deg);
}

.bpds-popup p {
	margin: 6px 0;
	color: var(--bpds-muted);
	font-size: 13px;
	line-height: 1.35;
}

.bpds-popup a {
	color: var(--bpds-accent);
	font-weight: 700;
	text-decoration: none;
}

.bpds-marker.is-active,
.bpds-marker:focus {
	z-index: 5;
}

.bpds-marker.is-active .bpds-popup,
.bpds-marker:focus .bpds-popup {
	display: block;
}

.bpds-attribution {
	position: absolute;
	right: 6px;
	bottom: 5px;
	z-index: 6;
	padding: 2px 5px;
	background: rgba(255, 255, 255, 0.9);
	color: #2563eb;
	font-size: 11px;
	text-decoration: none;
}

.bpds-empty,
.bpds-map-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	padding: 18px;
	border: 1px dashed var(--bpds-border);
	border-radius: 8px;
	background: #fff;
	color: var(--bpds-muted);
	text-align: center;
}

.bpds-map-empty {
	height: 100%;
	border: 0;
	background: rgba(255, 255, 255, 0.76);
}

.bpds-directory.is-loading {
	opacity: 0.75;
}

@media (max-width: 1100px) {
	.bpds-filter-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bpds-location-controls {
		grid-column: 1 / -1;
	}

	.bpds-submit {
		flex: 1 1 0;
	}

	.bpds-content {
		grid-template-columns: 1fr;
	}

	.bpds-map-wrap {
		position: relative;
		top: auto;
	}

	.bpds-layout-grid .bpds-results {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.bpds-search-head,
	.bpds-card-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.bpds-location-name {
		max-width: none;
		margin-left: 0;
		text-align: left;
		white-space: normal;
	}

	.bpds-button-group {
		align-items: stretch;
	}

	.bpds-location-controls {
		display: flex;
	}

	.bpds-filter-row,
	.bpds-layout-grid .bpds-results {
		grid-template-columns: 1fr;
	}

	.bpds-card {
		grid-template-columns: 1fr !important;
		padding: 22px;
	}

	.bpds-card-main,
	.bpds-card-actions {
		grid-column: auto;
	}

	.bpds-badges {
		position: static;
		max-width: none;
		justify-content: flex-start;
		order: -1;
	}

	.bpds-card-title {
		letter-spacing: 2px;
	}

	.bpds-heading {
		font-size: 21px;
	}

	.bpds-map-wrap {
		min-height: 360px;
	}

	.bpds-mobile-map-button {
		display: inline-flex;
		width: 100%;
		grid-column: 1;
	}

	.bpds-map-wrap {
		position: fixed;
		inset: 18px;
		z-index: 9999;
		display: none;
		min-height: 0;
		padding-top: 54px;
		background: #fff;
		box-shadow: 0 24px 70px rgba(18, 37, 43, 0.35);
	}

	.bpds-directory.is-map-open .bpds-map-wrap {
		display: block;
	}

	.bpds-map-close {
		position: absolute;
		top: 10px;
		right: 10px;
		z-index: 8;
		display: inline-flex;
		min-height: 34px;
		padding: 8px 12px;
	}

	.bpds-map {
		min-height: 100%;
		height: calc(100vh - 90px);
	}
}

@media (max-width: 420px) {
	.bpds-button-group {
		flex-direction: column;
	}

	.bpds-submit {
		width: 100%;
		flex-basis: auto;
	}
}
