
/* =========================================================
   Dewandaru — Half-Map Listing page (page-scoped)
   Loaded only on the guest property listing page.

   Sticky map:
   Replaces fixed positioning on desktop so the map stops
   at the end of the listing column and does not cover footer.

   Responsive:
   Existing breakpoint <=1200px remains unchanged.
   ========================================================= */


/* ---------- Sticky Map ---------- */

@media (min-width: 1201px) {
  body.half_map .half-map-sec #map-container.fullwidth-home-map {
    position: sticky;
    top: 0; /* May be overridden inline by scripts.js */
    width: 100%;
    height: 100vh;
    z-index: 50;
    margin-bottom: 0;
    overflow: hidden;
  }
}


/* ---------- Filter Panel ---------- */

.half-map-sec .widget-property-search,
.half-map-sec .widget-property-search form.banner-search {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

/* Address input */

.half-map-sec .widget-property-search .form_field.full .form-control {
  background-color: #ffffff;
  border: 1px solid #e0e1e6;
  border-radius: 0;
}

/* Dropdown select */

.half-map-sec .widget-property-search .drop-menu,
.half-map-sec .widget-property-search .drop-menu .select {
  background-color: #ffffff;
}


/* ---------- Empty State ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  margin: 24px 0;
  background: var(--ab-bg);
  border: 1px dashed var(--ab-accent);
  border-radius: var(--ab-radius-lg);
  color: var(--ab-accent);
}

.empty-state-icon {
  margin-bottom: 20px;
  color: var(--ab-accent);
}

.empty-state h3 {
  font-family: var(--ab-font-heading);
  font-weight: var(--ab-font-heading-weight);
  color: var(--ab-primary);
  font-size: 26px;
  margin: 0 0 10px;
}

.empty-state p {
  color: var(--ab-text-muted);
  max-width: 420px;
  margin: 0 0 24px;
  font-family: var(--ab-font-body);
  line-height: var(--ab-line-height-body);
}

.empty-state-reset {
  background: var(--ab-accent);
  border: 1px solid var(--ab-accent);
  color: #ffffff;
  border-radius: var(--ab-radius-pill);
  padding: 10px 28px;
  font-family: var(--ab-font-body);
  font-weight: 600;
  transition:
    background var(--ab-transition),
    border-color var(--ab-transition);
}

.empty-state-reset:hover {
  background: var(--ab-primary);
  border-color: var(--ab-primary);
  color: #ffffff;
}


/* ---------- Price Range and Currency Selects ---------- */

.range-select {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #e0e1e6;
  border-radius: 0;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--ab-font-body);
  color: var(--ab-text);
  cursor: pointer;
}

.range-select:focus {
  border-color: var(--ab-accent);
  outline: none;
  box-shadow: none;
}

/* Uniform control heights */

.half-map-sec .widget-property-search .range-select,
.half-map-sec .widget-property-search .bedrooms-select {
  height: 48px;
  min-height: 48px;
  line-height: 1.5;
}


/* ---------- Bedrooms Multi-Select Dropdown ---------- */

.bedrooms-drop {
  position: relative;
  z-index: 1050;
  width: 100%;
}

.bedrooms-select {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  border: 1px solid #e0e1e6;
  border-radius: 0;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--ab-font-body);
  color: var(--ab-text);
  text-align: left;
  cursor: pointer;
}

.bedrooms-select i {
  color: var(--ab-accent);
  margin-left: 6px;
}

.bedrooms-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1055 !important;
  background: #ffffff;
  border: 1px solid var(--ab-border);
  box-shadow: var(--ab-shadow-md);
  padding: 8px 0;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color:
    color-mix(in srgb, var(--ab-text-muted) 40%, transparent)
    transparent;
}

.bedrooms-panel::-webkit-scrollbar {
  width: 6px;
}

.bedrooms-panel::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 0 var(--ab-radius) var(--ab-radius) 0;
}

.bedrooms-panel::-webkit-scrollbar-thumb {
  background-color:
    color-mix(in srgb, var(--ab-text-muted) 40%, transparent);
  border-radius: 10px;
}

