.icon-btn {
    width: 50px;
    border: 1px solid #f00;
    height: 50px;
    background: #fff;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.1s, filter 0.2s;
}

.icon-btn:active {
    transform: scale(0.9); /* Hiệu ứng lún xuống khi nhấn */
    filter: brightness(1.2);
}

/* XÓA HOẶC SỬA đoạn pointer-events cũ nếu bạn đã thêm */
.map-layer-btn {
    pointer-events: auto !important; 
}
.map-layer-btn img {
    pointer-events: none; /* Ảnh không nhận sự kiện click, click sẽ xuyên xuống nút */
    user-select: none;
}
/* ===== Bộ lọc (trong Toolbox) ===== */
.filter-panel {
	display: none;
	margin-top: 8px;
	padding: 8px;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	font-size: 13px;
}

.filter-panel.show {
	display: block;
}

.filter-row {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}

.filter-row > label {
	font-weight: 600;
	margin-right: 6px;
}

.filter-panel input[type="number"] {
	width: 92px;
}

.filter-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: space-between;
}

.filter-count {
	opacity: 0.7;
	font-size: 12px;
	margin-left: auto;
}
/* ===== End Bộ lọc (trong Toolbox) ===== */

/* Hộp TOOLBOX (⚙️) */
.leaflet-control.toolbox {
	position: relative;
	display: flex;
	background: transparent;
	border: none;
	z-index: 1500;
	align-items: flex-end;
}
/* Popup & badge */
.leaflet-popup-content {
	min-width: 260px;
}

.badge {
	display: inline-block;
	padding: 6px 10px;
	border-radius: 10px;
	border: 1px solid #e3e3e3;
	background: #f9f9f9;
	margin-right: 6px;
	margin-bottom: 6px;
}

.badge b {
	display: block;
	font-size: 16px;
	margin-top: 2px;
}

.section-title {
	margin: 8px 0 4px;
	font-weight: bold;
}
/* Loại bỏ hiệu ứng trễ khi di chuyển popup */
.leaflet-popup {
	transition: none !important;
}
/* Nhãn tên xã */
.label-xa {
	font-size: 12px;
	font-weight: 600;
	color: #222;
	text-shadow: 1px 1px 2px #fff;
	pointer-events: none;
	white-space: nowrap;
}

/* Sắp hàng các control góc phải để không đè nhau */
.leaflet-top.leaflet-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

/* Nếu vẫn muốn đẩy LayerControl xuống thêm một chút: */
.leaflet-top.leaflet-right .leaflet-control-layers {
	margin-top: 4px;
}

.toolbox-header {
	display: flex;
	flex-direction: column;
 /* xếp dọc: ↻ nằm dưới ⚙️ */
	gap: 6px;
	align-items: flex-end;
}

#toggleToolboxBtn,
#reloadPageBtn {
	font-size: 20px;
	border: 1px solid #888;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	width: 50px;
	height: 50px;
	transition: 0.2s;
}

#toggleToolboxBtn:hover,
#reloadPageBtn:hover {
	background: #f0f0f0;
}

#toggleToolboxBtn:hover {
	background: #f0f0f0;
}

.toolbox-content {
	display: none;
	flex-direction: column;
	align-items: flex-start;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid #ccc;
	padding: 8px;
	border-radius: 8px;
	margin-top: 4px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toolbox-content.open {
	display: flex;
}

.toolbox-content button {
	margin: 3px 0;
	padding: 8px;
	border: 1px solid #888;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	cursor: pointer;
	width: 140px;
	text-align: left;
	transition: 0.2s;
}

.toolbox-content button:hover {
	background: #eaeaea;
}

.toolbox-content button.off {
	opacity: 0.5;
}

.zoom-btns {
	display: flex;
	justify-content: space-between;
	width: 100%;
}

.zoom-btns button {
	width: 40px;
	text-align: center;
}

.txtcsv {
	width: 48% !important;
}

.map-layer-btn {
	font-size: 18px;
	margin: 0 2px;
	cursor: pointer;
	border: 1px solid #ab0808 !important;
	border-radius: 4px;
	background: #fff !important;
	transition: all 0.2s;
}

.map-layer-btn:hover {
	background: #f0f0f0;
	transform: scale(1.1);
}
@media (max-width: 767.99px) {
    .leaflet-top.leaflet-right {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        gap: 8px;
    }
   .toolbox-header {
        display: flex;
        gap: 16px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }
    div#toolboxWrapper {
    display: flex;
    flex-direction: column;
}
.toolbox-content.open {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}
}