/* The state filter above the representatives list.
   A WordPress-only component: it exists because of a setting, so it is not in the
   approved stylesheet and is not generated from it. Same tokens, same prefix. */

.wp-site-blocks .v2-filter {
  max-width: 560px;
  margin: 0 auto var(--s4);
  text-align: center;
}

.wp-site-blocks .v2-filter__label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The field and its list are one control, so the list is as wide as the box. */
.wp-site-blocks .v2-filter__box { position: relative; }

.wp-site-blocks .v2-filter__input {
  width: 100%;
  height: 52px;
  padding: 0 46px 0 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  text-align: left;
}

.wp-site-blocks .v2-filter__input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wp-site-blocks .v2-filter__toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.wp-site-blocks .v2-filter__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 18px 44px rgba(3, 25, 59, .18);
  text-align: left;
}

.wp-site-blocks .v2-filter__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 3px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
}

.wp-site-blocks .v2-filter__option:hover,
.wp-site-blocks .v2-filter__option.is-active { background: #F1F4F8; }
.wp-site-blocks .v2-filter__option[aria-selected="true"] { font-weight: 600; color: var(--navy); }

/* How many people that state has, so the choice is made with the answer in view. */
.wp-site-blocks .v2-filter__count-badge {
  flex: none;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--navy);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 11px;
  color: #fff;
}

.wp-site-blocks .v2-filter__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.wp-site-blocks .v2-filter__row:has(> :not([hidden])) { margin-top: 12px; }

/* Level with the field it belongs to, and in the navy the site uses for its own
   actions rather than the red reserved for booking. */
.wp-site-blocks .v2-filter__go {
  min-height: 52px;
  padding: 0 28px;
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.wp-site-blocks .v2-filter__go:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.wp-site-blocks .v2-filter__clear { font-size: 14px; color: var(--muted); }

.wp-site-blocks .v2-filter__count {
  margin: 12px 0 0;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The instant filter hides rows with the hidden attribute; whatever display the
   row carries must not outrank that. */
.wp-site-blocks .v2-replist > [hidden],
.wp-site-blocks .v2-filter [hidden] { display: none !important; }

/* While a filter is being applied the rows appear at once: the reveal fade is
   there for scrolling down a page, not for answering a question. */
.wp-site-blocks .v2-replist.is-filtering [data-reveal] { transition: none !important; }
