/* /maps — map + sidebar fill viewport below theme header (height set in maps-layout.js) */

html.locmgr-maps-route,
body.locmgr-maps-route {
	overflow: hidden;
	height: 100%;
}

.loc-maps-layout {
	display: flex;
	width: 100%;
	height: var(--locmgr-maps-height, calc(100dvh - 80px));
	max-height: var(--locmgr-maps-height, calc(100dvh - 80px));
	min-height: 0;
	overflow: hidden;
	background: #f0f0f1;
	box-sizing: border-box;
}

.loc-maps-main {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	position: relative;
	z-index: 0;
}

.loc-maps-canvas {
	width: 100%;
	height: 100%;
	min-height: 0;
}

.loc-maps-sidebar {
	flex: 0 0 auto;
	flex-shrink: 0;
	width: 360px;
	max-width: 42vw;
	min-height: 0;
	overflow: hidden;
	background: #fff;
	border-left: 1px solid #dcdcde;
	display: flex;
	flex-direction: column;
	box-shadow: -2px 0 12px rgba(0, 0, 0, 0.06);
}

.loc-maps-sidebar-header {
	padding: 16px 18px 12px;
	border-bottom: 1px solid #e8e8e8;
}

.loc-maps-sidebar-title {
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 4px;
}

.loc-maps-sidebar-subtitle {
	font-size: 12px;
	color: #646970;
	margin: 0;
}

.loc-maps-post-list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 8px 0;
	-webkit-overflow-scrolling: touch;
}

.loc-maps-post-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f0f0f1;
	padding: 12px 18px 16px;
	transition: background-color 0.15s;
}

.loc-maps-post-card:hover,
.loc-maps-post-card.is-active {
	background: #f6f7f7;
}

.loc-maps-post-card.is-active {
	background: #e7f5fe;
}

.loc-maps-post-card-img-wrap {
	margin-bottom: 10px;
}

.loc-maps-post-card-img {
	width: 100%;
	height: auto;
	max-height: 170px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
	background: #e8e8e8;
}

.loc-maps-post-card-body {
	min-width: 0;
}

.loc-maps-post-card-title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 4px;
	line-height: 1.35;
}

.loc-maps-post-card:hover .loc-maps-post-card-title {
	color: #0073aa;
}

.loc-maps-post-card-date,
.loc-maps-post-card-meta {
	font-size: 12px;
	color: #646970;
	margin: 0;
	line-height: 1.4;
}

.loc-maps-post-card-meta {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.loc-maps-empty,
.loc-maps-loading {
	padding: 24px 18px;
	font-size: 13px;
	color: #646970;
	text-align: center;
}

.loc-maps-loading::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	border: 2px solid #c3c4c7;
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: locmgr-spin 0.7s linear infinite;
	vertical-align: middle;
}

@keyframes locmgr-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Hide theme footer on /maps and /maps+lat,lon */
body.locmgr-maps-route footer,
body.locmgr-maps-route .site-footer,
body.locmgr-maps-route #colophon {
	display: none !important;
}

@media (max-width: 782px) {
	.loc-maps-layout {
		flex-direction: column;
	}

	.loc-maps-main {
		flex: 1 1 55%;
		min-height: 200px;
	}

	.loc-maps-sidebar {
		flex: 1 1 45%;
		width: 100%;
		max-width: none;
		border-left: none;
		border-top: 1px solid #dcdcde;
		box-shadow: none;
	}
}
