/* Mobile-First Search Styles */

.search-mobile {
  max-width: 100%;
  margin: 0 auto;
}

/* Search Type Navigation */
.search-type-nav {
  display: grid;
  grid-template-columns: repeat(3, 10rem);
  gap: 0 2.5rem;
  justify-content: center;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}

.search-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: white;
  border: 2px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
  min-width: 100px;
}

.search-type-btn:hover {
  border-color: #c69963;
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-type-btn.active {
  border-color: #000;
  background: #000;
  color: #c69963;
  font-weight: 600;
}

.search-type-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.search-type-btn span:last-child {
  font-size: 0.95rem;
}

/* Search Sections */
.search-section {
  background: white;
  width: 95%;
  border: 1px solid #ddd;
  margin:auto;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
}

/* Accordion Headers */
.accordion-header {
  width: 100%;
  padding: 1rem;
  background: #000;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #c69963;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.accordion-header:hover {
  background: #b69e80;
  color:#000;
}

.accordion-header:active {
  background: #b69e80;
  color:#000;
}

.accordion-icon {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.accordion-icon.rotated {
  transform: rotate(-180deg);
}

/* Accordion Content */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.accordion-content.active {
  max-height: 2000px; /* Large enough for content */
  transition: max-height 0.5s ease-in;
}

.section-content {
  padding: 1rem;
}

/* Price Section - Always Visible */
.price-section {
  /* background: linear-gradient(135deg, #000 0%, #c69963 100%); */
  background: transparent;
  border: 1px solid #000;
  width: 95%;
}

#price-min-display, #price-max-display, #area-min-display, #area-max-display {
  color:#000; 
  font-size: 1.6rem;
}
.price-section .section-content {
  padding: .5rem 1rem;
}

.price-section .searchlabel {
  color: black;
  font-weight: 600;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

/* Search Categories */
.searchcat {
  margin-bottom: 1rem;
}

.searchcat:last-child {
  margin-bottom: 1rem;
}

.searchlabel {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
  font-size: 1.4rem;
  width: 100%;
}

/* Form Controls */
.form-control {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: white;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-control:focus {
  border-color: #c69963;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(68, 76, 84, 0.25);
}

/* Range Sliders */
.slider-container {
  width: 95%;
  margin:auto;
  margin-bottom: 1.5rem;
}

.price-sliders {
  margin-bottom: 0;
  width: 100%;
}

.range-slider {
  width: 95%;
  margin: auto;
  height: 8px;
}

/* noUiSlider customization */
.noUi-target {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  box-shadow: none;
  border-radius: 4px;
}

.price-section .noUi-target {
  background: rgba(255, 255, 255, 0.3);
}

.noUi-connect {
  background: #555;
}

.price-section .noUi-connect {
  background: #555;
}

.noUi-handle {
  border: 3px solid #000;
  background: #c69963;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  right: -14px;
  top: -10px;
}

.price-section .noUi-handle {
  border-color: white;
  background: #c69963;
}

#lake-details {
  width: 100% ;
}

#acres-slider {
  width: 90% ;
}

.noUi-handle:before,
.noUi-handle:after {
  display: none;
}

.noUi-horizontal .noUi-tooltip {
  display: none;
}

.slider-values {
  display: flex;
  width: 95%;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 600;
  margin:auto;
  margin-top: 0.75rem;
  padding-top: 1rem;
  color: #495057;
}

.price-section .slider-values {
  color: white;
}

/* Search Buttons */
.search-buttons {
  display: flex;
  font-size: 1.6rem;
  gap: 0.75rem;
  border-top: 2px solid #e9ecef;
  margin-top: 1rem;
}

.sticky-buttons {
  position: sticky;
  bottom: 0;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.searchbutton {
  flex: 1;
  padding: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
  border: 2px solid #000;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}

.btn-primary {
  background: #c69963;
  color: black;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 148, 159, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #c69963;
  color: black;
}

.btn-secondary:hover {
  background: #000;
  color: #c69963;  
}

/* Search Results Header */
.search-results-header {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2rem 0 1rem 0;
  color: #333;
}


/* Responsive breakpoints */
@media (min-width: 768px) {
  .search-mobile {
    max-width: 600px;
  }

  .search-type-btn {
      padding: 0.5rem 1rem;
    }
      
  .section-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .searchcat {
    flex: 0 0 calc(50% - 0.5rem);
  }
  
  /* Full-width exceptions */
  .slider-container,
  .searchcat:has(input[name="keywords"]) {
    flex: 0 0 100%;
  }
  
  .sticky-buttons {
    position: static;
    box-shadow: none;
    margin-top: 1.5rem;
  }

  .searchpara{
    grid-column: span 2;
  }
}
/* 
@media (min-width: 768px) {
  .search-mobile {
    max-width: 600px;
  }

  .slider-container,
  .searchcat:has(input[name="keywords"]) {
    display: block;
    width: 100% !important;
    margin-right: 0;
  }  
  
  .searchcat {
    display: inline-block;
    width: calc(50% - 0.5rem);
    margin-right: 1rem;
    vertical-align: top;
  }
  
  .searchcat:nth-child(2n) {
    margin-right: 0;
  }
  
  .slider-container {
    width: 90%;
    margin-right: 0;
  }
  
  .sticky-buttons {
    position: static;
    box-shadow: none;
    margin-top: 1.5rem;
  }
} */

@media (min-width: 1024px) {
  .search-mobile {
    max-width: 800px;
  }
  
  .accordion-content {
    max-height: none;
    overflow: visible;
  }
  
  .accordion-content.active {
    max-height: none;
  }
  
  .accordion-header {
    cursor: default;
    pointer-events: none;
  }
  
  .accordion-icon {
    display: none;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .accordion-content,
  .accordion-icon,
  .searchbutton,
  .noUi-handle {
    transition: none;
  }
}

/* Touch-friendly improvements for iOS */
input[type="text"].form-control,
input[type="email"].form-control {
  font-size: 16px; /* Prevents zoom on iOS */
}

select.form-control {
  font-size: 16px; /* Prevents zoom on iOS */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}