body:has(.search-background) {
  overflow-x: hidden;
}

.search-background {
  background-image: url("/assets/towfiqu-barbhuiya-JhevWHCbVyw-unsplash-aedadabf.jpg");
  padding: 2rem 1rem;
}

.search-card-wrapper {
  width: 100%;
  max-width: 800px;
}

.search-card-wrapper.results-wide {
  max-width: 100%;
}

@media (min-width: 1200px) {
  .search-card-wrapper {
    max-width: 1000px;
  }
  .search-card-wrapper.results-wide {
    max-width: 1600px;
  }
}

.search-summary-item {
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  padding-left: 1rem;
}

@media (max-width: 767.98px) {
  .search-summary-item {
    border-left: none;
    padding-left: 0;
    min-width: 120px;
  }
}

/* Custom hover for grouped search results */
.table-hover .price-search-group:hover tr td {
  background-color: var(--bs-table-hover-bg) !important;
  color: var(--bs-table-hover-color) !important;
}

/* Disable default row-level hover within these groups to avoid double hover */
.table-hover .price-search-group tr:hover td {
  background-color: transparent !important;
}

/* Choices.js Bootstrap 5 Floating Labels Integration */
.form-floating > .choices {
  margin-bottom: 0;
}

.form-floating > .choices .choices__inner {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
  padding-left: 0.75rem;
  padding-right: 2.5rem; /* Space for the dropdown arrow */
  min-height: calc(3.5rem + 2px);
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
  background-color: #fff;
  font-size: 1rem;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.form-floating > .choices.is-focused .choices__inner {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Force label into floating state since Choices.js always has content or placeholder */
.form-floating > .choices ~ label {
  opacity: .65;
  transform: scale(.85) translateY(-.5rem) translateX(.15rem);
  z-index: 5;
  pointer-events: none;
}

/* Choices Items (Selected tags) */
.choices__list--multiple .choices__item {
  background-color: #e9ecef !important;
  border: 1px solid #dee2e6 !important;
  color: #212529 !important;
  border-radius: 4px !important;
  padding: 2px 8px !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  margin-bottom: 2px !important;
}

.choices__list--multiple .choices__item .choices__button {
  border-left: 1px solid #dee2e6 !important;
  filter: invert(1); /* Make the X icon dark if it was white */
  margin-left: 8px !important;
}

/* Choices Input Field */
.choices__inner .choices__input {
  background-color: transparent !important;
  font-size: 1rem !important;
  margin-bottom: 0 !important;
  padding: 4px 0 !important;
  color: #212529 !important;
}

/* Dropdown styling */
.choices__list--dropdown {
  border-radius: 0.375rem !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
  border: 1px solid #dee2e6 !important;
  margin-top: 2px !important;
  z-index: 1050 !important;
}

.choices__list--dropdown .choices__item {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: #f8f9fa !important;
  color: #0d6efd !important;
}

/* Hide the default Choices.js arrow as we might want a custom one or none for multi-select */
.choices[data-type*="select-one"]::after {
  border-color: #6c757d transparent transparent !important;
}

.border-dashed {
  border: 2px dashed rgba(0, 0, 0, 0.1) !important;
  transition: all 0.2s ease-in-out;
}

.border-dashed:hover {
  border-color: var(--bs-primary) !important;
  background-color: var(--bs-light) !important;
}
