/**
 * Fælles kort v2
 *
 * Isoleret prototype-CSS. Slet assets/map-v2 og pages/map-v2 for at fjerne
 * prototypen uden at påvirke de eksisterende kort.
 */

.beamii-map-v2 {
	--map-v2-place: #1565c0;
	--map-v2-association: #7c3aed;
	--map-v2-route: #d96d15;
	--map-v2-control-top: calc(env(safe-area-inset-top, 0px) + 74px);
}

.beamii-map-v2__map,
.beamii-map-v2__map #BeaMiiMapV2 {
	width: 100%;
	height: 100%;
	min-height: 100%;
}

.beamii-map-v2__controls {
	position: fixed;
	z-index: 680;
	top: var(--map-v2-control-top);
	left: 10px;
	right: 10px;
	pointer-events: none;
}

.beamii-map-v2__layers,
.beamii-map-v2__categories {
	display: flex;
	gap: 7px;
	align-items: center;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	pointer-events: auto;
}

.beamii-map-v2__layers::-webkit-scrollbar,
.beamii-map-v2__categories::-webkit-scrollbar {
	display: none;
}

.beamii-map-v2__layers {
	padding: 4px;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 18px;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
	backdrop-filter: blur(14px);
}

.beamii-map-v2__layer,
.beamii-map-v2__category {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 44px;
	padding: 0 14px;
	border: 0;
	border-radius: 14px;
	color: #334155;
	background: transparent;
	font: inherit;
	font-size: 13px;
	font-weight: 750;
	white-space: nowrap;
	cursor: pointer;
}

.beamii-map-v2__layer.is-active {
	color: #fff;
	background: #0f172a;
	box-shadow: 0 5px 14px rgba(15, 23, 42, .22);
}

.beamii-map-v2__layer[data-map-v2-layer="place"].is-active {
	background: var(--map-v2-place);
}

.beamii-map-v2__layer[data-map-v2-layer="association"].is-active {
	background: var(--map-v2-association);
}

.beamii-map-v2__layer[data-map-v2-layer="route"].is-active {
	background: var(--map-v2-route);
}

.beamii-map-v2__categories {
	margin-top: 8px;
	padding: 0 2px 4px;
}

.beamii-map-v2__category {
	min-height: 38px;
	padding: 0 13px;
	border: 1px solid rgba(15, 23, 42, .11);
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 4px 12px rgba(15, 23, 42, .1);
}

.beamii-map-v2__category.is-active {
	color: #fff;
	border-color: #0f172a;
	background: #0f172a;
}

.beamii-map-v2__status {
	position: fixed;
	z-index: 675;
	top: calc(var(--map-v2-control-top) + 64px);
	left: 50%;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: calc(100vw - 32px);
	min-height: 34px;
	padding: 7px 12px;
	border-radius: 999px;
	color: #334155;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 5px 18px rgba(15, 23, 42, .14);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	transform: translateX(-50%);
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}

.beamii-map-v2__status[hidden] {
	display: none;
}

.beamii-map-v2__status.is-ready {
	opacity: 0;
	transform: translate(-50%, -6px);
}

.beamii-map-v2 .fab-stack {
	z-index: 690;
}

.beamii-map-v2__sheet {
	z-index: 720;
	height: calc(var(--beamii-map-shell-h, var(--beamii-app-viewport-h, 100dvh)) - var(--beamii-map-sheet-bottom-offset, 78px) - 8px) !important;
	max-height: calc(var(--beamii-map-shell-h, var(--beamii-app-viewport-h, 100dvh)) - var(--beamii-map-sheet-bottom-offset, 78px) - 8px) !important;
	min-height: 320px !important;
	-webkit-transform: translateY(var(--sheetY, calc(100% - var(--sheet-collapsed-visible, 170px)))) translateZ(0) !important;
	transform: translateY(var(--sheetY, calc(100% - var(--sheet-collapsed-visible, 170px)))) translateZ(0) !important;
	transition: transform 360ms cubic-bezier(.22, .8, .24, 1), border-radius .2s ease, box-shadow .2s ease, bottom .2s ease, height .2s ease, max-height .2s ease;
}

.beamii-map-v2__sheet .sheet__content {
	box-sizing: border-box;
	height: calc(100% - 16px);
	max-height: none;
	overflow-y: auto;
}

.beamii-map-v2.is-sheet-expanded .beamii-map-v2__sheet {
	bottom: var(--beamii-map-sheet-bottom-offset, var(--beamii-shell-bottomnav-layout-h, 74px)) !important;
	height: calc(var(--beamii-map-shell-h, var(--beamii-app-viewport-h, 100dvh)) - var(--beamii-map-sheet-bottom-offset, var(--beamii-shell-bottomnav-layout-h, 74px)) - 8px) !important;
	max-height: calc(var(--beamii-map-shell-h, var(--beamii-app-viewport-h, 100dvh)) - var(--beamii-map-sheet-bottom-offset, var(--beamii-shell-bottomnav-layout-h, 74px)) - 8px) !important;
	border-radius: 24px 24px 0 0;
}

.beamii-map-v2.is-sheet-expanded .beamii-map-v2__sheet .sheet__content {
	padding-bottom: 18px !important;
}

.beamii-map-v2 .beamii-app-bottomnav {
	z-index: 740 !important;
}

.beamii-map-v2.is-sheet-expanded .fab-stack {
	opacity: 0;
	pointer-events: none;
	transform: translateY(12px);
}

.beamii-map-v2__sheet-header {
	display: grid;
	gap: 10px;
}

