/* Search Bar Container */
.search-bar-container {
  position: fixed;
  top: 80px;
  left: 91px;
  width: 320px;

  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 9;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: none;
}

.search-inner-dev {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

/* Animation for showing/hiding */
.search-bar-container.show {
  animation: slideInFromLeft 0.3s ease-out forwards;
}

.search-bar-container.hide {
  animation: slideOutToLeft 0.3s ease-in forwards;
}


@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-128%);
  }
}

.toggle-icon-wrapper {
  width: 20px;
  height: 60px;
  background-color: #a39161;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 49%;
  left: 103%;
  transform: translateY(-50%) translateX(-50%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  cursor: pointer;
  z-index: 2;
}

/* Animation for showing/hiding */
.toggle-icon-wrapper.show {
  animation: toggleslideInFromLeft 0.1s ease-out forwards;
}

.toggle-icon-wrapper.hide {
  animation: toggleSlideOutToLeft 0.3s ease-in forwards;
}

@keyframes toggleslideInFromLeft {
  from {
    left: 0%;
  }

  to {
    left: 103%;
  }
}

@keyframes toggleSlideOutToLeft {
  from {
    left: 103%;
  }

  to {
    left: 128.5%;
  }
}

#searchToggle {
  transform: rotate(-90deg);
  color: white;
  transition: transform 0.3s ease;
}

/* Search Bar Header */
.search-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.search-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  color: #fff;
  transition: all 0.2s ease;
}

