.toi-locator,
.toi-locator * {
	box-sizing: border-box;
}

.toi-locator {
	--toi-primary: #12306b;
	--toi-accent: #1d4d70;
	--toi-page-tint: #edf2f5;
	--toi-map-height: 720px;
	--toi-ink: #202a35;
	--toi-muted: #5d6873;
	--toi-border: #dce3e8;
	--toi-shadow: 0 14px 35px rgba(19, 43, 66, 0.12);
	width: 100%;
	max-width: 1680px;
	margin: 0 auto;
	padding: clamp(18px, 2.5vw, 42px);
	border-radius: 32px;
	background: var(--toi-page-tint);
	color: var(--toi-ink);
	font-family: inherit;
	line-height: 1.45;
}

.toi-locator button,
.toi-locator input,
.toi-locator select {
	font: inherit;
}

.toi-locator button,
.toi-locator a {
	-webkit-tap-highlight-color: transparent;
}

.toi-locator__filters {
	display: grid;
	grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(230px, auto);
	gap: 22px;
	align-items: end;
	padding: clamp(24px, 2.8vw, 42px);
	border-radius: 28px;
	background: linear-gradient(116deg, var(--toi-accent), var(--toi-primary));
	box-shadow: 0 16px 32px rgba(18, 48, 107, 0.16);
	color: #fff;
}

.toi-locator__field {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 10px;
}

.toi-locator__field label {
	margin: 0;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
}

.toi-locator__field input,
.toi-locator__field select {
	width: 100%;
	min-height: 60px;
	margin: 0;
	padding: 12px 18px;
	border: 2px solid transparent;
	border-radius: 12px;
	outline: none;
	background: #fff;
	box-shadow: none;
	color: #303840;
	font-size: 17px;
	line-height: 1.2;
	transition: border-color 160ms ease, box-shadow 160ms ease;
	appearance: auto;
}

.toi-locator__field input::placeholder {
	color: #737a80;
	opacity: 1;
}

.toi-locator__field input:focus,
.toi-locator__field select:focus {
	border-color: rgba(255, 255, 255, 0.8);
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.toi-locator__geolocate-wrap {
	display: flex;
	min-height: 60px;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding-bottom: 2px;
}

.toi-locator__geolocate {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 42px;
	margin: 0;
	padding: 6px 0 5px;
	border: 0;
	border-bottom: 2px solid rgba(255, 255, 255, 0.82);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	text-align: left;
	transition: border-color 160ms ease, opacity 160ms ease;
}

.toi-locator__geolocate:hover,
.toi-locator__geolocate:focus-visible {
	border-bottom-color: #fff;
	opacity: 0.84;
}

.toi-locator__geolocate:disabled {
	cursor: wait;
	opacity: 0.64;
}

.toi-locator__target-icon {
	position: relative;
	display: inline-block;
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
	border: 2px solid currentColor;
	border-radius: 50%;
}

.toi-locator__target-icon::before,
.toi-locator__target-icon::after {
	position: absolute;
	content: "";
	background: currentColor;
}

.toi-locator__target-icon::before {
	top: 5px;
	left: -4px;
	width: 21px;
	height: 2px;
}

.toi-locator__target-icon::after {
	top: -4px;
	left: 5px;
	width: 2px;
	height: 21px;
}

.toi-locator__geo-status {
	display: block;
	max-width: 280px;
	margin-top: 7px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 12px;
}

.toi-locator__toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	min-height: 96px;
	padding: 22px 0 18px;
}

.toi-locator__count {
	margin: 0;
	color: var(--toi-ink);
	font-size: 16px;
	font-weight: 600;
}

