/* Global Styles */
html, body, #map {
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* Map Styles */
#map {
  transition: margin-left 0.3s;
}

/* Sidebar Styles */
#sidebar {
  width: 275px;
  max-width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: rgb(150, 84, 88);
  z-index: 1000;
  padding: 18px;
  overflow: hidden;
  transition: 0.3s;
}

#sidebar.collapsed {
  width: 60px;
  padding: 10px 0;
}

#sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: -3px;
  width: 3px;
  height: 100%;
  background: #242424;
  z-index: 999;
}

#sidebar h4 {
  transition: opacity 0.3s;
  color: white;
  margin-bottom: 20px;
}

#sidebar.collapsed h4 {
  opacity: 0;
}

/* Filter Item Styles */
.filter-item {
  margin-bottom: 65px;
  transition: none;
}

.filter-item label {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
  color: white;
}

.filter-label-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.filter-label {
  transition: opacity 0.3s, width 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}

.filter-label-wrapper i {
  margin-right: 10px;
  width: 24px;
  text-align: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  width: 100%;
}

.filter-label {
  transition: opacity 0.3s, width 0.3s;
  font-size: 18px;
}

/* Slider Styles */
.slider-container {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 50px;
}

.noUi-horizontal {
  height: 8px;
  flex-grow: 1;
  margin-right: 10px;
}

.slider-value {
  color: white;
  font-size: 12px;
  white-space: nowrap;
  margin-left: auto;
  min-width: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 2px 8px;
  display: flex;           /* Change to flex display */
  align-items: center;     /* Vertically center the content */
  justify-content: center; /* Horizontally center the content */
  height: 24px;            /* Set a fixed height */
}

/* noUiSlider Custom Styles */
.noUi-connect {
  background: #3498db;
}

.noUi-handle {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50%;
  background: #3498db;
  box-shadow: none;
  border: none;
  right: -9px !important;
}

.noUi-handle:before, 
.noUi-handle:after {
  display: none;
}

.noUi-tooltip {
  display: none;
}

/* Pips Styles */
.noUi-pips {
  padding: 10px 0 20px; /* Added padding at the bottom */
}

.noUi-value {
  color: white;
  font-size: 12px;
  transform: translate(-50%, 50%);
}

.noUi-marker {
  display: none;
}

.noUi-marker-horizontal.noUi-marker-large {
  display: block;
  background: white;
  width: 2px;
  height: 8px;
}

.noUi-value-large {
  font-weight: bold;
}

/* Hide small pips and show only large ones */
.noUi-marker-normal {
  display: none;
}

.noUi-value-horizontal {
  transform: translate(-50%, 100%);
  margin-top: -10px; /* Increased from 5px */
  font-size: 12px;
}

/* Specific style for price slider to show all pips */
#price-range-slider .noUi-marker {
  display: block;
}

/* Pets Filter Styles */
.pets-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  margin-bottom: 15px;

}

.pets-filter label {
  flex-grow: 1;
  margin-bottom: 0;
}

#pets-allowed {
  width: 20px;
  height: 20px;
  margin-left: 10px;
}

.fa-paw {
  transition: color 0.3s;
}

.pets-allowed-checked {
  color: #3498db;
}

/* Collapsed Sidebar Styles */
#sidebar.collapsed .filter-item {
  transform: none; /* Remove any transform */
  margin-bottom: 65px; /* Consistent margin in both states */
  display: flex;
  justify-content: center; /* Center horizontally */
}

#sidebar.collapsed .filter-header {
  width: 40px; /* Set a fixed width for the icon container */
  height: 40px; /* Set a fixed height for the icon container */
  margin: 0; /* Remove any margin */
  display: flex;
  justify-content: center;
  align-items: center;
}

#sidebar.collapsed .filter-label-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

#sidebar.collapsed .filter-label-wrapper i {
  margin: 0; /* Remove any margin */
  width: 40px;
  height: 40px;
  font-size: 24px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#sidebar.collapsed .filter-item label {
  justify-content: center;
}

#sidebar.collapsed .filter-item label i {
  margin-right: 0;
  width: 40px;
  height: 40px;
  font-size: 28px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

#sidebar.collapsed .filter-label,
#sidebar.collapsed .slider-container,
#sidebar.collapsed .slider-value,
#sidebar.collapsed .pets-filter input[type="checkbox"] {
  display: none;
}

/* Sidebar Toggle Button Styles */
#sidebarToggle {
  position: absolute;
  top: 10px; /* Align with the first icon */
  left: 275px;
  z-index: 1100;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: left 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgb(150, 84, 88);
  border-radius: 0 5px 5px 0;
}

#sidebarToggle i {
  font-size: 28px;
  color: white;
}

#sidebar.collapsed + #sidebarToggle {
  left: 60px;
}

/* Map Margin Adjustment */
#sidebar ~ #map {
  margin-left: 275px;
  transition: margin-left 0.3s;
}

