body, html {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Chỉ chặn scroll trên trang bản đồ; trang profile, chỉnh sửa... cho phép scroll */
html.map-page, body.map-page {
    overflow: hidden;
}
/* Tạo class tùy chỉnh */
.s-20 { font-size: 20px; font-variation-settings: 'opsz' 20; }
.s-24 { font-size: 24px; font-variation-settings: 'opsz' 24; }
.s-40 { font-size: 40px; font-variation-settings: 'opsz' 40; }
.s-48 { font-size: 48px; font-variation-settings: 'opsz' 48; }
.s-36 { font-size: 36px; font-variation-settings: 'opsz' 36; }

/* Container bản đồ */
#map {
    height: 100vh;
    width: 100vw;
    z-index: 1;
}

/* --- UI OVERLAYS --- */
.ui-overlay {
    position: absolute;
    z-index: 1000;
    pointer-events: none; /* Cho phép click xuyên qua nếu không trúng element con */
    width: 100%;
}

/* Top Bar: Search & Icons */
.top-bar {
    top: 20px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.search-container {
    background: white;
    border-radius: 30px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    width: 350px;
    cursor: pointer;
}

.search-container input {
    border: none;
    outline: none;
    margin-left: 10px;
    width: 100%;
}

.user-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    background: white;
    border-radius: 30px;
    padding: 4px 15px;
}

.icon-circle {
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4d;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
}

/* Notification dropdown */
.notification-dropdown .icon-circle {
    pointer-events: auto;
}
.notification-dropdown-menu {
    min-width: 320px;
    max-width: 360px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 12px;
    border: none;
    z-index: 1055;
}
.notification-dropdown-header {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}
.notification-item {
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.notification-item:hover {
    background-color: rgba(246, 103, 20, 0.08);
}
.notification-detail-body {
    white-space: pre-wrap;
    line-height: 1.6;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Bottom Bar */
.bottom-bar {
    bottom: 0;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    border-top: 1px solid #ddd;
}

.filter-btn, .feedback-btn {
    background: #efefed;
    border: none;
    color: #f66714;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: -20px;
    height: 100%;
}
.filter-btn{
    border-radius: 0 10px 0 0;
}
.feedback-btn{
    border-radius:10px 0 0 0 ;
}

.filter-btn i { color: #f39c12; }
.feedback-btn i { color: #f39c12; }

/* Offcanvas bộ lọc - trượt từ trái, hiển thị trên map */
#listingFilterOffcanvas.offcanvas {
	z-index: 1050;
}
/* Khoảng giá - Từ/Đến hiển thị phía trên slider */
#listingFilterOffcanvas .filter-price-label-row {
	font-size: 0.9rem;
}
#listingFilterOffcanvas .filter-price-value {
	color: #f66714;
	font-size: 1.1rem;
	font-weight: 500;
}

#listingFilterOffcanvas .noUi-target {
	border: 1px solid #ddd;
}
#listingFilterOffcanvas .noUi-connect {
	background: #f66714;
}
#listingFilterOffcanvas .noUi-handle {
	border-color: #f66714;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	right: -10px;
	top: -1px;
}
#listingFilterOffcanvas .noUi-horizontal .noUi-handle {
	width: 20px;
	height: 20px;
	right: -10px;
	top: -8px;
}
#listingFilterOffcanvas .noUi-handle:before,
#listingFilterOffcanvas .noUi-handle:after {
	display: none;
}
/* Loại xe - Label + btn group cùng hàng, btn nhỏ */
#listingFilterOffcanvas .filter-car-type-row {
	display: flex;
	align-items: center;
	gap: 12px;
}
#listingFilterOffcanvas .filter-car-type-row .filter-car-type-label {
	flex-shrink: 0;
	white-space: nowrap;
}
#listingFilterOffcanvas .filter-car-type-group {
	flex: 1;
}
#listingFilterOffcanvas .filter-car-type-group .btn-outline-warning {
	flex: 1;
	font-size: 0.8rem;
	padding: 0.25rem 0.5rem;
    color: black;
}
#listingFilterOffcanvas .filter-car-type-group .btn-check:checked + .btn-outline-warning {
	background-color: #f66714;
	border-color: #f66714;
	color: #fff;
}
/* Lọc nâng cao - nút mở rộng */
#listingFilterOffcanvas #btn_advanced_filter {
	color: #f66714;
	gap: 4px;
}
#listingFilterOffcanvas #btn_advanced_filter:hover {
	color: #e55a0a;
}
/* Hãng xe - search + checkbox, 4 hiển thị ban đầu */
#listingFilterOffcanvas .filter-brand-checkbox-list:not(.filter-brand-expanded) .filter-brand-item:nth-child(n+5) {
	display: none !important;
}
#listingFilterOffcanvas .filter-brand-checkbox-list .filter-brand-item {
	margin-bottom: 0.25rem;
}
#listingFilterOffcanvas #btn_show_all_brands {
	color: #f66714;
}

