/* ── Dealer Map ── */
.dm-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	color: #333;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
}

/* ── Controls bar ── */
.dm-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding: 10px 12px;
	background: #f7f7f7;
	border-bottom: 1px solid #ddd;
}
.dm-controls input[type="text"],
.dm-controls select {
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 13px;
	background: #fff;
	outline: none;
}
.dm-controls input[type="text"] { flex: 1; min-width: 160px; }
.dm-controls select { min-width: 140px; }
.dm-check-label {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
}
.dm-reset {
	padding: 6px 12px;
	background: #e0e0e0;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
	color: #555;
	margin-left: auto;
}
.dm-reset:hover { background: #ccc; }

/* ── Body (sidebar + map) ── */
.dm-body {
	display: flex;
	height: 540px;
}

/* ── Sidebar ── */
.dm-sidebar {
	width: 280px;
	min-width: 240px;
	display: flex;
	flex-direction: column;
	border-right: 1px solid #ddd;
	background: #fff;
}
.dm-count {
	padding: 8px 12px;
	font-size: 12px;
	color: #888;
	border-bottom: 1px solid #eee;
	background: #fafafa;
}
.dm-list {
	flex: 1;
	overflow-y: auto;
}
.dm-list-item {
	padding: 10px 12px;
	border-bottom: 1px solid #f0f0f0;
	cursor: pointer;
	transition: background 0.15s;
}
.dm-list-item:hover { background: #f5f9ff; }
.dm-list-item.dm-active { background: #e8f0fe; border-left: 3px solid #1a73e8; }
.dm-list-item .dm-item-name {
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 2px;
}
.dm-list-item .dm-item-street {
	font-size: 12px;
	color: #555;
	margin-bottom: 1px;
}
.dm-list-item .dm-item-meta {
	font-size: 12px;
	color: #999;
}
.dm-no-results {
	padding: 20px 12px;
	color: #999;
	font-size: 13px;
	text-align: center;
}

/* ── Map ── */
.dm-map {
	flex: 1;
}

/* ── Layout: map-top ── */
.dm-wrapper.dm-layout-map-top .dm-body {
	flex-direction: column;
	height: auto;
}
.dm-wrapper.dm-layout-map-top .dm-sidebar {
	width: 100%;
	border-right: none;
	border-top: 1px solid #ddd;
	height: 280px;
}
.dm-wrapper.dm-layout-map-top .dm-map {
	height: 400px;
	flex: none;
}

/* ── Layout: overlay ── */
.dm-wrapper.dm-layout-overlay .dm-body { position: relative; }
.dm-wrapper.dm-layout-overlay .dm-map { width: 100%; }
.dm-wrapper.dm-layout-overlay .dm-sidebar {
	position: absolute;
	top: 0; left: 0; bottom: 0;
	z-index: 10;
	box-shadow: 2px 0 8px rgba(0,0,0,0.15);
	transform: translateX(0);
	transition: transform 0.25s ease;
}
.dm-wrapper.dm-layout-overlay .dm-sidebar.dm-collapsed {
	transform: translateX(-100%);
}
.dm-toggle-btn {
	display: none;
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 11;
	padding: 7px 10px;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0,0,0,0.2);
	font-size: 13px;
}
.dm-wrapper.dm-layout-overlay .dm-toggle-btn { display: block; }

/* ── Responsive ── */
@media (max-width: 640px) {
	.dm-body { flex-direction: column; height: auto; }
	.dm-sidebar { width: 100%; border-right: none; border-top: 1px solid #ddd; height: 260px; }
	.dm-map { height: 320px; }
	.dm-wrapper.dm-layout-overlay .dm-sidebar {
		position: static;
		transform: none;
		box-shadow: none;
	}
	.dm-wrapper.dm-layout-overlay .dm-toggle-btn { display: none; }
}
