/* ============================================================
   Search results + My free activities | page-specific styles.
   Header, cards, chips, empty state and pagination reuse
   category.css (Library page) so the look stays identical; this
   file only adds the header search box, the single-column body,
   and a wrapper that restyles $jatbi->pages() output.
   ============================================================ */

/* Single-column body (no filter sidebar) aligned to the 1140px column. */
.listing-body { max-width: 1140px; margin: 0 auto; }
.listing-body .main__meta { flex-wrap: wrap; gap: 0.75rem; }
.listing-meta__left { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.listing-meta__browse { font-size: 0.88rem; font-weight: 600; color: var(--color-green); text-decoration: none; }
.listing-meta__browse:hover { color: var(--color-green-dark); text-decoration: underline; }
.listing-body .filter-chip:hover { background: #CDE6E0; color: var(--color-green-dark); }
.listing-body .filter-chip:focus-visible,
.listing-meta__browse:focus-visible { outline: 2px solid var(--color-green); outline-offset: 2px; }

/* Header search box: one field + green button, sized for the cream header. */
.listing-search { display: flex; gap: 0.5rem; max-width: 640px; margin: 0; }
.listing-search__field { position: relative; flex: 1; min-width: 0; }
.listing-search__field svg {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: #8C7E5C; pointer-events: none;
}
.listing-search__input {
  width: 100%;
  height: 2.9rem;
  padding: 0 0.9rem 0 2.5rem;
  border: 1px solid #DDD3BD;
  border-radius: 6px;
  background: #FFF;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.15s;
}
.listing-search__input::placeholder { color: #8C7E5C; }
.listing-search__input:focus { outline: none; border-color: var(--color-green); box-shadow: 0 0 0 3px rgba(5, 131, 110, 0.12); }
.listing-search__btn { height: 2.9rem; padding: 0 1.4rem; border-radius: 6px; font-weight: 600; flex-shrink: 0; }
.listing-search__btn:focus-visible { outline: 2px solid var(--color-green-dark); outline-offset: 2px; }

/* $jatbi->pages() prints Bootstrap .pagination markup; restyle it to match .pagination-nav. */
.listing-pagination .pagination { display: inline-flex; list-style: none; gap: 0.35rem; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.listing-pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.6rem;
  border: 1.5px solid var(--color-green);
  border-radius: 6px !important;
  background: #FFF;
  color: var(--color-green);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  margin: 0;
  text-decoration: none;
  box-shadow: none;
}
.listing-pagination .page-link:hover { background: rgba(5, 131, 110, 0.06); color: var(--color-green); }
.listing-pagination .page-item.active .page-link { background: var(--color-green); border-color: var(--color-green); color: #FFF; }
.listing-pagination .page-link-hide { border-color: transparent; color: var(--color-text-muted); pointer-events: none; background: none; }
.listing-pagination .page-item:empty { display: none !important; }
/* The "Display 1 - 12 Of total N" line is redundant with the count above the grid. */
.listing-pagination > .d-flex { display: none !important; }

@media (max-width: 720px) {
  .listing-search__btn { padding: 0 1rem; }
}
