/* Shared highlight components: topic chips and featured meeting cards.
 *
 * Lives in shared_static/ (mounted at /shared-static by BOTH services --
 * see archive/main.py and app/main.py) rather than in either service's
 * own style.css, because these components render on the Archive's
 * /state/* and /j/* pages AND on the resolver's home page (WO-50).
 * Duplicating them into app/static/style.css would have guaranteed the
 * two copies drifted; the components are self-contained and use no CSS
 * custom properties, which is what makes one shared file viable.
 *
 * Both base.html files link this AFTER their own stylesheet.
 */

/* Topic chips ---------------------------------------------------------- */

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 1.4rem 0 1.8rem;
}

/* On a phone a dozen wrapped chips push the actual results a full screen
 * down, which defeats the point of leading with them. One horizontally
 * scrollable row instead -- every chip stays a real link in the DOM (so
 * a crawler still follows them all), it just doesn't consume the
 * viewport. */
@media (max-width: 767px) {
  .topic-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
    margin: 1rem 0 1.4rem;
    -webkit-overflow-scrolling: touch;
  }

  .topic-chips::-webkit-scrollbar {
    display: none;
  }

  .topic-chips-label {
    display: none;
  }

  .topic-chip {
    flex: 0 0 auto;
  }
}

.topic-chips-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-right: 0.2rem;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border: 1px solid #d3d8de;
  border-radius: 999px;
  background: #fff;
  color: #2c3e50;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.topic-chip:hover,
.topic-chip:focus-visible {
  background: #eef2f6;
  border-color: #9aa5b1;
  text-decoration: none;
}

.topic-chip-active {
  background: #2c3e50;
  border-color: #2c3e50;
  color: #fff;
  font-weight: 600;
}

.topic-chip-active:hover,
.topic-chip-active:focus-visible {
  background: #22303e;
  border-color: #22303e;
  color: #fff;
}

.topic-chip-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Featured meeting cards ----------------------------------------------- */

.featured-meetings {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.featured-meeting {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid #e3e7eb;
  border-left: 3px solid #b03a2e;
  border-radius: 6px;
  background: #fff;
}

@media (max-width: 575px) {
  .featured-meeting {
    flex-direction: column;
    gap: 0.75rem;
  }
}

.featured-thumb {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
}

.featured-thumb img {
  width: 148px;
  height: 83px;
  object-fit: cover;
  border-radius: 4px;
  background: #e9edf1;
}

@media (max-width: 575px) {
  .featured-thumb img {
    width: 100%;
    height: 160px;
  }
}

.featured-body {
  min-width: 0;
  flex: 1 1 auto;
}

.featured-title {
  font-size: 1.05rem;
  margin: 0 0 0.15rem;
  line-height: 1.3;
}

.featured-where {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 0.6rem;
}

/* The quote is the point of the card: it gets the visual weight, and it
 * is the only text on these pages that is unique to the meeting. */
.featured-quote {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #1f2933;
  border: 0;
  padding: 0;
}

.featured-quote mark {
  background: #fdf0b5;
  padding: 0 0.12em;
  border-radius: 2px;
}

.featured-deeplink {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.featured-deeplink:hover,
.featured-deeplink:focus-visible {
  text-decoration: underline;
}


/* A supplied chips label (a hub borrowing its state's chips, WO-51).
 * Its own block above the chips, and it stays visible at every width --
 * unlike .topic-chips-label, which is hidden below 768px to save room in
 * the horizontal scroll strip. That is safe for a generic "Being
 * discussed:" and unsafe here: this label is the only thing saying the
 * topics belong to the state rather than to this government, so hiding
 * it turns the row into a quiet misattribution. */
.topic-chips-heading {
  margin: 1.4rem 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.topic-chips-heading + .topic-chips {
  margin-top: 0;
}
