/* Finder-only controls. Native selects remain available until sidebar.js enhances them. */
.smart-finder-layout {
  grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
  gap: 28px;
}
.smart-sidebar {
  position: sticky;
  top: 18px;
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 18px 16px;
  border: 1px solid #dce2d2;
  border-radius: 16px;
  background: #f3f5ec;
}
.smart-sidebar [hidden] { display: none !important; }
.smart-sidebar .filter-heading {
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.smart-sidebar .filter-heading h2 { font-size: 17px; }
.smart-sidebar .clear-link { margin-left: auto; font-size: 11px; white-space: nowrap; }
.smart-sidebar .sidebar-close {
  display: none;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--forest);
  padding: 5px 0 5px 5px;
  font: inherit;
  font-size: 12px;
}
.smart-sidebar .sidebar-close .icon { width: 14px; height: 14px; }
.smart-sidebar .filter-group { position: relative; margin-bottom: 16px; min-width: 0; }
.smart-sidebar .filter-group > label { font-size: 12px; color: #294b3c; margin-bottom: 7px; }
.smart-sidebar .filter-help { font-size: 10px; line-height: 1.5; color: #64715d; }
.smart-sidebar .filter-group select,
.smart-sidebar .sidebar-search input {
  width: 100%;
  min-height: 44px;
  font-size: 13px;
  border: 1px solid #cdd7c4;
  border-radius: 9px;
  background-color: #fffef9;
  color: #294b3c;
}
.smart-sidebar .sidebar-search input { padding: 10px 11px; min-width: 0; }
.smart-sidebar .sidebar-search input::placeholder { color: #7b8675; font-size: 12px; }
.smart-sidebar .sidebar-priorities { display: grid; min-width: 0; }
.smart-sidebar .sidebar-category-group { padding-top: 5px; }
.smart-sidebar .sidebar-native-select {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}
.smart-sidebar .sidebar-picker-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cdd7c4;
  border-radius: 9px;
  background: #fffef9;
  color: #294b3c;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}
.smart-sidebar .sidebar-picker-toggle::after {
  content: '';
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.smart-sidebar .sidebar-picker-toggle[aria-expanded="true"] {
  border-color: #779c64;
  background: #fff;
}
.smart-sidebar .sidebar-picker-toggle[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}
.smart-sidebar .sidebar-picker-panel {
  padding: 10px;
  margin-top: 7px;
  border: 1px solid #c9d7be;
  border-radius: 11px;
  background: #fffefb;
}
.smart-sidebar .sidebar-picker-search {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #d2dcc9;
  border-radius: 7px;
  padding: 8px 9px;
  background: #fff;
  color: #274936;
  font: inherit;
  font-size: 12px;
}
.smart-sidebar .sidebar-picker-trail { margin: 9px 0 5px; }
.smart-sidebar .sidebar-picker-back {
  border: 0;
  background: transparent;
  padding: 5px 0 8px;
  color: var(--forest);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}
.smart-sidebar .sidebar-picker-title { margin: 0 0 7px; color: #6b775f; font-size: 10px; line-height: 1.5; }
.smart-sidebar .sidebar-picker-list {
  display: grid;
  gap: 4px;
  max-height: 262px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 2px;
}
.smart-sidebar .sidebar-picker-list.is-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.smart-sidebar .sidebar-picker-option,
.smart-sidebar .sidebar-picker-group {
  width: 100%;
  min-width: 0;
  min-height: 41px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #36503b;
  padding: 9px 8px;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
}
.smart-sidebar .is-groups > .sidebar-picker-option { grid-column: 1 / -1; }
.smart-sidebar .sidebar-picker-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 68px;
  border-color: #e0e6d9;
  background: #f7f8f1;
  font-size: 11px;
  font-weight: 600;
}
.smart-sidebar .sidebar-picker-chevron { flex-shrink: 0; font-size: 18px; color: #7a9270; }
.smart-sidebar .sidebar-picker-option:hover,
.smart-sidebar .sidebar-picker-group:hover { background: #edf3e3; border-color: #c5d9b4; }
.smart-sidebar .sidebar-picker-option.is-selected,
.smart-sidebar .sidebar-picker-group.is-selected { background: #e4efda; border-color: #a1bd87; color: #23462f; }
.smart-sidebar .sidebar-picker-option-group { display: block; margin-top: 2px; color: #7a846f; font-size: 10px; }
.smart-sidebar .sidebar-picker-empty { margin: 9px 4px; font-size: 12px; line-height: 1.5; color: #6a755f; }
.smart-sidebar .sidebar-picker-status { margin: 5px 2px 0; color: #737e68; font-size: 10px; }
.smart-sidebar .sidebar-picker-status:empty { display: none; }
.smart-sidebar .sidebar-preferences,
.smart-sidebar .discovery-filters {
  margin: 0 0 16px;
  border-top: 1px solid #d8e1ce;
  border-bottom: 1px solid #d8e1ce;
  padding: 0;
}
.smart-sidebar .sidebar-preferences > summary,
.smart-sidebar .discovery-filters > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 46px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
  color: #35533e;
  font-size: 12px;
  font-weight: 700;
}
.smart-sidebar .sidebar-preferences > summary::-webkit-details-marker { display: none; }
.smart-sidebar .sidebar-preferences > summary::after {
  content: '+';
  margin-left: auto;
  color: #7c9271;
  font-size: 18px;
  font-weight: 400;
}
.smart-sidebar .sidebar-preferences[open] > summary::after { content: '−'; }
.smart-sidebar .sidebar-section-count { background: #dfeacc; padding: 2px 6px; border-radius: 12px; font-size: 10px; }
.smart-sidebar .sidebar-section-body { padding: 5px 0 0; }
.smart-sidebar .discovery-filters[open] { display: block; }
.smart-sidebar .discovery-filters > .filter-help { margin: 0 0 12px; }
.smart-sidebar .sidebar-active { margin: -2px 0 17px; padding: 0 0 14px; border-bottom: 1px solid #d8e1ce; }
.smart-sidebar .sidebar-active h3 { display: flex; gap: 6px; margin: 0 0 9px; font-size: 11px; color: #68765d; font-weight: 600; }
.smart-sidebar .sidebar-active-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.smart-sidebar .sidebar-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #c8d8b9;
  border-radius: 7px;
  background: #e9f0df;
  color: #35533e;
  font: inherit;
  font-size: 10px;
  text-align: left;
}
.smart-sidebar .sidebar-active-chip > span:first-child { overflow-wrap: anywhere; }
.smart-sidebar .sidebar-chip-cross { flex-shrink: 0; font-size: 16px; }
.smart-sidebar .apply-button { min-height: 44px; border-radius: 9px; font-size: 12px; }
.smart-sidebar .sidebar-save-note { display: flex; align-items: flex-start; gap: 7px; margin: 17px 0 9px; color: #6b775e; font-size: 10px; line-height: 1.6; }
.smart-sidebar .sidebar-save-note .icon { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: #a46f4c; }
.smart-sidebar .price-note { margin: 0; color: #7b8570; font-size: 9px; line-height: 1.6; }
.smart-sidebar :is(button, input, select, summary):focus-visible { outline: 3px solid #91b66e; outline-offset: 2px; }
@media (max-width: 1000px) {
  .smart-finder-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .smart-sidebar { position: static; max-height: none; overflow: visible; margin-bottom: 22px; padding: 19px; }
  .smart-sidebar.is-open { display: block; }
  .smart-sidebar .sidebar-close { display: inline-flex; }
  .smart-sidebar .sidebar-priorities { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .smart-sidebar .sidebar-picker-list { max-height: 254px; }
  .smart-sidebar .sidebar-picker-group { min-height: 52px; font-size: 12px; }
}
@media (max-width: 430px) {
  .smart-sidebar { padding: 16px 13px; }
  .smart-sidebar .filter-heading h2 { font-size: 16px; }
  .smart-sidebar .sidebar-priorities { gap: 11px; }
}
