.jaf {
  margin: 24px 0 18px;
}

.jaf__topbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.jaf__mobile-toggle,
.jaf__apply,
.jaf__clear,
.jaf-page,
.jaf-chip {
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.jaf__search input,
.jaf__sort select,
.jaf__term-search,
.jaf__grid2 input {
  width: 100%;
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
}

.jaf__count {
  white-space: nowrap;
  font-size: 14px;
}

.jaf__panel {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

.jaf__panel-head {
  display: none;
}

.jaf__groups {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.jaf__group {
  min-width: 0;
}

.jaf__group-title {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  font-size: 14px;
}

.jaf__group-body {
  margin-top: 8px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  max-height: 320px;
  overflow: auto;
}

.jaf__group-body:not(.is-open) {
  display: none;
}

.jaf__checklist {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.jaf__checklist li + li {
  margin-top: 8px;
}

.jaf__checklist label,
.jaf__toggles label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.jaf__checklist em {
  font-style: normal;
  opacity: .65;
  margin-left: auto;
}

.jaf__toggles {
  display: grid;
  gap: 10px;
}

.jaf__toggles--inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jaf__range-slider {
  margin: 14px 6px 10px;
}

.jaf__range-values {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.jaf__grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.jaf__grid2 label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.jaf__panel-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.jaf__apply {
  background: #111;
  color: #fff;
}

.jaf__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.jaf-chip span {
  margin-left: 6px;
}

.jaf-chip--clear {
  text-decoration: underline;
  border-style: dashed;
}

#art-results-grid.is-loading,
#art-results-pagination.is-loading {
  opacity: .55;
  pointer-events: none;
}

.jaf-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  justify-content: center;
}

.jaf-page.is-active {
  background: #111;
  color: #fff;
}

.jaf__empty {
  padding: 20px 0;
  text-align: center;
}

.jaf__drawer-backdrop {
  display: none;
}

.ui-slider {
  position: relative;
  height: 4px;
  background: rgba(0,0,0,.12);
  border-radius: 999px;
}

.ui-slider .ui-slider-range {
  position: absolute;
  height: 100%;
  background: #111;
}

.ui-slider .ui-slider-handle {
  position: absolute;
  top: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #111;
  border: none;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .jaf__groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .jaf__topbar {
    grid-template-columns: 1fr 1fr;
  }

  .jaf__search {
    grid-column: 1 / -1;
  }

  .jaf__count {
    text-align: right;
  }

  .jaf__panel {
    position: fixed;
    top: 0;
    left: 0;
    width: min(92vw, 420px);
    height: 100vh;
    z-index: 9999;
    border-radius: 0 18px 18px 0;
    transform: translateX(-102%);
    transition: transform .24s ease;
    overflow: auto;
  }

  body.jaf-drawer-open .jaf__panel {
    transform: translateX(0);
  }

  .jaf__panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .jaf__close {
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }

  .jaf__groups {
    grid-template-columns: 1fr;
  }

  .jaf__drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: .24s ease;
    display: block;
  }

  body.jaf-drawer-open .jaf__drawer-backdrop {
    opacity: 1;
    visibility: visible;
  }
}