.toi-locator__view-switch {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.toi-locator__view-switch button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 104px;
	min-height: 52px;
	margin: 0;
	padding: 11px 18px;
	border: 0;
	border-radius: 10px;
	background: #d8dce0;
	box-shadow: none;
	color: #30353a;
	cursor: pointer;
	font-size: 16px;
	font-weight: 800;
	line-height: 1;
	transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.toi-locator__view-switch button:hover {
	transform: translateY(-1px);
}

.toi-locator__view-switch button[aria-pressed="true"] {
	background: var(--toi-primary);
	box-shadow: 0 10px 24px rgba(18, 48, 107, 0.2);
	color: #fff;
}

.toi-locator__grid-icon {
	display: inline-block;
	width: 15px;
	height: 15px;
	background:
		linear-gradient(currentColor 0 0) 0 0 / 6px 6px no-repeat,
		linear-gradient(currentColor 0 0) 100% 0 / 6px 6px no-repeat,
		linear-gradient(currentColor 0 0) 0 100% / 6px 6px no-repeat,
		linear-gradient(currentColor 0 0) 100% 100% / 6px 6px no-repeat;
}

.toi-locator__pin-icon {
	position: relative;
	display: inline-block;
	width: 15px;
	height: 19px;
	flex: 0 0 15px;
	border: 2px solid currentColor;
	border-radius: 10px 10px 11px 11px;
	transform: rotate(45deg);
}

.toi-locator__pin-icon::after {
	position: absolute;
	top: 4px;
	left: 4px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
	content: "";
}

.toi-locator__results {
	display: grid;
	grid-template-columns: minmax(340px, 31%) minmax(0, 1fr);
	gap: clamp(24px, 3vw, 44px);
	align-items: start;
}

.toi-locator__cards {
	display: grid;
	gap: 24px;
}

.toi-locator.is-map-view .toi-locator__cards {
	max-height: var(--toi-map-height);
	padding: 2px 14px 24px 2px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-color: var(--toi-primary) transparent;
	scrollbar-width: thin;
}

.toi-locator.is-map-view .toi-locator__cards::-webkit-scrollbar {
	width: 8px;
}

.toi-locator.is-map-view .toi-locator__cards::-webkit-scrollbar-thumb {
	border-radius: 99px;
	background: color-mix(in srgb, var(--toi-primary) 64%, transparent);
}

.toi-location-card {
	position: relative;
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(201, 211, 218, 0.75);
	border-radius: 22px;
	background: #fff;
	box-shadow: var(--toi-shadow);
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.toi-location-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 42px rgba(19, 43, 66, 0.16);
}

.toi-location-card.is-active {
	border-color: var(--toi-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--toi-primary) 18%, transparent), var(--toi-shadow);
}

.toi-location-card[hidden] {
	display: none !important;
}

.toi-location-card__image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 7;
	overflow: hidden;
	background: #dce7ec;
}

.toi-location-card__image {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 280ms ease;
}

.toi-location-card:hover .toi-location-card__image {
	transform: scale(1.025);
}

.toi-location-card__placeholder {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	background: var(--toi-accent);
	background: linear-gradient(145deg, color-mix(in srgb, var(--toi-accent) 78%, white), var(--toi-primary));
	color: #fff;
}

.toi-location-card__placeholder .toi-locator__pin-icon {
	width: 28px;
	height: 36px;
	flex-basis: 28px;
	border-width: 3px;
}

.toi-location-card__placeholder .toi-locator__pin-icon::after {
	top: 9px;
	left: 9px;
	width: 6px;
	height: 6px;
}

.toi-location-card__body {
	display: flex;
	flex: 1;
	align-items: stretch;
	gap: 18px;
	padding: 24px;
}

.toi-location-card__copy {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
}

