/* Панель подбора. Имя с версией нарочно: nginx на VPS держит статику
   тридцать дней, и следующая правка кладется в podbor-v2.css вместе со
   ссылкой в шаблоне. */

.pdb {
  background: var(--bg-soft, #f7f8fa);
  border: 1px solid var(--line, #e2e5e8);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 20px;
}
.pdb__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}
.pdb__f { grid-column: span 3; min-width: 0; }
.pdb__f--2 { grid-column: span 2; }
.pdb__f--3 { grid-column: span 3; }
.pdb__f--4 { grid-column: span 4; }
.pdb__f--6 { grid-column: span 6; }

.pdb__sel,
.pdb__in {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line, #e2e5e8);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 14px;
  min-width: 0;
}
.pdb__sel:disabled { background: #f0f2f4; color: var(--muted, #565c63); }
.pdb__pair { display: flex; gap: 0; }
/* Пара "от и до" читается одним полем с перегородкой, а не двумя
   отдельными: так видно, что это один диапазон. */
.pdb__pair > * { border-radius: 0; }
.pdb__pair > *:first-child { border-radius: 8px 0 0 8px; }
.pdb__pair > *:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.pdb__pair > *:focus { position: relative; z-index: 1; }

.pdb__lbl {
  display: block;
  font-size: 12px;
  color: var(--muted, #565c63);
  margin-bottom: 4px;
}

.pdb__checks { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pdb__chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.pdb__chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.pdb__box {
  width: 18px; height: 18px; flex: none;
  border: 1px solid var(--line, #e2e5e8);
  border-radius: 5px; background: #fff;
}
.pdb__chk input:checked + .pdb__box {
  background: var(--accent, #d24d1e);
  border-color: var(--accent, #d24d1e);
  box-shadow: inset 0 0 0 3px #fff;
}
.pdb__chk input:focus-visible + .pdb__box { outline: 2px solid var(--accent, #d24d1e); outline-offset: 2px; }

/* Раскрытие без скрипта: чекбокс вне потока, а видимость блока ловится
   соседним селектором. */
.pdb__tgl { position: absolute; opacity: 0; width: 0; height: 0; }
.pdb__ext { display: none; }
.pdb__tgl:checked ~ .pdb__ext { display: block; }
.pdb__ext .pdb__grid { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line, #e2e5e8); }
.pdb__more-on { display: none; }
.pdb__tgl:checked ~ .pdb__foot .pdb__more-off { display: none; }
.pdb__tgl:checked ~ .pdb__foot .pdb__more-on { display: inline; }
.pdb__tgl:checked ~ .pdb__foot .pdb__more svg { transform: rotate(180deg); }

.pdb__foot {
  display: flex; align-items: center; gap: 16px;
  margin-top: 14px; flex-wrap: wrap;
}
.pdb__more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted, #565c63); font-size: 13px; cursor: pointer;
}
.pdb__more:hover { color: inherit; }
.pdb__reset { color: var(--muted, #565c63); font-size: 13px; margin-left: auto; }
.pdb__go {
  min-width: 240px; height: 44px; padding: 0 22px;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent, #d24d1e); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600;
}
.pdb__go:hover { filter: brightness(1.06); }
.pdb__go[disabled] { background: #c9ced3; cursor: default; }
.pdb__go.is-busy { opacity: .7; }

/* Свернутый вид на выдаче: одна строка, рядом боковые фильтры. */
.pdb--mini { padding: 0; }
.pdb--mini .pdb__body { display: none; padding: 16px; }
.pdb--mini .pdb__tgl--mini:checked ~ .pdb__body { display: block; }
.pdb__mini {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer;
}
.pdb__mini-t { font-weight: 600; font-size: 14px; }
.pdb__mini-s { color: var(--muted, #565c63); font-size: 13px; }
.pdb__tgl--mini:checked ~ .pdb__mini svg { transform: rotate(180deg); }

@media (max-width: 1100px) {
  .pdb__f, .pdb__f--2, .pdb__f--3, .pdb__f--4 { grid-column: span 6; }
}
@media (max-width: 640px) {
  .pdb { padding: 12px; }
  .pdb__f, .pdb__f--2, .pdb__f--3, .pdb__f--4, .pdb__f--6 { grid-column: span 12; }
  .pdb__foot { gap: 10px; }
  .pdb__reset { margin-left: 0; }
  .pdb__go { width: 100%; min-width: 0; }
  .pdb__mini-s { display: none; }
}