.search-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.search-close-btn {
  background: #a39161;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  color: #fff;
  transition: all 0.2s ease;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-close-btn:hover {
  background: #a39161;
  transform: scale(1.05);
}

/* Search Bar Content */
.search-bar-content {
  padding: 20px;
  display: block;
}

/* Search Input Group */
.search-input-group {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #a39161;
  box-shadow: 0 0 0 3px rgba(56, 118, 101, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Suggestions Container */
.suggestions-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e1e5e9;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.suggestion-item:hover {
  background-color: #f8f9fa;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-plot {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.suggestion-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.suggestion-area {
  color: #666;
}

.suggestion-status {
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.status-available {
  background: #d4edda;
  color: #155724;
}

.status-booked {
  background: #fff3cd;
  color: #856404;
}

.status-sold {
  background: #f8d7da;
  color: #721c24;
}

/* Filter Groups */
.filter-group {
  margin-bottom: 16px;
}

.filter-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

/* Status Dropdown */
.status-dropdown {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.status-dropdown:focus {
  outline: none;
  border-color: #a39161;
}

.status-dropdown option {
  background: #333;
  color: #fff;
}

/* Area Range Container */
.area-range-container {
  position: relative;
}

/* Dots */
.breakpoints {
  position: absolute;
  top: 14px;
  /* adjust dot height */
  left: 0;
  width: 100%;
  height: 0;
}

.breakpoints span {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #555;
  border-radius: 50%;
  transform: translateX(-50%);
}

/* Labels */
.breakpoint-labels {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #333;
}

/* area range input outline */
.search-button:focus,
.clear-button:focus,
.status-dropdown:focus,
.area-range-slider:focus {
  outline: none !important;
  outline-offset: 2px;
}

.area-range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 8px;
  cursor: pointer;
}

.area-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #a39161;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.area-range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #a39161;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.area-range-display {
  text-align: center;
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.model-type-select {
  font-size: 12px;
  color: #fff;
  /* text color */
  font-weight: 500;
  padding: 6px 30px 6px 10px;
  /* extra space for arrow */
  background: #ffffff1a;
  /* semi-transparent like area-range-display */
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: relative;
  transition: all 0.2s ease;
}

/* Add the arrow using a pseudo-element */
.model-type-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.model-type-select-wrapper::after {
  content: "▼";
  /* arrow */
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  pointer-events: none;
  color: #fff;
  font-size: 10px;
}

/* Hover/focus effect */
.model-type-select:hover,
.model-type-select:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #dcff14;
  outline: none;
}

/* Style the dropdown options */
.model-type-select option {
  color: white;
  background: #262620;
  font-weight: 500;
}



/* Buttons */
.search-button,
.clear-button {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.search-button {
  background: #a39161;
  color: white;
}

.search-button:hover {
  background: #a39161;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 118, 101, 0.3);
}

.clear-button {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 0;
}

.clear-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Mobile portrait - extra small screens */
@media (max-width: 375px) and (orientation: portrait) {
  .search-bar-container {
    top: 50px;
    left: 14%;
    width: 280px;
    z-index: 9;
    transform: scale(0.5);
    transform-origin: top left;
    /* max-width: 300px; */
  }

  .search-bar-header {
    padding: 12px 16px;
  }

  .search-bar-content {
    padding: 10px 12px;
  }

  .search-close-btn {
    width: 25px;
    height: 25px;
  }

  .search-title {
    font-size: 12px;
  }

  .search-input {
    font-size: 10px;
  }

  @keyframes slideInFromLeft {
    from {
      transform: translateX(-100%) scale(0.5);
    }

    to {
      transform: translateX(3%) scale(0.5);
    }
  }

  @keyframes slideOutToLeft {
    from {
      transform: translateX(0) scale(0.5);
    }

    to {
      transform: translateX(-70%) scale(0.5);
    }
  }

  @keyframes toggleslideInFromLeft {
    from {
      left: 0%;
    }

    to {
      left: 103%;
    }
  }

  @keyframes toggleSlideOutToLeft {
    from {
      left: 103%;
    }

    to {
      left: 143%;
    }
  }
}

/* Responsive Design s24 or mobile with larger screen*/
@media (min-width: 378px) and (max-width: 767px) and (orientation: portrait) {
  .search-bar-container {
    top: 50px;
    left: 14%;
    width: 280px;
    z-index: 9;
    transform: scale(0.5);
    transform-origin: top left;
    /* max-width: 300px; */
  }

  .search-bar-header {
    padding: 12px 16px;
  }

  .search-bar-content {
    padding: 10px 12px;
  }

  .search-close-btn {
    width: 25px;
    height: 25px;
  }

  .search-title {
    font-size: 12px;
  }

  .search-input {
    font-size: 10px;
  }

  @keyframes slideInFromLeft {
    from {
      transform: translateX(-100%) scale(0.5);
    }

    to {
      transform: translateX(3%) scale(0.5);
    }
  }

  @keyframes slideOutToLeft {
    from {
      transform: translateX(0) scale(0.5);
    }

    to {
      transform: translateX(-78%) scale(0.5);
    }
  }

  @keyframes toggleslideInFromLeft {
    from {
      left: 0%;
    }

    to {
      left: 103%;
    }
  }

  @keyframes toggleSlideOutToLeft {
    from {
      left: 103%;
    }

    to {
      left: 156%;
    }
  }
}

/* mobile landscape */
@media (max-height: 600px) and (min-width: 500px) and (orientation: landscape) {

  .search-bar-container {
    top: 50px;
    left: 50px;
    right: 1px;
    width: 280px;
    transform: scale(0.5);
    transform-origin: top left;
  }

  .search-bar-content {
    padding: 0px 12px;
  }

  .search-title {
    font-size: 12px;
  }

  .search-input {
    font-size: 10px;
  }

  /* search bar  */
  @keyframes slideInFromLeft {
    from {
      transform: translateX(-100%) scale(0.5);
    }

    to {
      transform: translateX(3%) scale(0.5);
    }
  }

  @keyframes slideOutToLeft {
    from {
      transform: translateX(0) scale(0.5);
    }

    to {
      transform: translateX(-82%) scale(0.5);
    }
  }

  /* toggle */
  @keyframes toggleSlideOutToLeft {
    from {
      left: 103%;
    }

    to {
      left: 165%;
    }
  }


}

/* landscape fullscreen */
@media (max-height: 600px) and (min-width: 500px) and (orientation: landscape) {

  body.fullscreen .search-bar-container {
    top: 50px;
    left: 73px;
    right: 1px;
    width: 280px;
    transform: scale(0.5);
    transform-origin: top left;
  }

  body.fullscreen .search-bar-container.show {
    animation: slideInFromLeftFullscreen 0.4s ease forwards;
  }

  body.fullscreen .search-bar-container.hide {
    animation: slideOutToLeftFullscreen 0.4s ease forwards;
  }

  /* Animation for showing/hiding */
  body.fullscreen .toggle-icon-wrapper.show {
    animation: toggleslideInFromLeftFullscreen 0.1s ease-out forwards;
  }

  body.fullscreen .toggle-icon-wrapper.hide {
    animation: toggleSlideOutToLeftFullscreen 0.3s ease-in forwards;
  }

  @keyframes slideInFromLeftFullscreen {
    from {
      transform: translateX(-150%) scale(0.4);
    }

    to {
      transform: translateX(3%) scale(0.4);
    }
  }

  @keyframes slideOutToLeftFullscreen {
    from {
      transform: translateX(0%) scale(0.4);
    }

    to {
      transform: translateX(-66%) scale(0.4);
    }
  }

  @keyframes toggleslideInFromLeftFullscreen {
    from {
      left: 0%;
    }

    to {
      left: 103%;
    }
  }

  @keyframes toggleSlideOutToLeftFullscreen {
    from {
      left: 103%;
    }

    to {
      left: 167%;
    }
  }
}

/* Loading state */
.search-button.loading {
  position: relative;
  color: transparent;
}

.search-button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Focus states for accessibility */
.search-button:focus,
.clear-button:focus,
.status-dropdown:focus,
.area-range-slider:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .search-bar-container {
    background: white;
    border: 2px solid black;
  }

  .search-input,
  .status-dropdown {
    border: 2px solid black;
  }

  .suggestion-item:hover {
    background: #000;
    color: #fff;
  }
}


/* iPad Portrait (820px wide) */
@media only screen and (min-device-width: 768px) and (max-device-width: 834px) and (orientation: portrait) {
  /* .search-bar-container {
    transform: scale(0.5);
    transform-origin: top left;
  } */

  @keyframes slideInFromLeft {
    from {
      transform: translateX(-100%);
    }

    to {
      transform: translateX(0%);
    }
  }

  @keyframes slideOutToLeft {
    from {
      transform: translateX(0);
    }

    to {
      transform: translateX(-134%);
    }
  }

}

/* iPad Pro Portrait (1024px wide) */
/* @media only screen and (min-device-width: 1020px) and (max-device-width: 1180px) and (orientation: portrait) {
  .search-bar-container {
    transform: scale(0.5);
    transform-origin: top left;
  }

  @keyframes slideInFromLeft {
    from {
      transform: translateX(-100%) scale(0.5);
    }

    to {
      transform: translateX(0) scale(0.5);
    }
  }

  @keyframes slideOutToLeft {
    from {
      transform: translateX(0) scale(0.5);
    }

    to {
      transform: translateX(-128%) scale(0.5);
    }
  }
} */

/* iPad Landscape (1180px wide) */
/* @media only screen and (min-device-width: 760px) and (max-device-width: 1194px) and (min-device-height: 450px) and (orientation: landscape) {
  .search-bar-container {
    transform: scale(0.8);
    transform-origin: top left;
  }

  @keyframes slideInFromLeft {
    from {
      transform: translateX(-100%) scale(0.8);
    }

    to {
      transform: translateX(0) scale(0.8);
    }
  }

  @keyframes slideOutToLeft {
    from {
      transform: translateX(0) scale(0.8);
    }

    to {
      transform: translateX(-128%) scale(0.8);
    }
  }
} */