/* Фильтры каталога v2 — тристейт и закрепление (включается из админки) */

.dd-item--fv2 {
  gap: 10px;
  padding-right: 10px;
  cursor: pointer;
}

.dd-item--fv2.dd-item--fv2-has-lock {
  padding-right: 5px !important;
}

[data-style='circle'] .dd-item--fv2.dd-item--fv2-has-lock,
[data-style='glass'] .dd-item--fv2.dd-item--fv2-has-lock {
  padding-right: 5px !important;
}

.dd-item--fv2-has-lock .dd-item__label {
  padding-right: 0;
}

.dd-item--fv2 .dd-item__label {
  flex: 1;
  min-width: 0;
  color: var(--text);
  padding-right: 4px;
}

.dd-fv2-tristate {
  display: block;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--text-secondary);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dd-fv2-tristate:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dd-fv2-tristate[data-state='inc'] {
  background: var(--accent, #0078d4);
  border-color: var(--accent, #0078d4);
}

.dd-fv2-tristate[data-state='inc']::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 4px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: translate(-50%, -60%) rotate(-45deg);
}

.dd-fv2-tristate[data-state='exc'] {
  background: rgba(255, 69, 58, 0.14);
  border-color: #ff453a;
  box-shadow: 0 0 0 1px rgba(255, 69, 58, 0.12);
}

.dd-fv2-tristate[data-state='exc']::before,
.dd-fv2-tristate[data-state='exc']::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 1.5px;
  background: #ff453a;
  border-radius: 1px;
}

.dd-fv2-tristate[data-state='exc']::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.dd-fv2-tristate[data-state='exc']::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.dd-fv2-lock {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 18px;
  height: 18px;
  margin: 0 0 0 auto;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-tertiary, var(--text-secondary));
  opacity: 0.28;
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.dd-item--fv2-has-lock:hover .dd-fv2-lock,
.dd-fv2-lock:focus-visible {
  opacity: 0.62;
}

.dd-fv2-lock--on {
  opacity: 0.92;
  color: var(--accent, #007aff);
}

.dd-fv2-lock--on .dd-fv2-lock__icon {
  stroke-width: 2;
}

.dd-fv2-lock__icon {
  width: 13px;
  height: 13px;
  display: block;
}

[data-style='circle'] .dd-fv2-tristate {
  border-radius: 4px;
}

[data-style='circle'] .dd-fv2-tristate[data-state='inc'] {
  background: #007aff !important;
  border-color: #007aff !important;
}

.filter-btn--fv2-exc {
  box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .dd-fv2-tristate,
  .dd-fv2-lock {
    transition: none;
  }
}
