/* For:Human — tag filter (src/forhuman-tag-filter.ts), on Work and News.
   polar.ltda/archive: a fixed "Filtro" pill bottom-right opens a right-aligned stack of tag
   pills; picked tags turn ink and filter the cases (any of them). */
.fh-tag-hidden { display: none !important; }
.fh-tagfilter {
  position: fixed;
  right: calc(var(--fh-bar-inset, 16px) + clamp(16px, 1.8vw, 28px));
  bottom: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: var(--font-ui);
  pointer-events: none;
}
.fh-tagfilter > * { pointer-events: auto; }
.fh-tagfilter-list { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-height: calc(100vh - var(--fh-topbar-height, 72px) - 120px); overflow-y: auto; padding: 4px; margin: -4px; scrollbar-width: none; }
/* closed: the hidden pills must not leave a scrollbar on the page; open: scrolls without a visible bar */
.fh-tagfilter-list::-webkit-scrollbar { display: none; }
.fh-tagfilter:not(.is-open) .fh-tagfilter-list { overflow: hidden; pointer-events: none; }
.fh-tagfilter-tag,
.fh-tagfilter-toggle,
.fh-tagfilter-clear {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 9999px;
  background: rgba(228, 228, 228, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--color-press-black, #111);
  font: inherit;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}
.fh-tagfilter-tag:hover { background: rgba(214, 214, 214, 0.95); }
.fh-tagfilter-tag.is-active { background: #0a0a0a; color: #ffffff; }
.fh-tagfilter-count { color: inherit; opacity: 0.5; font-size: 13px; }
/* polar.ltda: black "Filtro" pill, grey tag pills */
.fh-tagfilter-toggle { height: 44px; padding: 0 26px; background: #0a0a0a; color: #ffffff; font-size: 14px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.fh-tagfilter-toggle:hover { background: #2a2a2a; }
.fh-tagfilter-clear { height: 44px; padding: 0 20px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
/* closed: the stack folds down into the toggle */
.fh-tagfilter:not(.is-open) .fh-tagfilter-tag { opacity: 0; transform: translateY(16px); pointer-events: none; }
.fh-tagfilter.is-open .fh-tagfilter-tag { transition-delay: calc(var(--i, 0) * 18ms); }
.fh-tagfilter:not(.has-active) .fh-tagfilter-clear { display: none; }
.fh-tagfilter-actions { display: flex; gap: 8px; }
@media (max-width: 767px) {
  .fh-tagfilter { right: 16px; bottom: 16px; }
  .fh-tagfilter-tag { height: 38px; padding: 0 16px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .fh-tagfilter-tag { transition: none; }
}
