.ux-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 20px;
}
.ux-add-filter {
  gap: 9px;
  white-space: nowrap;
}
.ux-add-filter > span {
  font-size: 23px;
  line-height: 1;
  font-weight: 400;
}
.ux-filter-chip {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid #bad5cc;
  background: var(--ux-soft);
  border-radius: 24px;
  color: var(--ux-ink);
  min-width: 0;
}
.ux-filter-chip button {
  background: transparent;
  color: inherit;
  min-height: 44px;
}
.ux-edit-filter {
  padding: 9px 4px 9px 15px;
  font-size: 12px;
  text-align: left;
  overflow-wrap: anywhere;
  min-width: 0;
  font-weight: 700;
}
.ux-edit-filter > span {
  font-weight: 400;
}
.ux-remove-filter {
  display: grid;
  place-items: center;
  min-width: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 10px;
}
.ux-remove-filter svg {
  width: 15px;
  height: 15px;
}
.ux-clear-filters {
  padding: 0 10px;
  min-height: 44px;
}
.ux-discovery-heading {
  margin-bottom: 0;
}
.modal.ux-filter-sheet {
  background: #fff;
  padding: 0;
  max-width: 480px;
  max-height: 85vh;
  max-height: 85dvh;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  outline: none;
}
.ux-filter-sheet .close {
  width: 44px;
  height: 44px;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: white;
  border-radius: 50%;
}
.ux-filter-sheet-head {
  padding: 27px 27px 20px;
  padding-right: 60px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--ux-line);
}
.ux-filter-sheet-head h2 {
  font-size: 27px;
  margin: 10px 0 8px;
  line-height: 1.2;
}
.ux-filter-sheet-head p {
  font-size: 13px;
  line-height: 1.5;
}
.ux-filter-sheet-head > .textbtn {
  min-height: 40px;
  padding: 0;
  font-size: 12px;
  margin-top: -8px;
}
.ux-filter-sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 8px 24px;
  flex: 1;
}
.ux-filter-types button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  min-height: 65px;
  padding: 12px 2px;
  border-bottom: 1px solid #edf2ef;
  color: var(--ux-ink);
  background: #fff;
}
.ux-filter-types button:last-child {
  border: 0;
}
.ux-filter-types button > span:nth-child(2) {
  flex: 1;
}
.ux-filter-types strong {
  font-size: 15px;
  font-weight: 600;
}
.ux-filter-types small {
  display: block;
  color: var(--ux-muted);
  font-size: 12px;
  margin-top: 3px;
}
.ux-filter-type-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f7f4;
}
.ux-filter-types button:hover {
  background: #f5faf8;
}
.ux-filter-values {
  border: 0;
  margin: 0;
  padding: 10px 0;
  display: grid;
  gap: 9px;
  min-width: 0;
}
.ux-filter-value {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 13px;
  border: 1px solid var(--ux-line);
  border-radius: 11px;
  min-height: 56px;
  font-size: 15px;
  cursor: pointer;
}
.ux-filter-value:has(input:checked) {
  background: var(--ux-soft);
  border-color: var(--ux-accent);
}
.ux-filter-value input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--ux-accent);
  margin: 0;
}
.ux-filter-sheet-foot {
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid var(--ux-line);
  padding: 15px 24px 21px;
}
.ux-filter-sheet-foot p {
  font-size: 12px;
  color: var(--ux-muted);
  margin: 0 0 10px;
}
.ux-filter-sheet-foot > div {
  display: flex;
  gap: 12px;
}
.ux-filter-sheet-foot .btn {
  flex: 1;
  min-height: 48px;
  font-size: 14px;
}
.ux-filter-sheet-foot .full {
  width: 100%;
}
@media (max-width: 720px) {
  .ux-filter-bar {
    gap: 8px;
    margin-top: 16px;
  }
  .ux-add-filter {
    min-height: 44px;
    padding: 9px 13px;
    font-size: 13px;
  }
  .ux-edit-filter {
    font-size: 12px;
  }
  .modal-backdrop:has(.ux-filter-sheet) {
    padding: 0;
    align-items: flex-end;
  }
  .modal.ux-filter-sheet {
    border-radius: 22px 22px 0 0;
    width: 100%;
    max-width: none;
    max-height: 90vh;
    max-height: 90dvh;
  }
  .ux-filter-sheet-head {
    padding: 23px 22px 16px;
    padding-right: 64px;
  }
  .ux-filter-sheet-head h2 {
    font-size: 25px;
  }
  .ux-filter-sheet-body {
    padding: 6px 20px;
  }
  .ux-filter-sheet-foot {
    padding: 14px 20px max(20px, env(safe-area-inset-bottom));
  }
  .ux-filter-types button {
    min-height: 62px;
  }
  .ux-filter-value {
    min-height: 56px;
  }
  .ux-filter-sheet-head > .textbtn {
    margin-top: -5px;
  }
}
