.viada-map {
	--viada-map-accent: #d60131;
	--viada-map-line: #e3e3e3;
	--viada-map-muted: #5c5c5c;
	width: 100%;
}

.viada-map__canvas {
	width: 100%;
	height: var(--viada-map-height, calc(100svh - 6rem));
}

.viada-map__card {
	max-width: 17.5rem;
	font-size: 0.875rem;
	line-height: 1.45;
}

.viada-map__card p {
	margin: 0 0 0.25rem;
}

.viada-map__card a {
	color: var(--viada-map-accent);
}

.viada-map__title {
	font-weight: 700;
	font-size: 1rem;
}

.viada-map__icons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0.5rem 0;
}

.viada-map__icons img {
	display: block;
	width: auto;
	height: 1.25rem;
}

/* ---------- Overlay: switch on top, filter drawer ---------- */

.viada-map {
	position: relative;
}

.viada-map__canvas {
	min-height: 28rem;
}

.viada-map__top {
	position: absolute;
	top: 1rem;
	left: 50%;
	z-index: 3;
	transform: translateX(-50%);
}

.viada-map__top .viada-switch {
	box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
}

.viada-map__toggle {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	column-gap: 0.5rem;
	padding: 0.625rem 1rem;
	border: 1px solid var(--viada-map-line);
	border-radius: 999px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
	cursor: pointer;
}

.viada-map__toggle[hidden] {
	display: none;
}

.viada-map__badge {
	display: inline-grid;
	place-items: center;
	min-width: 1.375rem;
	height: 1.375rem;
	padding-inline: 0.375rem;
	border-radius: 999px;
	background: var(--viada-map-accent);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
}

.viada-map__badge[hidden] {
	display: none;
}

.viada-map__drawer {
	position: absolute;
	top: 4.25rem;
	left: 1rem;
	z-index: 4;
	max-height: calc(100% - 5.25rem);
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 24rem;
	background: #fff;
	border-radius: 0.5rem;
	box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.2);
	overflow: hidden;
}

.viada-map__drawer[hidden] {
	display: none;
}

.viada-map__drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--viada-map-line);
}

.viada-map__drawer-title {
	margin: 0;
	font-weight: 600;
}

.viada-map__close {
	padding: 0 0.25rem;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.viada-map__drawer-body {
	padding: 1rem;
	overflow-y: auto;
}

/* The filter is one column inside the drawer. */
.viada-map__drawer-body .viada-filter__groups {
	grid-template-columns: 1fr;
}

.viada-map__drawer-body .viada-filter__search {
	max-width: none;
}

/* Phones: the drawer is a bottom sheet, the filter button sits below the switch. */
@media (max-width: 40rem) {
	.viada-map__toggle {
		top: 4.25rem;
		left: 50%;
		transform: translateX(-50%);
	}

	/* Anchored to the screen, not the map: the map's bottom edge can be below the fold. */
	.viada-map__drawer {
		position: fixed;
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1000;
		max-width: none;
		max-height: 80svh;
		border-radius: 0.75rem 0.75rem 0 0;
	}

	/* Clear the chatbot bubble in the bottom-right corner. */
	.viada-map__drawer-body {
		padding-bottom: 5rem;
	}
}
