/* oksi4 v1.20 — filters.css */

/* ─── Filter bar wrapper ───────────────────────────────────────── */
.filter-bar-wrap {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 6px 14px 8px;
}

.filter-bar-inner {
  display: flex;
  align-items: flex-start;
  gap: 6px 14px;
  flex-wrap: wrap;         /* дозволяємо перенос рядків */
}

/* ─── "Фільтри" лейбл ──────────────────────────────────────────── */
.filter-bar-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 4px;
  min-width: 70px;
}
.filter-bar-label [data-lucide] { width: 13px; height: 13px; }

/* ─── Група фільтрів ───────────────────────────────────────────── */
.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  flex-shrink: 0;
  max-width: 100%;
}

.filter-group-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.03em;
  padding-top: 5px;
  flex-shrink: 0;
}

/* ─── Chips wrapper — wrap + collapse ─────────────────────────── */
.filter-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-height: 28px;        /* одна лінія за замовчуванням */
  overflow: hidden;
  transition: max-height 0.2s ease;
  position: relative;
}

/* Розгорнутий стан */
.filter-chips.expanded {
  max-height: 200px;
}

/* Кнопка "ще" / "згорнути" */
.filter-chips-more {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
}
.filter-chips-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Окремий чіп ──────────────────────────────────────────────── */
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  line-height: 1.3;
  flex-shrink: 0;
}
.filter-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}
.filter-chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(0,153,255,0.18);
}

/* ─── Ціновий слайдер ──────────────────────────────────────────── */
.filter-group-price {
  align-items: center;
}

.filter-price-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.filter-price-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  min-width: 38px;
  text-align: center;
}

.filter-range-wrap {
  position: relative;
  width: 130px;
  height: 20px;
  flex-shrink: 0;
}
.filter-range-wrap::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  transform: translateY(-50%);
}
.filter-range-track {
  position: absolute;
  top: 50%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateY(-50%);
  pointer-events: none;
}
.filter-range {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  pointer-events: none;
}
.filter-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-2);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  cursor: pointer;
  pointer-events: all;
  transition: transform 0.1s;
}
.filter-range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.filter-range::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-2);
  cursor: pointer;
  pointer-events: all;
}
.filter-range::-webkit-slider-runnable-track { background: transparent; }
.filter-range::-moz-range-track { background: transparent; }

/* ─── Кнопка скидання ──────────────────────────────────────────── */
.filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.filter-reset:hover { background: var(--danger); color: #fff; }
.filter-reset [data-lucide] { width: 11px; height: 11px; }

/* ─── Price text inputs ───────────────────────────────────────── */
.filter-price-input {
  width: 68px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  text-align: center;
  outline: none;
  transition: border-color 0.12s;
  flex-shrink: 0;
}
.filter-price-input:focus  { border-color: var(--accent); }
.filter-price-input::placeholder { color: var(--text-muted); font-weight: 400; }

/* ─── Light theme ──────────────────────────────────────────────── */
[data-theme="light"] .filter-chip { background: #f0f4f8; }
[data-theme="light"] .filter-chip.on { color: #fff; }

/* ─── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .filter-bar-wrap { padding: 5px 10px 7px; }
  .filter-bar-label { display: none; }
  .filter-range-wrap { width: 100px; }
}

/* deploy: 2026-05-29 */
/* @oksi4-v1.20 */
