.sms-map-widget,
.sms-map-loop-widget {
	width: 100%;
}

.sms-map-canvas {
	width: 100%;
	min-height: 320px;
	background: #e8ecef;
}

.sms-map-notice {
	padding: 16px 18px;
	background: #f5f7f9;
	border-left: 3px solid #4a5568;
	color: #2d3748;
	font-size: 14px;
	line-height: 1.5;
}

.sms-map-notice.is-hidden,
.sms-map-loop-item.is-out-of-view {
	display: none !important;
}

.sms-map-loop-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.sms-map-loop-item {
	cursor: pointer;
	outline: none;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sms-map-loop-item:hover,
.sms-map-loop-item:focus-visible {
	box-shadow: 0 0 0 2px rgba(45, 55, 72, 0.25);
}

.sms-map-loop-item.is-active {
	box-shadow: 0 0 0 2px #2d3748;
}

.sms-building-popup {
	display: flex;
	flex-direction: column;
	max-width: 560px;
	max-height: 420px;
	overflow: hidden;
	padding: 0;
	margin: 0;
	font-family: inherit;
}

.sms-building-popup__title {
	position: sticky;
	top: 0;
	z-index: 2;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 12px 10px 12px 16px;
	background: #e8f7f8;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

.sms-building-popup__heading {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.35em;
	min-width: 0;
	flex: 1;
}

.sms-building-popup__name {
	color: #134657;
}

.sms-building-popup__count {
	color: #6b33ec;
	font-weight: 700;
	white-space: nowrap;
}

.sms-building-popup__close {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #134657;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.sms-building-popup__close:hover,
.sms-building-popup__close:focus-visible {
	background: rgba(19, 70, 87, 0.08);
	outline: none;
}

.sms-building-popup__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.sms-building-popup__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 0;
}

.sms-building-popup__item {
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	transition: background-color 0.15s ease;
}

.sms-building-popup__item:hover {
	background: #f1f5f9;
}

.sms-building-popup__loading {
	padding: 12px 16px;
	font-size: 13px;
	color: #64748b;
}

.sms-building-popup__fallback a {
	font-size: 12px;
}

/* Full-bleed title bar inside Google InfoWindow */
.gm-style .gm-style-iw-c {
	padding: 0 !important;
	overflow: hidden !important;
	border-radius: 8px !important;
}

.gm-style .gm-style-iw-d {
	overflow: hidden !important;
	max-height: none !important;
}

/* Use our in-title close button instead of Google's default X */
.gm-style .gm-style-iw-c:has(.sms-building-popup) .gm-style-iw-chr {
	display: none !important;
}

.sms-archive-view-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.sms-archive-view-switch__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #134657;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.sms-archive-view-switch__link:hover,
.sms-archive-view-switch__link:focus-visible {
	border-color: #6b33ec;
	color: #6b33ec;
	outline: none;
}

.sms-archive-view-switch__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.sms-archive-view-switch__icon svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.sms-archive-view-switch__text {
	display: inline-block;
}