.toi-location-card__heading-row {
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.toi-location-card h3 {
	margin: 0;
	color: var(--toi-ink);
	font-size: clamp(19px, 1.4vw, 24px);
	font-weight: 800;
	line-height: 1.18;
}

.toi-location-card h3 a {
	display: -webkit-box;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.toi-location-card h3 a:hover,
.toi-location-card h3 a:focus-visible {
	color: var(--toi-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.toi-location-card__badge {
	order: -1;
	align-self: flex-start;
	flex: 0 0 auto;
	padding: 7px 13px;
	border-radius: 999px;
	background: var(--toi-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
}

.toi-location-card__address {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 14px;
	color: #39444d;
	font-size: 15px;
}

.toi-location-card__address .toi-locator__pin-icon {
	margin-top: 2px;
	color: var(--toi-primary);
}

.toi-location-card__distance {
	margin: 10px 0 0 25px;
	color: var(--toi-muted);
	font-size: 13px;
	font-weight: 700;
}

.toi-location-card__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-top: auto;
	padding-top: 18px;
}

.toi-location-card__links button,
.toi-location-card__links a {
	min-height: auto;
	margin: 0;
	padding: 0 0 2px;
	border: 0;
	border-bottom: 1px solid currentColor;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--toi-primary);
	cursor: pointer;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
	text-decoration: none;
}

.toi-location-card__links button:hover,
.toi-location-card__links button:focus-visible,
.toi-location-card__links a:hover,
.toi-location-card__links a:focus-visible {
	color: var(--toi-accent);
}

.toi-location-card__schedule {
	display: flex;
	width: 94px;
	min-height: 106px;
	flex: 0 0 94px;
	align-self: center;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 12px 9px;
	border-radius: 22px;
	background: var(--toi-primary);
	box-shadow: 0 6px 0 color-mix(in srgb, var(--toi-primary) 14%, transparent);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.05;
	text-align: center;
	text-decoration: none;
	transition: transform 160ms ease, background-color 160ms ease;
}

.toi-location-card__schedule:hover,
.toi-location-card__schedule:focus-visible {
	transform: translateY(-2px);
	background: var(--toi-accent);
	color: #fff;
}

.toi-location-card__schedule svg {
	width: 29px;
	height: 29px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.toi-locator.is-map-view .toi-location-card__image-wrap {
	display: none;
}

.toi-locator.is-map-view .toi-location-card__body {
	min-height: 218px;
	padding: 28px 24px;
}

.toi-locator.is-map-view .toi-location-card h3 {
	font-size: 22px;
}

.toi-locator__map-column {
	position: sticky;
	top: 24px;
	min-width: 0;
}

.toi-locator__map {
	width: 100%;
	height: var(--toi-map-height);
	min-height: 420px;
	overflow: hidden;
	border-radius: 26px;
	background: #dbeaf0;
	box-shadow: 0 16px 34px rgba(19, 43, 66, 0.14);
}

.toi-locator__map-message {
	display: flex;
	position: absolute;
	inset: 0;
	align-items: center;
	justify-content: center;
	padding: 32px;
	border: 2px dashed color-mix(in srgb, var(--toi-primary) 35%, transparent);
	border-radius: 26px;
	background: #e6eef2;
	color: var(--toi-primary);
	font-weight: 700;
	text-align: center;
}

.toi-locator__map-message[hidden] {
	display: none;
}

.toi-locator__map-message a {
	color: inherit;
	text-decoration: underline;
}

.toi-locator.is-grid-view .toi-locator__results {
	display: block;
}

.toi-locator.is-grid-view .toi-locator__cards {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: start;
}

.toi-locator.is-grid-view .toi-locator__map-column {
	display: none;
}

.toi-locator.is-grid-view .toi-location-card__body {
	padding: 22px;
}

.toi-locator.is-grid-view .toi-location-card__schedule {
	width: 82px;
	min-height: 98px;
	flex-basis: 82px;
	border-radius: 18px;
	font-size: 14px;
}

.toi-locator__empty {
	padding: 52px 24px;
	border: 2px dashed var(--toi-border);
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.72);
	text-align: center;
}

.toi-locator__empty[hidden] {
	display: none;
}

.toi-locator__empty p {
	margin: 0 0 15px;
	font-size: 18px;
	font-weight: 700;
}

.toi-locator__empty button {
	margin: 0;
	padding: 9px 15px;
	border: 0;
	border-radius: 8px;
	background: var(--toi-primary);
	color: #fff;
	cursor: pointer;
	font-weight: 700;
}

.toi-map-info {
	min-width: 220px;
	max-width: 300px;
	padding: 5px 2px 3px;
	color: #202a35;
	font-family: inherit;
}

.toi-map-info strong {
	display: block;
	margin: 0 0 7px;
	font-size: 16px;
	line-height: 1.25;
}

.toi-map-info p {
	margin: 0 0 10px;
	font-size: 13px;
}

.toi-map-info__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 13px;
}

.toi-map-info a {
	color: #12306b;
	font-size: 13px;
	font-weight: 700;
}

@media (max-width: 1240px) {
	.toi-locator__filters {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.toi-locator__geolocate-wrap {
		grid-column: 1 / -1;
		min-height: 0;
	}

	.toi-locator.is-grid-view .toi-locator__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 980px) {
	.toi-locator {
		border-radius: 22px;
	}

	.toi-locator__results {
		grid-template-columns: 1fr;
	}

	.toi-locator__map-column {
		position: relative;
		top: auto;
		grid-row: 1;
	}

	.toi-locator__map {
		height: min(62vh, 560px);
	}

	.toi-locator.is-map-view .toi-locator__cards {
		max-height: none;
		padding-right: 2px;
		overflow: visible;
	}

	.toi-locator.is-map-view .toi-locator__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.toi-locator {
		padding: 14px;
		border-radius: 18px;
	}

	.toi-locator__filters {
		grid-template-columns: 1fr;
		gap: 15px;
		padding: 22px;
		border-radius: 20px;
	}

	.toi-locator__geolocate-wrap {
		grid-column: auto;
		padding-top: 2px;
	}

	.toi-locator__field input,
	.toi-locator__field select {
		min-height: 54px;
	}

	.toi-locator__toolbar {
		align-items: flex-start;
		flex-direction: column-reverse;
		gap: 14px;
		padding: 22px 0;
	}

	.toi-locator__view-switch {
		width: 100%;
	}

	.toi-locator__view-switch button {
		flex: 1;
	}

	.toi-locator.is-grid-view .toi-locator__cards,
	.toi-locator.is-map-view .toi-locator__cards {
		grid-template-columns: 1fr;
	}

	.toi-locator__map {
		height: 430px;
		min-height: 360px;
		border-radius: 20px;
	}

	.toi-location-card__body,
	.toi-locator.is-map-view .toi-location-card__body {
		min-height: 0;
		padding: 22px;
	}
}

@media (max-width: 440px) {
	.toi-location-card__body {
		gap: 12px;
	}

	.toi-location-card__heading-row {
		flex-direction: column;
	}

	.toi-location-card__schedule,
	.toi-locator.is-grid-view .toi-location-card__schedule {
		width: 76px;
		min-height: 92px;
		flex-basis: 76px;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.toi-locator *,
	.toi-locator *::before,
	.toi-locator *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
