/* ── Project tab bar ───────────────────────────────────────────
   Horizontal tabs on the project page. The bar sits above the
   #project_tab Turbo Frame and persists while tab content swaps. */
/* M3 primary tabs: 48px, label in title-small, on-surface-variant at rest
   and primary when active, a 3px rounded-top primary indicator, and a 1px
   outline-variant divider under the row. */
.project-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  margin-bottom: 1.5rem;
  /* auto x, hidden y: tabs scroll sideways when they overflow, but never
     vertically. Pinning y avoids a stray vertical scrollbar the browser
     would otherwise show for the tabs' 1px negative bottom margin, since
     setting one axis to auto promotes the other off `visible`. */
  overflow: auto hidden;
  /* M3 scrollable tabs: swipe/scroll, no visible scrollbar under the row. */
  scrollbar-width: none;
}

.project-tabs::-webkit-scrollbar { display: none; }

.project-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 1rem;
  font: var(--md-sys-typescale-title-small);
  letter-spacing: var(--md-sys-typescale-title-small-tracking);
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  white-space: nowrap;
}

.project-tab:hover {
  color: var(--md-sys-color-on-surface);
}

.project-tab.is-active {
  color: var(--md-sys-color-primary);
}

/* The active indicator hugs the label (min 24dp), inset 2dp per side. */
.project-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0.875rem;
  right: 0.875rem;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--md-sys-color-primary);
}

/* Heading row inside a tab's content (title + tab-local actions). */
.tab-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.tab-heading h2 {
  font: var(--md-sys-typescale-title-large);
  letter-spacing: var(--md-sys-typescale-title-large-tracking);
  color: var(--md-sys-color-on-surface);
}

/* Frame shows reduced opacity while a tab is loading. */
#project_tab[aria-busy="true"] {
  opacity: 0.55;
  transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.tab-loading {
  padding: 1.5rem 0;
}
