.area-filter {
  display: inline-block;
  max-width: 100%;
  vertical-align: baseline;
}

.area-filter__presets {
  --area-filter-preset-fade-size: 20px;
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--slide-in-panel-border);
}

.area-filter__presets::before,
.area-filter__presets::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 14px;
  z-index: 1;
  width: var(--area-filter-preset-fade-size);
  pointer-events: none;
  opacity: 0;
}

.area-filter__presets::before {
  left: 0;
  background: linear-gradient(to right, var(--slide-in-panel-background), transparent);
}

.area-filter__presets::after {
  right: 0;
  background: linear-gradient(to left, var(--slide-in-panel-background), transparent);
}

.area-filter__presets--more-left::before,
.area-filter__presets--more-right::after {
  opacity: 1;
}

.area-filter__preset-rail {
  display: flex;
  gap: 8px;
  padding-block: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.area-filter__preset-rail > .pill {
  max-width: none;
}

.area-filter__group-heading {
  display: flex;
  align-items: center;
}

.area-filter__choice {
  flex: 1;
}

.area-filter__choice input {
  -webkit-appearance: auto;
     -moz-appearance: auto;
          appearance: auto;
  display: block;
  position: static;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 1;
  accent-color: var(--color-ambient-mint-dark);
}

.area-filter__choice:has(input:disabled) {
  cursor: default;
  opacity: 0.5;
}

.area-filter__expand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--color-ambient-mint-dark);
  cursor: pointer;
}

.area-filter__expand .icon {
  width: 16px;
  height: 16px;
}

.area-filter__expand[aria-expanded="true"] .icon {
  transform: rotate(90deg);
}

.area-filter__section-label {
  padding-top: 16px;
  font-weight: 600;
}

.area-filter__empty {
  padding: 20px 0;
}

.area-filter__footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding: 14px var(--slide-in-panel-padding) max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--slide-in-panel-border);
}

.area-filter [hidden] {
  display: none;
}
