/* Filters (custom accordion UI) */

.filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-acc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-acc__item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  overflow: hidden;
}

.filter-acc__toggle {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}

/* Hide default disclosure triangle */
.filter-acc__toggle::-webkit-details-marker { display: none; }
.filter-acc__toggle::marker { content: ""; }

.filter-acc__label {
  font-weight: 700;
  font-size: 14px;
}

.filter-acc__badge {
  margin-left: auto;
  font-size: 12px;
  color: #111827;
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 4px 8px;
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
}

.filter-acc__badge:empty {
  display: none;
}

.filter-acc__chev {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease;
  transform-origin: center;
}

.filter-acc__chev img {
  width: 16px;
  height: 16px;
  display: block;
}

.filter-acc__item[open] .filter-acc__chev {
  transform: rotate(45deg);
}

.filter-acc__panel {
  border-top: 1px solid #e5e7eb;
}

.filter-acc__body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

/* Option row */
.filter-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}

.filter-opt:hover {
  background: rgba(0,0,0,0.03);
}

.filter-opt input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* FIX: ai-search.js uses .filter-opt__text (keep .filter-opt__label too) */
.filter-opt__label {
  font-size: 14px;
}

.filter-opt__text {
  font-size: 14px;
}

/* FIX: match checkbox sizing for radios too */
.filter-opt input[type="radio"] {
  width: 18px;
  height: 18px;
}

.filter-opt__count {
  margin-left: auto;
  font-size: 12px;
  color: #6b7280;
}

/* Clear */
.filters__actions {
  display: flex;
  justify-content: flex-end;
}

.filters__clear {
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

.filters__clear:hover {
  background: rgba(0,0,0,0.02);
}

/* --- Additions for jQuery slide animation --- */
/* The panel is animated by jQuery; keep it hidden unless <details open> */
.filter-acc__item:not([open]) .filter-acc__panel {
  display: none;
}

/* Make the toggle feel like a control without affecting global .btn styles */
.filter-acc__toggle:focus { outline: none; }
.filter-acc__toggle:focus-visible {
  outline: 2px solid rgba(26,115,232,0.35);
  outline-offset: 2px;
  border-radius: 14px;
}
