/* ============================================================
   Price-Transparency masthead: sign-in pill + release badge.
   Editorial brand ONLY — burnt sienna (--accent-primary #b04a32),
   cream ground, display/mono type. NO cyan here (that's the admin
   chrome). Uses the pt-editorial.css custom properties.
   ============================================================ */

/* Right-hand masthead cluster: nav + sign-in pill share a baseline row so the
   pill reads as part of the masthead, not a floating afterthought. The header's
   space-between then has exactly two children (mark | right-cluster). */
.pt-masthead-right {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
  row-gap: 0.4rem;
}

/* ── Floating italic-lowercase "beta" superscript next to the wordmark ── */
.pt-release-badge {
  font-family: var(--font-mono);
  font-style: italic;
  font-weight: 600;
  font-size: 0.5em;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--accent-primary); /* burnt sienna */
  vertical-align: super;
  margin-left: 0.15em;
  white-space: nowrap;
  cursor: default;
}

/* ── Sign-in pill ─────────────────────────────────────────── */
.pt-signin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1;
  min-height: 1.6rem; /* reserve height so resolving whoami never shifts layout */
}

/* Loading skeleton — a quiet pulsing bar until whoami resolves (no FOUC, no
   flash-of-protected-content: we never render an identity before we know it). */
.pt-signin-skeleton {
  display: inline-block;
  width: 5.5rem;
  height: 0.85rem;
  border-radius: 0.45rem;
  background: linear-gradient(
    90deg,
    var(--bg-data) 25%,
    var(--bg-data-hover) 50%,
    var(--bg-data) 75%
  );
  background-size: 200% 100%;
  animation: pt-signin-shimmer 1.2s ease-in-out infinite;
}
.pt-signin:not([data-loading]) .pt-signin-skeleton {
  display: none;
}
@keyframes pt-signin-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-signin-skeleton { animation: none; }
}

/* The resolved "Sign in" link / "Signed in as …" label. */
.pt-signin-link {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.pt-signin-link:hover {
  color: var(--accent-warn);
  border-bottom-color: var(--accent-primary);
}

.pt-signin-who {
  color: var(--ink-secondary);
  white-space: nowrap;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pt-signin-who strong {
  color: var(--ink-primary);
  font-weight: 600;
}

/* Local-admin (tailnet) badge — quiet slate pill, no console redirect. */
.pt-signin-local {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--hairline-strong);
  border-radius: 0.45rem;
  color: var(--accent-info);
  background: var(--bg-data);
  white-space: nowrap;
}

/* Sign-out — a text button styled like the link, no chrome. */
.pt-signin-out {
  font: inherit;
  color: var(--ink-tertiary);
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.pt-signin-out:hover {
  color: var(--accent-warn);
  border-bottom-color: var(--accent-warn);
}

/* Live numbers (credits) render tabular so they don't jitter as they change. */
.pt-signin-credits {
  font-variant-numeric: tabular-nums;
  color: var(--ink-tertiary);
}

/* If whoami errors, we fall back to a plain sign-in link — never a broken pill. */
.pt-signin-error .pt-signin-link {
  color: var(--ink-tertiary);
}

/* Visually-hidden but exposed to assistive tech (no .sr-only in the PT bundle). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .pt-masthead-right {
    gap: 0.9rem;
    width: 100%;
  }
}