.bedrooms-panel::-webkit-scrollbar-thumb:hover {
  background-color: var(--ab-accent);
}

.bedrooms-panel.open {
  display: block;
}

.bedroom-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  margin: 0;
  font-size: 14px;
  font-family: var(--ab-font-body);
  color: var(--ab-text);
  cursor: pointer;
  white-space: nowrap;
}

.bedroom-option:hover {
  background: color-mix(in srgb, var(--ab-accent) 12%, #ffffff);
}

.bedroom-option input {
  accent-color: var(--ab-accent);
  margin: 0;
  flex-shrink: 0;
}


/* =========================================================
   Property Listing Banner
   Adds a description below the Property heading.
   Scoped to the Property listing page only.
   ========================================================= */

/* Banner content layout */

.ab-property-hero .pager-sec-details {
  display: flex;
  float: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Heading and description wrapper */

.ab-property-hero__copy {
  flex: 0 1 620px;
  max-width: 620px;
  transform: translateY(35px);
}

/* Property heading */

.ab-property-hero .pager-sec-details .ab-property-hero__copy h3 {
  float: none;
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 32px !important;
  font-weight: 500;
  line-height: 1.2;
}

/* Property description */

.ab-property-hero__copy p {
  max-width: 620px;
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Breadcrumb */

.ab-property-hero .pager-sec-details > ul {
  float: none;
  flex-shrink: 0;
  margin: 14px 0 0 auto;
}


/* ---------- Mobile Responsiveness ---------- */

@media (max-width: 767px) {
  /* Property banner layout */

  .ab-property-hero .pager-sec-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .ab-property-hero__copy {
    flex: 0 1 auto;
    max-width: 100%;
  }

  .ab-property-hero__copy p {
    font-size: 13px;
    line-height: 1.5;
  }

  /* Keep breadcrumb aligned to the right */

  .ab-property-hero .pager-sec-details > ul {
    align-self: flex-end;
    margin: 0 0 0 auto;
  }
}


/* ==========================================
   MOBILE FIX — PROPERTY PAGE
   ========================================== */

@media (max-width: 767px) {

    /* Banner: beri ruang agar semua tulisan muat */
    .ab-property-hero {
        position: relative;
        height: auto !important;
        min-height: 360px;
        padding: 70px 0 28px;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* Gambar banner memenuhi area */
    .ab-property-hero .pager-sec__bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        z-index: 0;
    }

    .ab-property-hero .pager-sec__overlay {
        position: absolute;
        inset: 0;
        z-index: 1;
    }

    /* Susun judul, paragraf, dan breadcrumb secara vertikal */
    .ab-property-hero .container {
        position: relative;
        z-index: 2;
    }

    .ab-property-hero .pager-sec-details {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;

        float: none !important;
        width: 100%;
        margin: 0;
        padding: 0 16px;
        box-sizing: border-box;
        text-align: center;
    }

    /* Area judul dan paragraf */
    .ab-property-hero__copy {
        flex: none;
        width: 100%;
        max-width: 100%;
        margin: 0;
        transform: none !important;
    }

    .ab-property-hero .pager-sec-details
    .ab-property-hero__copy h3 {
        float: none;
        margin: 0 0 12px;
        font-size: 28px !important;
        line-height: 1.2;
        text-align: center;
    }

    .ab-property-hero__copy p {
        width: 100%;
        max-width: 100%;
        margin: 0;
        font-size: 13px;
        line-height: 1.5;
        text-align: center;
        overflow-wrap: break-word;
    }

    /* Breadcrumb berada di bawah paragraf */
    .ab-property-hero .pager-sec-details > ul {
        position: relative !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-self: center;

        float: none !important;
        width: auto;
        margin: 0 !important;
        padding: 0;
        text-align: center;
    }

    /* Sembunyikan peta yang sedang error di tampilan HP.
       Filter tetap ditampilkan memenuhi lebar layar. */
    .half-map-sec .row > .col-xl-6:first-child {
        display: none !important;
    }

    .half-map-sec .row > .col-xl-6:last-child {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .half-map-sec .widget-property-search {
        width: 100%;
    }
}
