.medisync-location-map-popup {
	position: relative;
	width: min(15.5rem, calc(100vw - 3.5rem));
	min-width: min(13rem, calc(100vw - 3.5rem));
	max-width: 15.5rem;
	padding: 0.66rem 0.76rem 0.7rem;
	border: 1px solid rgba(190, 207, 232, 0.88);
	border-radius: 0.82rem;
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 12px 28px rgba(61, 89, 132, 0.2), 0 0 16px rgba(37, 99, 235, 0.1);
	color: #06184f;
	font-family: Inter, "Space Grotesk", Poppins, system-ui, sans-serif;
	line-height: 1.3;
	pointer-events: auto;
}

.medisync-location-map-popup:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.22);
	outline-offset: 2px;
}

.medisync-location-map-popup__title {
	margin: 0;
	font-size: 0.94rem;
	font-weight: 800;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.medisync-location-map-popup__address {
	min-width: 0;
	margin: 0.12rem 0 0;
	display: -webkit-box;
	overflow: hidden;
	color: #526487;
	font-size: 0.72rem;
	font-style: italic;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	white-space: normal;
}

/* The admin theme styles every article as a translucent neon card. Keep map
   previews on the same opaque, high-contrast surface used by the application. */
body.neon-admin-theme #app .gm-style article.medisync-location-map-popup,
body.neon-admin-theme #app .leaflet-popup article.medisync-location-map-popup {
	position: relative;
	overflow: hidden;
	border-color: rgba(190, 207, 232, 0.88) !important;
	background: #ffffff !important;
	box-shadow: 0 12px 28px rgba(61, 89, 132, 0.2), 0 0 16px rgba(37, 99, 235, 0.1) !important;
	color: #06184f !important;
}

body.neon-admin-theme #app .gm-style article.medisync-location-map-popup::before,
body.neon-admin-theme #app .leaflet-popup article.medisync-location-map-popup::before {
	content: none !important;
	display: none !important;
}

body.neon-admin-theme #app .medisync-location-map-popup__title {
	color: #06184f !important;
}

body.neon-admin-theme #app .medisync-location-map-popup__address {
	color: #526487 !important;
}

.gm-style .gm-style-iw-c:has(.medisync-location-map-popup) {
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0.82rem !important;
	background: transparent !important;
	box-shadow: none !important;
}

.gm-style .gm-style-iw-d:has(.medisync-location-map-popup) {
	overflow: visible !important;
}

.gm-style .gm-style-iw-t:has(.medisync-location-map-popup) > .gm-style-iw-tc::after {
	background: rgba(255, 255, 255, 0.98);
}

.medisync-location-popup-host .leaflet-popup-content-wrapper {
	padding: 0;
	border: 0;
	border-radius: 0.82rem;
	background: transparent;
	box-shadow: none;
}

.medisync-location-popup-host .leaflet-popup-content {
	width: auto !important;
	margin: 0;
}

.medisync-location-popup-host .leaflet-popup-tip {
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 2px 2px 5px rgba(61, 89, 132, 0.14);
}

@media (prefers-reduced-motion: reduce) {
	.medisync-location-map-popup,
	.medisync-location-map-popup * {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