#sidebar.collapsed ~ #map {
  margin-left: 60px;
}

/* Popup Styles */
.leaflet-popup-content {
  max-width: 500px;
  font-family: Arial, sans-serif;
}

.popup-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.popup-header {
  font-size: 18px;
}

.popup-left {
  text-align: left;
}

.popup-right {
  text-align: right;
}

.popup-full {
  grid-column: 1 / -1;
}

.popup-header {
  grid-column: 1 / -1;
  text-align: center;
  color: #333;
  margin-bottom: 10px;
}

.popup-datum {
  margin: 5px 0;
  font-size: 14px;
  color: #666;
}
.popup-datum-addl {
  padding-left: 20px;
  font-size: 12px;
  font-style: italic;
  color: #666;
}

.popup-datum strong {
  font-weight: bold;
  color: #333;
}


.popup-datum-title {
  font-weight: bold;
  font-size: 14px;
  color: #333;
  padding-top: 5px;
}
.popup-description {
  font-style: italic;
  font-size: 13px;
  color: #555;
  background-color: #f0f0f0; /* Light grey background */
  border-radius: 8px; /* Rounded corners */
  padding: 10px; /* Space inside the box */
  margin: 10px 0; /* Space above and below the box */
  border: 1px solid #ddd; /* Light border */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow for depth */
  width: 95%; /* Slightly less than full width */
  margin-left: auto;
  margin-right: auto;
}

.popup-header-item {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 0px;
  color: rgb(150, 84, 88);
}

.popup-left .popup-header-item {
  text-align: left;
}

.popup-right .popup-header-item {
  text-align: right;
}

.popup-url {
  font-size: 12px;
  word-break: break-all;
}

/* Carousel Styles */
.carousel {
  margin-top: 10px;
  margin-bottom: 10px;
}

.carousel-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 5px;
}

.carousel-control-next-icon,
.carousel-control-prev-icon {
  background-size: contain;
  width: 40px;
  height: 40px;
  background-color: #ff6347FF;
}

.carousel-control-next-icon:hover,
.carousel-control-prev-icon:hover {
  background-color: #ff6347FF;
}

.leaflet-popup-content p {
  margin: 0;
}

#attrib {
  position: absolute;
  bottom: 10px;
  margin: auto;
  color: white;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 10px;
  border-radius: 5px;
}

#attrib a {
  color: white;
  text-decoration: underline;;
}

.furnished-filter {
  margin-top: 20px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.checkbox-group label {
  margin-left: 5px;
  font-size: 14px;
}

#sidebar.collapsed .furnished-filter .checkbox-group {
  display: none;
}

.furnished-filter .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
}

.furnished-filter .checkbox-column {
  flex: 0 0 50%;
  max-width: 50%;
}

.furnished-filter .checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.furnished-filter input[type="checkbox"] {
  margin-right: 5px;
}

.furnished-filter label {
  margin-bottom: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sidebar.collapsed .furnished-filter .checkbox-group {
  display: none;
}

/* Add these styles to style.css */
.price-inputs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

.price-input {
    width: 90px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    background: white;
    color: #333;
}

.price-input-separator {
    color: white;
    font-size: 12px;
}

.slider-container {
    width: 100%;
    margin-bottom: 50px;
}

#sidebar.collapsed .price-inputs-container {
    display: none;
}

/* Update the existing noUi-horizontal style */
.noUi-horizontal {
    height: 8px;
    width: 100%;
}

/* Add these styles to style.css */
.price-inputs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

.price-input {
    width: 100px;
    color: white;
    font-size: 12px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2px 8px;
    height: 24px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.price-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.3);
}

.price-input-separator {
    color: white;
    font-size: 12px;
}

.slider-container {
    width: 100%;
    margin-bottom: 50px;
}

#sidebar.collapsed .price-inputs-container {
    display: none;
}

/* Update the existing noUi-horizontal style */
.noUi-horizontal {
    height: 8px;
    width: 100%;
}

.price-inputs-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  width: 100%;
}

.price-input-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.price-input-label {
  color: white;
  font-size: 14px;
}

.price-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 65px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  height: 24px;
}

.price-input-prefix {
  position: absolute;
  left: 8px;
  color: white;
  font-size: 13px;
  pointer-events: none;
}

.price-input {
  width: 100%;
  color: white;
  font-size: 13px;
  text-align: center;
  background: transparent;
  border: none;
  padding: 2px 8px 2px 16px;
  /* Increased left padding to accommodate $ */
  height: 100%;
}

.price-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.price-input:focus {
  outline: none;
}

.price-input-wrapper:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.price-input:focus+.price-input-wrapper {
  background-color: rgba(255, 255, 255, 0.3);
}

#sidebar.collapsed .price-inputs-container {
  display: none;
}

/* Update the existing noUi-horizontal style */
.noUi-horizontal {
  height: 8px;
  width: 100%;
}