/* ── DJM Custom Map – frontend ── */

/* ── Overall wrapper ── */
.djm-map-wrap {
	width: 100%;
}

/* ── Category filter bar ── */
.djm-cat-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.djm-cat-btn {
	padding: 6px 16px;
	border: 2px solid #ddd;
	border-radius: 20px;
	background: #fff;
	color: #444;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.4;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.djm-cat-btn:hover {
	border-color: #555;
	color: #111;
}

.djm-cat-btn.is-active {
	background: #e53935;
	border-color: #e53935;
	color: #fff;
}

/* ── Two-column layout ── */
.djm-map-layout {
	display: flex;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
}

/* ── Card sidebar ── */
.djm-card-sidebar {
	width: 300px;
	flex-shrink: 0;
	height: 100%;
	overflow-y: auto;
	background: #fff;
	border-right: 1px solid #ddd;
}

/* ── Individual card ── */
.djm-card {
	border-bottom: 1px solid #eee;
	transition: background 0.15s;
	border-left: 3px solid transparent;
}

.djm-card.has-coords {
	cursor: pointer;
}

.djm-card.has-coords:hover {
	background: #fafafa;
}

.djm-card.is-active {
	background: #f8f8f8;
	border-left-color: var( --djm-cat-color, #e53935 );
}

.djm-card-thumb {
	width: 100%;
	height: 130px;
	object-fit: cover;
	display: block;
}

.djm-card-body {
	padding: 12px 14px;
}

.djm-card-cat {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #e53935;
	margin-bottom: 3px;
}

.djm-card-title {
	margin: 0 0 5px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: #222;
}

.djm-card-excerpt {
	margin: 0 0 8px;
	font-size: 12px;
	line-height: 1.5;
	color: #666;
}

.djm-card-link {
	font-size: 12px;
	font-weight: 600;
	color: #e53935;
	text-decoration: none;
}

.djm-card-link:hover {
	text-decoration: underline;
}

.djm-no-locations {
	padding: 20px;
	color: #888;
	font-size: 14px;
}

/* ── Map panel ── */
.djm-map-container {
	flex: 1;
	height: 100%;
	min-height: 400px;
}

.djm-map-container.leaflet-container {
	height: 100%;
	width: 100%;
}

/* ── Marker icon ── */
.djm-marker-icon {
	background: transparent;
	border: none;
	line-height: 0;
	filter: drop-shadow( 0 2px 4px rgba(0,0,0,.35) );
	cursor: pointer;
	transition: transform 0.15s ease;
}

.djm-marker-icon:hover {
	transform: scale( 1.15 );
}

/* ── Popup ── */
.djm-popup {
	font-family: inherit;
	max-width: 260px;
}

.djm-popup-thumb {
	display: block;
	width: 100%;
	height: 130px;
	object-fit: cover;
	margin-bottom: 8px;
}

.djm-popup-cat {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #e53935;
	margin-bottom: 3px;
}

.djm-popup-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #222;
}

.djm-popup-excerpt {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.5;
	color: #555;
}

.djm-popup-btn {
	display: inline-block;
	padding: 6px 14px;
	background: #e53935;
	color: #fff;
	text-decoration: none;
	border-radius: 3px;
	font-size: 13px;
	font-weight: 600;
	transition: background 0.2s;
}

.djm-popup-btn:hover {
	background: #b71c1c;
	color: #fff;
	text-decoration: none;
}

/* Leaflet popup chrome overrides */
.leaflet-popup-content-wrapper {
	border-radius: 4px;
	padding: 0;
	overflow: hidden;
}

.leaflet-popup-content {
	margin: 12px;
}

.leaflet-popup-tip-container {
	margin-top: -1px;
}

/* ── Responsive ── */
@media ( max-width: 700px ) {
	.djm-map-layout {
		flex-direction: column;
		height: auto !important;
	}
	.djm-card-sidebar {
		width: 100%;
		height: 280px;
		border-right: none;
		border-bottom: 1px solid #ddd;
	}
	.djm-map-container {
		height: 350px;
		min-height: 350px;
	}
}
