/* The public "top districts" page: the real Opportunities page's look (styles.css, app.css and
   opportunities.css are loaded first) plus what is different here: greyed-out controls, a photo beside
   each member, and a few static blocks. */

.asof {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- the filter row, shown but inert ---------- */

.filters--static {
  opacity: 0.55;
  filter: grayscale(1);
  cursor: not-allowed;
  user-select: none;
}
.filters--static select,
.filters--static input,
.filters--static button {
  background: var(--wash);
  color: var(--muted);
  cursor: not-allowed;
}
.multi--static {
  padding: 0.55rem 0.7rem;
  background: var(--wash);
  color: var(--muted);
  border: 2px solid var(--black);
  min-width: 14rem;
}
.locked {
  margin: -0.5rem 0 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- a member: photo on the left, text beside it ---------- */

.member {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.member + .member {
  margin-top: 0.6rem;
}
.photo {
  flex: none;
  width: 64px;
  height: 78px;
  object-fit: cover;
  object-position: top;
  background: var(--wash);
  border: 2px solid var(--black);
}
/* No photo: a plain block with the member's initials (text, never art). */
.photo--none {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.member__text {
  min-width: 0;
}
.opp__moved {
  font-style: italic;
}

/* ---------- the "why" reasons, collapsed ---------- */

/* ---------- how it is made ---------- */

.method {
  max-width: 52rem;
  margin: 2rem 0 0;
}
.method h2 {
  margin: 0 0 0.5rem;
}
.method h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1rem;
}
.method .credits {
  font-size: 0.85rem;
  color: var(--muted);
}

.opp__money {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .photo {
    width: 48px;
    height: 58px;
  }
}

/* Arriving from the homepage's top 5 lands on the district's row: make it unmissable. */
tr.opp:target td {
  background: #fff7d6;
  box-shadow:
    inset 0 2px 0 var(--black),
    inset 0 -2px 0 var(--black);
}

/* the provisional note sits under the list, so it needs room above rather than below */
.table-scroll + .provisional {
  margin: 1.5rem 0 1.75rem;
}

/* the member's worst centrist caucus, under their name and district: weight, not party colour (red and blue
   belong to the parties), the strongest sign filled in */
.opp__caucus {
  display: inline-block;
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0 0.45em;
  border: 1px solid var(--black);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--black);
  background: transparent;
}
.opp__caucus--blue_dog {
  color: var(--paper);
  background: var(--black);
}
.opp__caucus--new_democrat {
  font-weight: 600;
  color: var(--muted);
  border-color: var(--muted);
}
