/* 47-codex-tabs.css — v42.49
   Option C from the canvas: the underline rail.

   The type chips were pill buttons with counts, nine of them in a horizontal
   scroller, every one carrying the same weight. As tabs they now read as
   labels with an icon, a brass underline marking where you are, and one
   hairline under the rail. Pills are kept for FILTERS (status, attitude,
   connections) so the two kinds of control stop looking identical. */

.codex-type-chips {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: flex-end;
  padding: 2px 2px 0;
  overflow-x: auto;
  scrollbar-width: none;
  /* Fade at the edges instead of arrow buttons. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  border-bottom: 1px solid rgba(232, 192, 105, .22);
}
/* The rail had a visible scrollbar thumb (a brass bar under the chips, sized
   to the visible fraction). The hairline and the edge fades say the same thing
   more quietly, so both the bar and its thumb go. */
.codex-type-chips::-webkit-scrollbar { display: none; width: 0; height: 0; }
.codex-type-chips::-webkit-scrollbar-thumb,
.codex-type-chips::-webkit-scrollbar-track { background: transparent; }

.codex-type-chips .fchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 2px 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: var(--t1);
  font-weight: var(--fw-body);
  white-space: nowrap;
  position: relative;
  cursor: pointer;
  color: #d6c49a;
}
.codex-type-chips .fchip::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}
.codex-type-chips .fchip:hover { color: #f0dfb4; }
.codex-type-chips .fchip.active {
  color: #f6e7bd;
  font-weight: var(--fw-emph);
  background: transparent;
}
.codex-type-chips .fchip.active::after { background: var(--brass, #e8c069); }
.codex-type-chips .fchip:focus-visible { outline: 2px solid var(--brass, #e8c069); outline-offset: 2px; }

/* Counts sit quietly beside the label, in tabular figures so the rail stops
   shifting as you switch between 137 and 8. */
.codex-type-chips .fcount {
  font-variant-numeric: tabular-nums;
  font-size: var(--t0);
  color: #b5a279;
  font-weight: var(--fw-body);
}
.codex-type-chips .fchip.active .fcount { color: #cdae69; }

.codex-tab-icon { flex: 0 0 auto; display: inline-flex; }
.codex-tab-icon svg { display: block; }

/* v45.3: a Codex category the DM (or a switched-off module) has hidden leaves the rail (106). */
#screen-codex .codex-type-chips .fchip[hidden] { display: none !important; }
