.wtp-map-filters {
  position: relative;
  z-index: 6;
  width: max-content;
  max-width: 100%;
  color: var(--ink, #172a4f);
}

.wtp-map-filters-summary {
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: 7px;
  min-height: 38px;
  padding: 5px 9px;
  cursor: pointer;
  list-style: none;
  background: var(--paper, #fff);
  border: 1px solid var(--line, #d5d9e1);
  border-radius: 8px;
  font: inherit;
  font-weight: 680;
}

.wtp-map-filters-summary::-webkit-details-marker { display: none; }
.wtp-map-filters-summary::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: -3px 2px 0;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.wtp-map-filters[open] .wtp-map-filters-summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.wtp-map-filters-status {
  padding: 2px 6px;
  border-radius: 12px;
  background: #eef1f7;
  color: #425472;
  font-size: 11px;
  white-space: nowrap;
}

.wtp-map-filters-status.is-active {
  background: #dfe9ff;
  color: #153d89;
}

.wtp-map-filters-panel {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  width: min(320px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  max-height: min(360px, calc(var(--map-height, 400px) - 72px), 64vh);
  overflow: hidden;
  padding: 12px;
  color: var(--ink, #172a4f);
  background: var(--paper, #fff);
  border: 1px solid var(--line, #d5d9e1);
  border-radius: 10px;
  box-shadow: 0 9px 26px #1e293b2b;
  font-size: 13px;
}

.wtp-map-filters-options { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.wtp-map-filters-heading { margin: 0 0 6px; font-weight: 750; }
.wtp-map-filters-group {
  min-width: 0;
  padding: 0;
  margin: 0 0 9px;
  border: 0;
}
.wtp-map-filters-group legend {
  margin-bottom: 2px;
  padding: 0;
  color: var(--muted, #53617a);
  font-weight: 650;
}

.wtp-map-filter-choice {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 3px 5px;
  border-radius: 5px;
  cursor: pointer;
}
.wtp-map-filter-choice:hover,
.wtp-map-filter-choice:focus-within { background: #eaf0fc; }
.wtp-map-filter-choice input {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin: 0;
  accent-color: #213f9b;
}
.wtp-map-filter-color {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border: 1px solid #23314766;
  border-radius: 50%;
}
.wtp-map-filter-count {
  margin-inline-start: auto;
  color: var(--muted, #53617a);
  font-variant-numeric: tabular-nums;
}
.wtp-map-filter-street small {
  display: block;
  color: var(--muted, #53617a);
  font-size: 11px;
  font-weight: 400;
}
.wtp-map-filters-footer {
  flex-shrink: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line, #d5d9e1);
}
.wtp-map-filters-reset {
  padding: 4px 0;
  color: var(--ink, #172a4f);
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 680;
  text-decoration: underline;
}
.wtp-map-filters-reset:disabled {
  color: var(--muted, #53617a);
  cursor: default;
  text-decoration: none;
}

@media (pointer: coarse) {
  .wtp-map-filters-summary, .wtp-map-filter-choice { min-height: 44px; }
}
