/* The persistent billing bar — components/billing-banner.js.
 *
 * Same structural approach as update-notice.css: a row inserted into #main
 * above #content, not an overlay. #main is a flex column with #content on
 * flex: 1, so the bar takes its own band across the top of the app and
 * #content gives up exactly that much height. Nothing is covered, nothing has
 * to be told to move, and it works the same over one pane or two.
 *
 * WHERE IT DIFFERS, AND WHY. update-notice is deliberately quiet — gold, no
 * red, a steady dot — because a deploy landing is news. This is not news. Two
 * of its three states carry a date after which somebody loses access, so the
 * urgent tone is allowed to actually look urgent. The informational tone stays
 * as quiet as update-notice, because a pending seat is not a problem.
 *
 * Tokens only, no literal colours: the app ships six themes and a hard-coded
 * red is unreadable in at least two of them. */

.billing-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 9px 16px;
  border-bottom: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

/* ── Tones ────────────────────────────────────────────────────────────────────
 *
 * Three, and no more. A fourth would mean the person reading has to work out
 * which shade means what, which is the opposite of the point. */

/* A deadline exists and something must be done.
 *
 * --red is defined in 7 of the 9 themes; the two that skip it fall back to the
 * gold pair, which is the same treatment as tone-warn. That is a real loss of
 * signal in those two themes and it is still the right fallback: an unreadable
 * red is worse than a legible amber. If those themes ever gain a --red, this
 * gets sharper with no change here. */
.billing-banner.tone-urgent {
  background: var(--red-soft, var(--gold-soft));
  border-bottom-color: var(--red, var(--gold));
}

/* A deadline exists and it was chosen deliberately, or it belongs to somebody
   else. Worth reading, not worth alarm. */
.billing-banner.tone-warn {
  background: var(--gold-soft);
  border-bottom-color: var(--gold);
}

/* No deadline. Deliberately quieter than update-notice — a pending seat grants
   full access (PRICING.md §2) and must not read as a restriction. */
.billing-banner.tone-info {
  background: var(--surface);
  border-bottom-color: var(--border);
}

.billing-banner-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  line-height: 1;
}

.billing-banner-text {
  flex: 1;
  min-width: 0;
}

/* The headline carries the date and the headcount, so it has to survive being
   skimmed. Everything after it is the explanation. */
.billing-banner-text strong {
  font-weight: 600;
  margin-right: 4px;
}

.billing-banner-btn {
  flex: none;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  /* The same pair .btn-primary uses (components/buttons.css) rather than a new
     one. Gold even on the urgent tone: the bar is already red, and a red button
     on a red band is the one combination that stops reading as a button. */
  background: var(--gold);
  color: var(--surface);
}

.billing-banner-btn:hover:not(:disabled) { filter: brightness(1.06); }

.billing-banner-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Narrow windows: the button drops under the text rather than squeezing it.
   A producer reading this on a phone between calls needs the sentence intact
   more than it needs to be one line. */
@media (max-width: 620px) {
  .billing-banner {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .billing-banner-btn {
    margin-left: 25px;
  }
}
