/* Index Page Custom Styles */

.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* More Filter Modal Responsive Styles */
@media (max-width: 991.98px) {
  #exampleModal .modal-dialog {
    margin: auto;
    max-width: 100%;
    height: 80vh;
  }

  #exampleModal .modal-content {
    height: 70vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }

  #exampleModal .modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #exampleModal .modal-header,
  #exampleModal .modal-footer {
    flex-shrink: 0;
  }
}

/* Desktop Modal Styles */
@media (min-width: 992px) {
  #exampleModal .modal-dialog {
    max-width: 900px;
  }

  #exampleModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
  }
}

/* Ensure modal body scrolls smoothly */
#exampleModal .modal-body {
  padding: 1.5rem;
}

/* Price slider responsive improvements */
#exampleModal .range-slider-style {
  width: 100%;
}

/* List title ellipsis - prevent text wrapping */
.list-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#exampleModal #slider {
  margin: 20px 0;
}

/* Responsive grid for filter options */
@media (max-width: 767.98px) {
  #exampleModal .modal-body .row > .col-sm-6,
  #exampleModal .modal-body .row > .col-sm-4 {
    margin-bottom: 1rem;
  }
}

/* Improve checkbox and radio button layouts on mobile */
@media (max-width: 575.98px) {
  #exampleModal .selection {
    min-width: 43px;
  }

  #exampleModal .checkbox-style1 label {
    font-size: 14px;
  }
}

/* Modal footer responsive */
#exampleModal .modal-footer {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 575.98px) {
  #exampleModal .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  #exampleModal .modal-footer .btn-area {
    width: 100%;
  }

  #exampleModal .modal-footer .btn-area button {
    width: 100%;
  }
}

/* Fix Square Meters spacing - make inputs closer */
#exampleModal .space-area .d-flex.align-items-center.justify-content-between {
  gap: 10px;
}

#exampleModal .space-area .form-style1 {
  flex: 1;
  max-width: calc(50% - 15px);
}

#exampleModal .space-area .dark-color {
  flex-shrink: 0;
  padding: 0 5px;
}

/* Range Slider responsive width for modal */
#exampleModal .range-slider-style1 {
  width: 100%;
}

#exampleModal .range-slider-style1 .range-wrapper {
  width: 100%;
  padding: 0;
}

/* Style for modal slider same as .slider-range */
.slider-range-modal.ui-slider.ui-corner-all.ui-slider-horizontal.ui-widget.ui-widget-content {
  background-color: #F7F7F7;
  border: 1px solid transparent;
  border-radius: 30px;
  height: 3px;
}

#exampleModal .slider-range-modal {
  width: 100%;
}

/* Make price input fields responsive */
#exampleModal .range-slider-style1 .text-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

#exampleModal .range-slider-style1 input.amount,
#exampleModal .range-slider-style1 input.amount2 {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  text-align: center;
}

@media (max-width: 575.98px) {
  #exampleModal .range-slider-style1 input.amount,
  #exampleModal .range-slider-style1 input.amount2 {
    min-width: 100px;
    max-width: 150px;
  }
}

/* Sign In/Register Modal (exampleModalToggle) - Fit to screen */
#exampleModalToggle .modal-dialog {
  max-height: 95vh;
  margin: 0.5rem auto;
}

#exampleModalToggle .modal-content {
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

#exampleModalToggle .modal-body {
  flex: 1;
  overflow-y: auto;
  max-height: calc(95vh - 120px); /* Subtract header and footer approximate height */
}

/* Responsive adjustments for Sign In/Register Modal */
@media (max-width: 575.98px) {
  #exampleModalToggle .modal-dialog {
    margin: 0.25rem;
    max-height: 98vh;
  }

  #exampleModalToggle .modal-content {
    max-height: 98vh;
  }

  #exampleModalToggle .modal-body {
    max-height: calc(98vh - 100px);
  }
}

/* Fix form scrolling for registration tab */
#exampleModalToggle .tab-pane .form-style1 {
  padding-right: 5px;
}

/* Hide scrollbar but keep scroll functionality */
#exampleModalToggle .modal-body {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

#exampleModalToggle .modal-body::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}
