/* =============================================================================
   MapMap — Frontend Map Styles
   Harita + sağ tarafta hiyerarşik filtre paneli
   ============================================================================= */

/* ── Outer wrapper: map left, panel right ── */
.mapmap-frontend-wrap {
	display: flex;
	align-items: stretch;
	gap: 0;
	font-family: inherit;
}

/* ── Map column ── */
.mapmap-map-area {
	flex: 1 1 auto;
	min-width: 0;
}

#mapmap-frontend-map {
	display: block;
	width: 100%;
	border: 1px solid #dee2e6;
	border-right: none;
	border-radius: 6px 0 0 6px;
}

/* ── Filter panel ── */
.mapmap-filter-panel {
	flex: 0 0 210px;
	width: 210px;
	background: #ffffff;
	border: 1px solid #dee2e6;
	border-radius: 0 6px 6px 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* Panel header */
.mapmap-filter-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px 8px;
	border-bottom: 1px solid #e9ecef;
	background: #f8f9fa;
	flex-shrink: 0;
}

.mapmap-filter-panel-title {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #495057;
}

.mapmap-filter-panel-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.mapmap-text-btn {
	background: none;
	border: none;
	padding: 0;
	font-size: 11px;
	color: #6c757d;
	cursor: pointer;
	text-decoration: underline;
	line-height: 1;
}

.mapmap-text-btn:hover {
	color: #343a40;
}

.mapmap-filter-sep {
	font-size: 11px;
	color: #ced4da;
}

/* Scrollable body */
.mapmap-filter-body {
	overflow-y: auto;
	flex: 1 1 auto;
	padding: 6px 0;
}

/* ── Category groups ── */
.mapmap-filter-group {
	padding: 2px 0;
}

.mapmap-filter-group + .mapmap-filter-group {
	border-top: 1px solid #f0f0f0;
	margin-top: 2px;
	padding-top: 4px;
}

/* Parent label */
.mapmap-filter-parent-label {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 5px 12px 5px 10px;
	cursor: pointer;
	user-select: none;
	font-size: 13px;
	font-weight: 600;
	color: #343a40;
	transition: background .12s;
}

.mapmap-filter-parent-label:hover {
	background: #f8f9fa;
}

/* Child labels — indented */
.mapmap-filter-children {
	padding-left: 8px;
}

.mapmap-filter-child-label {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 4px 12px 4px 18px;
	cursor: pointer;
	user-select: none;
	font-size: 12.5px;
	font-weight: 400;
	color: #495057;
	transition: background .12s;
}

.mapmap-filter-child-label:hover {
	background: #f8f9fa;
}

/* Mini teardrop pin in filter panel (mirrors map marker) */
.mapmap-filter-pin-sm {
	display: inline-block;
	position: relative;
	width: 16px;
	height: 16px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	border: 2px solid rgba(255,255,255,.85);
	box-shadow: 0 1px 4px rgba(0,0,0,.28);
	flex-shrink: 0;
}

/* Icon inside the mini pin (counter-rotated to appear upright) */
.mapmap-filter-pin-icon-sm {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	margin-top: -4.5px;
	margin-left: -4.5px;
	object-fit: contain;
	transform: rotate(45deg);
	border-radius: 1px;
}

/* Category name */
.mapmap-filter-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

/* Checkboxes */
.mapmap-filter-parent-label input[type="checkbox"],
.mapmap-filter-child-label input[type="checkbox"] {
	margin: 0;
	cursor: pointer;
	flex-shrink: 0;
	accent-color: #2271b1;
}

/* ── Leaflet Popup ── */
.leaflet-popup-content-wrapper {
	border-radius: 8px !important;
	padding: 0 !important;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,.18) !important;
}

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

.mapmap-popup {
	min-width: 200px;
	max-width: 270px;
}

.mapmap-popup-image {
	width: 100%;
	height: 145px;
	object-fit: cover;
	display: block;
}

.mapmap-popup-body {
	padding: 11px 14px 14px;
}

.mapmap-popup-title {
	font-size: 15px;
	font-weight: 700;
	color: #1d2327;
	margin: 0 0 5px;
	line-height: 1.3;
}

.mapmap-popup-desc {
	font-size: 13px;
	color: #50575e;
	margin: 0 0 10px;
	line-height: 1.5;
}

.mapmap-popup-link {
	display: inline-block;
	padding: 6px 14px;
	background: #2271b1;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	transition: background .15s;
}

.mapmap-popup-link:hover,
.mapmap-popup-link:focus {
	background: #135e96 !important;
	color: #fff !important;
}

/* ── Custom Marker Icons ── */
.mapmap-pin-wrap {
	position: relative;
	width: 28px;
	height: 38px;
}

.mapmap-pin-circle {
	position: relative;
	width: 28px;
	height: 28px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	border: 3px solid rgba(255,255,255,.9);
	box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* Icon rendered INSIDE the teardrop circle, counter-rotated to appear upright */
.mapmap-pin-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	margin-top: -7px;
	margin-left: -7px;
	object-fit: contain;
	transform: rotate(45deg);
	border-radius: 2px;
}

/* ── Responsive: panel stacks below map on narrow screens ── */
@media screen and (max-width: 640px) {
	.mapmap-frontend-wrap {
		flex-direction: column;
	}

	#mapmap-frontend-map {
		border-right: 1px solid #dee2e6;
		border-bottom: none;
		border-radius: 6px 6px 0 0;
	}

	.mapmap-filter-panel {
		flex: none;
		width: 100%;
		border-radius: 0 0 6px 6px;
		border-top: none;
		max-height: 200px;
	}

	.mapmap-filter-body {
		flex-direction: row;
		flex-wrap: wrap;
	}
}
