/* BoemBoost Theme — filter.css
   Search/filter bar on results page
   ==================================== */

.bb-filter {
  background: var(--bb-dark);
  padding: var(--bb-s6) 0;
}

.bb-filter__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 220px 1fr auto;
  gap: var(--bb-s3);
  align-items: end;
}

/* Drop-down selects */
.bb-filter .bb-select--dark {
  border-radius: var(--bb-r-md);
  height: 50px;
}

/* Text search */
.bb-filter .bb-input--dark {
  height: 50px;
  border-radius: var(--bb-r-md);
}

/* Map thumb shortcut */
.bb-filter__map-btn {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--bb-border-dark);
  border-radius: var(--bb-r-md);
  overflow: hidden;
  height: 50px;
  cursor: pointer;
  transition: border-color var(--bb-ease);
  text-decoration: none;
  color: var(--bb-text-light);
}

.bb-filter__map-btn:hover { border-color: rgba(255,255,255,0.4); }

.bb-filter__map-thumb {
  width: 64px;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  flex-shrink: 0;
}

.bb-filter__map-label {
  padding: 0 var(--bb-s4);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* OR separator */
.bb-filter__sep {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  height: 50px;
}

/* Results bar (below filter) */
.bb-results-bar {
  background: var(--bb-bg-white);
  border-bottom: 1px solid var(--bb-border);
  padding: var(--bb-s4) 0;
}

.bb-results-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bb-s4);
  flex-wrap: wrap;
}

.bb-results-bar__count {
  font-size: 0.875rem;
  color: var(--bb-text-muted);
  font-weight: 500;
}

.bb-results-bar__count strong {
  font-weight: 800;
  color: var(--bb-text);
}

.bb-results-bar__actions {
  display: flex;
  align-items: center;
  gap: var(--bb-s3);
}

/* Sort dropdown */
.bb-sort-select {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bb-srl-sort-text, var(--bb-text));
  background: var(--bb-srl-sort-bg, transparent);
  border: 1px solid var(--bb-srl-sort-border, transparent);
  cursor: pointer;
  padding: var(--bb-s2) var(--bb-s3);
  border-radius: var(--bb-srl-sort-radius, var(--bb-r-sm));
  outline: none;
  appearance: none;
}

/* Favorites toggle */
/* Favorites toggle — styling staat centraal in pages/results.css
   (leest de --bb-srl-fav-* vars uit Design System → Search result list). */

/* View toggle (grid / list) */
.bb-view-toggle {
  display: flex;
  gap: var(--bb-s2);
}

/* ----------------------------------------
   Responsive
---------------------------------------- */
@media (max-width: 1024px) {
  .bb-filter__grid {
    grid-template-columns: repeat(2, 1fr) 1fr auto;
    row-gap: var(--bb-s3);
  }
}

@media (max-width: 768px) {
  .bb-filter__grid {
    grid-template-columns: 1fr 1fr;
  }

  .bb-filter__map-btn {
    display: none;
  }

  .bb-filter__sep {
    display: none;
  }
}

@media (max-width: 480px) {
  .bb-filter__grid {
    grid-template-columns: 1fr;
  }
}

/* ---- POI toggle bar ---- */
.bb-poi-bar {
  background: var(--bb-surface, #f5f5f3);
  border-bottom: 1px solid var(--bb-border, #e0e0dc);
  padding: 8px 0;
}
.bb-poi-bar__inner {
  max-width: var(--bb-content-width, 1280px);
  margin: 0 auto;
  padding: 0 var(--bb-side-pad, 24px);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.bb-poi-bar__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bb-muted, #888);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.bb-poi-bar__checks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bb-poi-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--bb-dark, #1a1a1a);
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid var(--bb-border, #e0e0dc);
  border-radius: 20px;
  background: #fff;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.bb-poi-check:hover {
  border-color: var(--bb-accent, #99ffbb);
  background: var(--bb-accent-light, #f0fff6);
}
.bb-poi-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.bb-poi-check:has(input:not(:checked)) {
  opacity: .5;
}
.bb-poi-check__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bb-poi-bar__actions {
  width: 100%;
  padding-top: 4px;
  font-size: 12px;
  color: var(--bb-muted, #888);
}
.bb-poi-toggle-link {
  color: var(--bb-muted, #888);
  text-decoration: none;
  font-size: 12px;
}
.bb-poi-toggle-link:hover {
  color: var(--bb-dark, #1a1a1a);
  text-decoration: underline;
}

/* ---- Live search suggestions ---- */
.bb-filterbar__search-wrap {
  position: relative;
}
.bb-search-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--bb-border, #e0e0dc);
  border-radius: var(--bb-r-md, 8px);
  box-shadow: var(--bb-shadow-filterpanel, var(--bb-shadow-lg));
  list-style: none;
  padding: 4px 0;
  margin: 0;
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
}
.bb-search-suggestions.is-open {
  display: block;
}
.bb-search-suggestions li {
  padding: 0;
}
.bb-search-suggestion {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--bb-border, #e0e0dc);
  transition: background .12s;
  text-decoration: none;
}
.bb-search-suggestions li:last-child .bb-search-suggestion {
  border-bottom: none;
}
.bb-search-suggestion:hover,
.bb-search-suggestion:focus,
.bb-search-suggestion.is-focused {
  background: var(--bb-accent-light, #f0fff6);
  outline: none;
}
.bb-search-suggestion__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bb-dark, #1a1a1a);
}
.bb-search-suggestion__title mark {
  background: var(--bb-accent, #99ffbb);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.bb-search-suggestion__meta {
  font-size: 11px;
  color: var(--bb-muted, #888);
}
.bb-search-suggestion__type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--bb-accent-dark, #006e6e);
}
.bb-search-no-results {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--bb-muted, #888);
}

@media (max-width: 768px) {
  .bb-search-suggestions {
    max-width: calc(100vw - 2rem);
    box-sizing: border-box;
    overflow-x: hidden;
  }
}
