/* ── Project tab bar ───────────────────────────────────────────
   Horizontal tabs on the project page. The bar sits above the
   #project_tab Turbo Frame and persists while tab content swaps. */
.project-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  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;
}

.project-tab {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-mid);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.project-tab:hover {
  color: var(--teal);
}

.project-tab.is-active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  font-weight: 600;
}

/* No fixed height: pinning it made the copy-link overflow and paint over the row. */
.cashbook-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.copy-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--gray-mid);
  cursor: pointer;
  transition: color 0.15s;
}

.copy-link:hover { color: var(--teal); }
.copy-link.is-copied { color: var(--teal); font-weight: 600; }

.copy-link-icon { font-size: 0.9rem; line-height: 1; }

@media (max-width: 600px) {
  .cashbook-cta { align-items: stretch; }
  .copy-link { justify-content: center; }
}

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

.tab-heading h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-dark);
}

/* Frame shows reduced opacity while a tab is loading. */
#project_tab[aria-busy="true"] {
  opacity: 0.55;
  transition: opacity 0.15s;
}

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