/* Search and filters for the Activity and Alerts pages (design standard, 27 Nov 2026).
   Search first, a few chips with counts, the live count underneath, one glass panel of
   hairline rows. Type steps: 12 · 15 · 19. Nothing in the list animates on a filter change. */

.fl-page--narrow { max-width: 960px; }
.fl-panel > * { position: relative; z-index: 1; }

/* ---- Toolbar ------------------------------------------------------------------------- */

.fl-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fl-search {
  position: relative; flex: 1 1 240px; max-width: 360px; display: flex; align-items: center;
  height: 36px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); color: var(--faint);
  transition: border-color .15s var(--ease-out), background-color .15s var(--ease-out);
}
.fl-search:hover { border-color: var(--faint); }
.fl-search:focus-within { border-color: var(--amber); background: var(--bg); }
.fl-search > svg { width: 16px; height: 16px; margin-left: 12px; flex: none; pointer-events: none; }
.fl-search__in {
  flex: 1; min-width: 0; height: 100%; padding: 0 8px 0 9px; border: 0; background: none; outline: none;
  font-size: 15px; color: var(--text);
}
.fl-search__in::placeholder { color: var(--faint); }
.fl-search__in::-webkit-search-cancel-button, .fl-search__in::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.fl-search__x {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-right: 4px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer;
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out), transform .15s var(--ease-out);
}
.fl-search__x[hidden] { display: none; }
.fl-search__x svg { width: 14px; height: 14px; }
.fl-search__x:hover { background: var(--panel-2); color: var(--text); }
.fl-search__x:active { transform: scale(.92); }
.fl-search__x:focus-visible { outline-offset: 0; border-radius: 50%; }

.fl-chips { flex: none; flex-wrap: nowrap; }
.fl-chips button { font-size: 12px; white-space: nowrap; }
.fl-chips button:active { color: var(--text); transform: scale(.97); }
.fl-chips button:focus-visible { outline-offset: -2px; border-radius: 999px; }
.fl-chips .n { font-variant-numeric: tabular-nums; }
.fl-chips button.fl-zero { opacity: .5; }
.fl-chips button.fl-zero[aria-pressed="true"] { opacity: 1; }

select.fl-select { width: auto; min-width: 160px; min-height: 36px; padding: 0 12px; font-size: 15px; cursor: pointer; }
select.fl-select:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---- Count line and empty state ------------------------------------------------------ */

.fl-count { display: flex; align-items: center; gap: 14px; min-height: 24px; margin: 14px 0 12px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fl-clear {
  padding: 0; border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--text-2);
  border-radius: 4px; transition: color .15s var(--ease-out);
}
.fl-clear:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.fl-clear:active { color: var(--amber-hi); }

.fl-none { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; }
.fl-none p { font-size: 15px; color: var(--text-2); }

/* ---- The panel ----------------------------------------------------------------------- */

.fl-panel { padding: 10px 26px 12px; }

/* Alerts: link rows, the same look as the overview's "needs you" rows. */
.fl-alerts { list-style: none; margin: 0; padding: 0; }
.fl-alert { grid-template-columns: minmax(150px, 14rem) minmax(0, 1fr) auto 16px; }
.fl-alerts li:last-child .ov-need { border-bottom-color: transparent; }
.fl-new { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex: none; }
.fl-alert .ov-need__when { font-variant-numeric: tabular-nums; }

/* Activity: a table built from grid, answering to the panel's own width. */
.fl-log { container-type: inline-size; padding-top: 18px; }
.fl-log__head, .fl-log__row {
  display: grid; gap: 16px; align-items: baseline;
  grid-template-columns: 128px minmax(150px, 1.1fr) minmax(130px, 1fr) minmax(0, 2fr) 110px;
}
.fl-log__head { padding: 0 0 10px; border-bottom: 1px solid var(--line-2); font-size: 12px; color: var(--faint); }
.fl-log__head[hidden] { display: none; }
.fl-log__head .r, .fl-log__ip { text-align: right; }
.fl-log__list { list-style: none; margin: 0; padding: 0; }
.fl-log__row { min-height: 36px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.fl-log__list li:last-child { border-bottom: 0; }
.fl-log__when { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fl-log__what { font-weight: 500; }
.fl-log__detail { color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.fl-log__ip { font-size: 12px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }

@container (max-width: 699px) {
  .fl-log__head { display: none; }
  /* Line 1: what and when. Line 2: yard · detail, small and muted. */
  .fl-log__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; padding: 10px 0; }
  .fl-log__row::before { content: ""; order: 2; flex-basis: 100%; height: 0; }
  .fl-log__what { order: 0; flex: 1 1 0; min-width: 0; }
  .fl-log__when { order: 1; margin-left: 12px; text-align: right; }
  .fl-log__yard, .fl-log__detail { font-size: 12px; color: var(--muted); }
  .fl-log__yard { order: 3; }
  .fl-log__yard.is-none { display: none; }
  .fl-log__detail { order: 4; flex: 1 1 0; min-width: 50%; }
  .fl-log__detail:empty { display: none; }
  .fl-log__yard:not(.is-none) + .fl-log__detail:not(:empty)::before { content: "\00a0·\00a0"; }
  .fl-log__ip { display: none; }
}

/* ---- Phones -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .fl-bar { gap: 10px; }
  .fl-search { flex-basis: 100%; max-width: none; height: 44px; }
  .fl-search__x { width: 36px; height: 36px; }
  .fl-chips button { min-height: 44px; }
  .fl-chips { min-height: 44px; }
  select.fl-select { flex-basis: 100%; min-height: 44px; }
  .fl-panel { padding: 6px 16px 8px; }
  .fl-log { padding-top: 6px; }
  .fl-alert { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 2px; padding: 10px 8px; }
  .fl-alert .ov-need__name { grid-column: 1; grid-row: 1; }
  .fl-alert .ov-need__what { grid-column: 1 / -1; grid-row: 2; font-size: 15px; }
  .fl-alert .ov-need__when { grid-column: 2; grid-row: 1; }
  .fl-alert .ov-need__go { display: none; }
}
