#map-listings-wrapper {
  display: flex;
  overflow: hidden;
  position: relative;
  height: calc(-78px + 100vh);
}

.section-featured-listings {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 35%;
  z-index: 998;
  padding: 16px;
  padding-right: 0;
  transition: transform 0.3s ease;
  border-top: 1px solid #ccc;
}

.section-featured-listings.collapsed {
  transform: translateX(-100%);
  padding: 0;
}

.section-featured-listings.collapsed .tf-container .box-house {
  border: none;
  box-shadow: none;
}

.section-featured-listings.collapsed .tf-container {
  overflow: hidden
}

.section-featured-listings .tf-container {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  padding-right: 16px;
}

.section-featured-listings .btn-toggle-sidebar {
  position: absolute;
  top: 50%;
  right: -36px;
  transform: translateY(-50%);
  width: 36px;
  height: 88px;
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.btn-toggle-sidebar:hover {
  background-color: #f5f5f5;
}

#map {
  width: 100%;
  height: 100%;
}

.popup-box {
  display: flex;
  width: 250px;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.popup-image-wrapper {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
}

.popup-image-wrapper:hover .popup-image {
  transform: scale(1.2);
}

.popup-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: all linear 0.15s;
}


.popup-content-wrapper {
  margin: 5px 0;
  padding: 0 0 0 10px;
  flex: 1;
}

.popup-content-title {
  font-size: 12px;
  font-weight: 500;
  text-shadow: none;
  display: block;
  line-height: 1.1;
  padding-right: 15px;
}

.popup-content-title:hover {
  text-decoration: underline;
}

.popup-content-slogan {
  font-size: 10px;
  color: #929292;
  font-weight: 400;
  display: block;
  margin: 2px 0 2px;
}

.leaflet-popup-content {
  margin: 0.5rem !important;
}

.leaflet-top.leaflet-left {
  user-select: none;
}

#custom-property-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#custom-property-popup {
  width: 50vw;
  min-width: 800px;
  height: 80vh;
  background: #fff;
  border-radius: 10px;
  padding: 0 20px 20px;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.popup-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  padding-top: 20px;
  padding-right: 40px;
  border-bottom: 1px solid #eee;
}

.custom-close-btn {
  position: absolute;
  top: 10px;
  right: 0;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 11;
  color: #333;
}

#custom-property-popup .custom-close-btn:hover {
  color: #d33;
}

.custom-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1001;
  color: #333;
}

.property-link {
  font-weight: 500;
  color: #0078A8;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.property-link:hover {
  text-decoration: underline;
}

.chart-wrapper {
  /* width: 100%;
  min-width: auto; */
  min-height: 250px;
}

/* chart */
.tab-content > .demographic-population-tab-pane.tab-pane.active  {
  overflow-x: auto;
  display: flex;
  align-items: center;
}

#demographic-population-tab-pane .col-12,
#demographic-population-tab-pane .col-sm-6 {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    padding: 0 0 16px 0 !important;
}

#demographic-population-tab-pane .demographic-chart {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}

#divTablePopulationRadis table {
    width: 100% !important;
    table-layout: fixed;
}

#demographic-population-tab-pane .row.align-items-center {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1.5rem;
    min-width: 100% !important;
    margin: 0;
}

#demographic-population-tab-pane .row > .col-12 {
    flex: 0 0 auto !important;
    width: 50% !important;
    padding-right: 8px;
    min-height: 250px;
}

#demographic-population-tab-pane .row.mb-3, #demographic-population-tab-pane .row.mb-4 {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1.5rem;
    min-width: 100%;
    margin-right: 15px !important;
    margin-left: 0 !important;
}

.demographic-chart {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}

/* canvas {
  width: 100% !important;
  height: 100% !important;
} */

/* custom flex col */
.map-item-box {
  display: flex;
  flex-direction: row !important;
}

.map-item-box .image-wrap {
  width: 200px;
}

/* custom popup view property detail */
.section-featured-listings .property-detail-view {
  position: absolute;
  top: 50%;
  right: -600px;
  transform: translateY(-50%);
  width: 600px;
  height: calc(100% - 10vh);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 1000;
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
  padding: 0 20px 20px;
  display: none;
}

.section-featured-listings.collapsed .property-detail-view.open  {
  transform: translateX(-1100px);
  /* padding: 0; */
}

.section-featured-listings .property-detail-view.open {
  display: flex;
  flex-direction: column;
}

.section-featured-listings .property-detail-view .custom-popup-inner div#demographic-weather-tab-pane {
  max-height: unset;
}

.overview-lst-property {
  display: flex;
}

.overview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  box-sizing: border-box;
  height: 100%;
}

.leaflet-custom-icon .blinking-marker-inner {
  width: 50px;
  height: 50px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
  border-radius: 50%;
}

/* css for tablet mobile */
@media (max-width: 1200px) {
  #map-listings-wrapper .box-house {
    display: flex;
    flex-direction: column !important;
  }

  #map-listings-wrapper .box-house .image-wrap.img-box-4-3 {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    max-width: unset;
  }

  #map-listings-wrapper .box-house .content .overview-lst-property {
    justify-content: unset;
  }

  #map-listings-wrapper .box-house .content .overview-lst-property {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  #map-listings-wrapper .box-house .content .overview-lst-property .overview-item {
    flex: 1 1 calc((100% - 24px) / 3);
    margin-right: 6px;
  }
}

@media (max-width: 768px) {
  .section-featured-listings {
    width: 66.6666%;
  }

  .section-featured-listings.collapsed .property-detail-view.open {
    width: 100%;
    transform: unset;
    top: 0;
    right: -100%;
    height: 100%;
  }

  #map-listings-wrapper .box-house .content .overview-lst-property .overview-item {
    width: 50%;
  }

  #map-listings-wrapper .box-house .content .overview-lst-property .overview-item .content .font-size-12 {
    font-size: 10px;
  }

  .section-featured-listings .btn-toggle-sidebar {
    width: 25px;
    height: 50px;
    right: -25px;
  }

  #map-listings-wrapper i.ri-arrow-right-s-line {
    font-size: 22px !important;
  }

  #map-listings-wrapper .box-house .content .overview-lst-property {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
  }

  #demographic-population-tab-pane .row > .col-12 {
    flex: 0 0 auto !important;
    width: 100% !important;
    padding-right: 8px;
    min-height: 250px;
  }

  #demographic-population-tab-pane .row.mb-3, #demographic-population-tab-pane .row.mb-4 {
    display: flex !important;
    flex-direction: column;
  }
}

.overview-lst-property {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.overview-lst-property .overview-item {
    flex: 1 1 calc((100% - 24px) / 3);
    min-width: 100px;
}