/* Offcanvas chi tiết bài đăng - trượt từ trái (offcanvas-start) */
#listingDetailOffcanvas.offcanvas {
	z-index: 1050;
	max-width: 95vw;
}
#listingDetailOffcanvas .listing-detail-car-item:hover {
	background-color: rgba(0,0,0,0.05);
}

/* Modal chia sẻ - giống Google Maps */
.share-social-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	transition: transform 0.2s, opacity 0.2s;
}
.share-social-btn:hover {
	transform: scale(1.1);
	opacity: 0.9;
}

/* ===== Bán Xe Button - Thuần background hình ảnh thiết kế sẵn ===== */
.sell-button-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    pointer-events: auto;
}

.sell-btn {
    width: 340px;
    height: 115px;
    padding: 0;
    border: none;
    background: url('/assets/frontend/dist/images/ban-xe.svg') center / contain no-repeat;
    cursor: pointer;
    font-family: inherit;
}

.sell-btn:active {
    transform: scale(0.98);
}
.sell-btn-text{
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    font-size: 20px;
    font-weight: bold;
    z-index: 2002;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s ease;
    font-family: inherit;
}
.sell-btn:hover .sell-btn-text{
    opacity: 1;
    visibility: visible;
}


/* Zoom controls positioning */
.leaflet-bottom.leaflet-right {
    bottom: 70px !important;
}
/* Custom Marker - 1 cụm: tròn + mũi tên, scale đồng bộ */
.car-marker-pin {
    position: relative;
    width: 36px;
    height: 44px;
    transform-origin: 18px 44px;
    transition: transform 0.2s ease-out;
    cursor: pointer;
}
.leaflet-marker-icon .car-marker-pin {
    cursor: pointer;
}

.car-marker-pin:hover {
    transform: scale(1.2);
    z-index: 9999;
}

/* Hình tròn - ảnh làm background */
.car-marker-img {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e0e0e0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    border: 2px solid #fff;
}

/* Mũi tên - cùng cụm, scale với wrapper */
.car-marker-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    margin-left: -9px;
    top: 33px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 11px solid #fff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
    pointer-events: none;
}

.marker-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #f39c12;
    color: white;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid white;
}

/* Modal Đăng bán xe */
#sellCarModal .sell-car-image-upload {
    min-height: 120px;
    transition: background-color 0.2s;
}
#sellCarModal .sell-car-image-upload:hover {
    background-color: rgba(0,0,0,.04);
}
#sellCarModal .sell-car-image-upload label {
    cursor: pointer;
    display: block;
}

/* Phân loại Salon/Cá nhân - active màu cam chủ đạo */
#sellCarModal .seller-type-group .btn-check:checked + .btn {
    background-color: #f66714;
    border-color: #f66714;
    color: #fff;
}
#sellCarModal .seller-type-group .btn {
    border-color: #dee2e6;
}
#sellCarModal .seller-type-group .btn:hover {
    border-color: #f66714;
    color: #f66714;
}
/* Nhóm Loại xe - Sell modal + Edit form - active màu cam */
.car-type-group .btn-check:checked + .btn,
#sellCarModal .car-type-group .btn-check:checked + .btn {
    background-color: #f66714;
    border-color: #f66714;
    color: #fff;
}
.car-type-group .btn,
#sellCarModal .car-type-group .btn {
    border-color: #dee2e6;
}
.car-type-group .btn:hover,
#sellCarModal .car-type-group .btn:hover {
    border-color: #f66714;
    color: #f66714;
}
#sellCarModal .sell-car-submit-btn {
    background-color: #f66714;
    border-color: #f66714;
}
#sellCarModal .sell-car-submit-btn:hover {
    background-color: #e55a0a;
    border-color: #e55a0a;
}
#filter_price_slider.noUi-horizontal {
    height: 10px;
}

@media (max-width: 480px) {
    .sell-btn {
        width: 170px;
        height: 70px;
    }
    .filter-btn, .feedback-btn{
        font-weight: normal;
    font-size: 13px;
    }
}