/* ==========================================================================
   FAQ page (templates: faq/faq_list.html)

   1. Search box
   2. Topic navigation (pills on mobile, sticky list on large screens)
   3. Topic sections
   4. Empty states (the call to action is the shared .pm-cta band)
   ========================================================================== */

/* 1. Search box ------------------------------------------------------------ */
.pm-faq-search { max-width: 36rem; }
.pm-faq-search__field { position: relative; }
.pm-faq-search__icon {
  position: absolute;
  top: 50%;
  left: 1.1rem;
  transform: translateY(-50%);
  color: var(--pm-muted);
  pointer-events: none;
}
.pm-faq-search__field .form-control {
  padding-left: 2.9rem;
  border-radius: 999px;
}
/* Soft lift only while unfocused: this selector is as specific as the shared
   focus ring (.form-control:focus in main.css) and loads later, so applying it
   on focus too would replace the ring. */
.pm-faq-search__field .form-control:not(:focus) { box-shadow: var(--pm-shadow-sm); }
.pm-faq-search__status:empty { display: none; }
/* Phones: a slightly smaller placeholder so the whole example fits in the field. */
@media (max-width: 575.98px) {
  .pm-faq-search__field .form-control::placeholder { font-size: 0.95rem; }
}

/* 2. Topic navigation ------------------------------------------------------- */
.pm-faq-topics__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pm-muted);
  margin-bottom: 0.75rem;
}
.pm-faq-topics__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pm-faq-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--pm-border);
  border-radius: 999px;
  background: var(--pm-white);
  color: var(--pm-ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color var(--pm-transition), border-color var(--pm-transition), color var(--pm-transition);
}
/* Keyboard focus keeps the shared solid outline from main.css. */
/* Hover styles only for the other topics: the active (teal) one keeps its colours. */
.pm-faq-pill:not(.active):hover,
.pm-faq-pill:not(.active):focus-visible {
  border-color: var(--pm-primary-light);
  color: var(--pm-primary-dark);
}
.pm-faq-pill.active {
  background: var(--pm-primary);
  border-color: var(--pm-primary);
  color: var(--pm-white);
}
/* The active topic reacts to the pointer with a slightly darker teal (never white). */
.pm-faq-pill.active:hover {
  background: var(--pm-primary-dark);
  border-color: var(--pm-primary-dark);
  color: var(--pm-white);
}
.pm-faq-pill__icon { flex-shrink: 0; color: var(--pm-primary); }
.pm-faq-pill.active .pm-faq-pill__icon { color: inherit; }
.pm-faq-pill__count {
  min-width: 1.6rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--pm-primary-soft);
  color: var(--pm-primary-dark);
  font-size: 0.8rem;
  text-align: center;
}
.pm-faq-pill.active .pm-faq-pill__count { background: rgba(255, 255, 255, 0.2); color: var(--pm-white); }

@media (min-width: 992px) {
  /* Stay visible while scrolling, just below the sticky navbar. */
  .pm-faq-topics {
    position: sticky;
    top: var(--pm-header-offset);
    padding: 1.25rem;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius);
    background: var(--pm-surface);
  }
  .pm-faq-topics__list { flex-direction: column; flex-wrap: nowrap; gap: 0.25rem; }
  .pm-faq-pill {
    display: flex;
    width: 100%;
    border-color: transparent;
    border-radius: var(--pm-radius-sm);
    background: transparent;
  }
  .pm-faq-pill:not(.active):hover { background: var(--pm-white); }
  .pm-faq-pill__count { margin-left: auto; }
}

/* 3. Topic sections --------------------------------------------------------- */
.pm-faq-topic + .pm-faq-topic { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.pm-faq-topic__title {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

/* 4. Empty states -------------------------------------------------------------- */
.pm-faq-empty {
  padding: clamp(2rem, 5vw, 3rem);
}