.beamii-map-v2__beta {
	display: inline-flex;
	width: fit-content;
	margin-bottom: 2px;
	padding: 3px 7px;
	border-radius: 999px;
	color: #075985;
	background: #e0f2fe;
	font-size: 10px;
	font-weight: 850;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.beamii-map-v2__hint {
	display: flex;
	gap: 6px;
	align-items: center;
	margin: 4px 0 0;
	color: #64748b;
	font-size: 11px;
	font-weight: 700;
}

.beamii-map-v2__search {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid #dbe3ee;
	border-radius: 14px;
	background: #f8fafc;
	color: #64748b;
}

.beamii-map-v2__search input {
	min-width: 0;
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	color: #0f172a;
	font: inherit;
	font-size: 14px;
}

.beamii-map-v2__search button {
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: #e2e8f0;
	color: #475569;
}

.beamii-map-v2__results {
	display: grid;
	gap: 10px;
	padding: 4px 14px calc(92px + env(safe-area-inset-bottom, 0px));
}

.beamii-map-v2__loading,
.beamii-map-v2__empty {
	display: grid;
	min-height: 150px;
	place-content: center;
	justify-items: center;
	gap: 10px;
	padding: 24px;
	color: #64748b;
	text-align: center;
}

.beamii-map-v2__empty i {
	font-size: 26px;
}

.beamii-map-v2__empty h3,
.beamii-map-v2__empty p {
	margin: 0;
}

.beamii-map-v2__empty h3 {
	color: #0f172a;
	font-size: 16px;
}

.beamii-map-v2__empty p {
	max-width: 32ch;
	font-size: 13px;
	line-height: 1.45;
}

.beamii-map-v2__empty-action,
.beamii-map-v2__list-more button {
	min-height: 42px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	color: #fff;
	background: #0f172a;
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
}

.beamii-map-v2__list-more {
	display: grid;
	justify-items: center;
	gap: 10px;
	padding: 10px 12px 18px;
	color: #64748b;
	text-align: center;
}

.beamii-map-v2__list-more p {
	max-width: 38ch;
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
}

.beamii-map-v2__card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 11px;
	align-items: center;
	min-width: 0;
	padding: 12px;
	border: 1px solid #e2e8f0;
	border-radius: 17px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.beamii-map-v2__card.is-selected {
	border-color: #94a3b8;
	box-shadow: 0 7px 20px rgba(15, 23, 42, .12);
}

.beamii-map-v2__card-select {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr);
	gap: 11px;
	align-items: center;
	min-width: 0;
	padding: 0;
	border: 0;
	color: inherit;
	background: transparent;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.beamii-map-v2__card-icon {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 14px;
	color: #fff;
	background: #64748b;
	font-size: 16px;
}

.beamii-map-v2__card[data-entity-kind="place"] .beamii-map-v2__card-icon {
	background: var(--map-v2-place);
}

.beamii-map-v2__card[data-entity-kind="association"] .beamii-map-v2__card-icon {
	background: var(--map-v2-association);
}

.beamii-map-v2__card[data-entity-kind="route"] .beamii-map-v2__card-icon {
	background: var(--map-v2-route);
}

.beamii-map-v2__card-copy {
	min-width: 0;
}

.beamii-map-v2__card-kicker,
.beamii-map-v2__card-meta {
	display: block;
	color: #64748b;
	font-size: 11px;
	font-weight: 700;
}

.beamii-map-v2__card-title {
	display: block;
	overflow: hidden;
	margin: 2px 0;
	color: #0f172a;
	font-size: 14px;
	font-weight: 820;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.beamii-map-v2__card-open {
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	border-radius: 50%;
	color: #0f172a;
	background: #eef2f7;
	text-decoration: none;
}

.beamii-map-v2-marker {
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	border: 3px solid #fff;
	border-radius: 50% 50% 50% 12px;
	color: #fff;
	background: #64748b;
	box-shadow: 0 4px 12px rgba(15, 23, 42, .3);
	font-size: 13px;
	transform: rotate(-45deg);
}

.beamii-map-v2-marker > i,
.beamii-map-v2-marker > span {
	transform: rotate(45deg);
}

.beamii-map-v2-marker--place {
	background: var(--map-v2-place);
}

.beamii-map-v2-marker--association {
	background: var(--map-v2-association);
}

.beamii-map-v2-marker--route {
	background: var(--map-v2-route);
}

.beamii-map-v2-marker--cluster {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #0f172a;
	font-size: 12px;
	font-weight: 850;
}

.beamii-map-v2-marker.is-selected {
	width: 42px;
	height: 42px;
	outline: 3px solid rgba(255, 255, 255, .7);
}

.beamii-map-v2-user-location {
	display: block;
	width: 18px;
	height: 18px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #1473e6;
	box-shadow: 0 0 0 5px rgba(20, 115, 230, .18), 0 4px 12px rgba(15, 23, 42, .24);
}

@media (min-width: 780px) {
	.beamii-map-v2 {
		--map-v2-control-top: 86px;
	}

	.beamii-map-v2__controls {
		left: 22px;
		right: auto;
		max-width: min(720px, calc(100vw - 130px));
	}

	.beamii-map-v2__sheet {
		max-width: 440px;
	}
}

@media (min-width: 768px) {
	.beamii-map-v2 .beamii-map-v2__sheet {
		left: 50%;
		right: auto;
		width: min(440px, calc(100vw - 28px));
		-webkit-transform: translateX(-50%) translateY(var(--sheetY, calc(100% - var(--sheet-collapsed-visible, 170px)))) translateZ(0) !important;
		transform: translateX(-50%) translateY(var(--sheetY, calc(100% - var(--sheet-collapsed-visible, 170px)))) translateZ(0) !important;
	}
}

@media (max-width: 390px) {
	.beamii-map-v2__layer {
		padding-inline: 12px;
	}

	.beamii-map-v2__layer i {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.beamii-map-v2__status,
	.beamii-map-v2__sheet {
		transition: none;
	}
}
