/* Staging environment chip — see js/staging.js / issue #70.
   Uses the terracotta highlight palette so it reads as distinct from the
   green DEMO chip (different mode, different colour family). */

.toolbar__staging {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xxs) var(--space-sm);
  margin-left: var(--space-md);
  border-radius: var(--radius-pill);
  background-color: var(--color-highlight-soft);
  color: var(--color-highlight-hover);
  border: 1px solid var(--color-highlight);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  flex-shrink: 0;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.toolbar__staging:hover {
  background-color: var(--color-surface);
  transform: translateY(-1px);
}

.toolbar__staging:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 2px;
}

.toolbar__staging-tag {
  font-family: var(--font-serif);
  font-style: italic;
  letter-spacing: 0.06em;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
  padding: 1px var(--space-xxs);
  background-color: var(--color-highlight);
  color: var(--color-surface);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.toolbar__staging-label {
  white-space: nowrap;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mirror variant — staging is currently serving main. Softer copy,
   italicised label so it doesn't compete with the PR-active variant. */
.toolbar__staging--mirror {
  background-color: var(--color-surface-alt);
  color: var(--color-text-muted);
  border-color: var(--color-border-strong);
}

.toolbar__staging--mirror .toolbar__staging-tag {
  background-color: var(--color-text-muted);
  color: var(--color-surface);
}

.toolbar__staging--mirror .toolbar__staging-label {
  font-style: italic;
}

/* On narrow viewports, drop the PR title text but keep tag + PR number. */
@media (max-width: 640px) {
  .toolbar__staging {
    margin-left: var(--space-xs);
  }
  .toolbar__staging-label {
    max-width: 10ch;
  }
}
