/* ForecastsPro landing: the founding seats left (owner, 3 October 2026).
 *
 * Loaded after site.css on the six sales pages only (home, /how-it-works, /safety, /math, /faq,
 * /pricing; since 6 November 2026 not /affiliates), which also load assets/js/pricing.js; site.css keeps its size budget. Tokens
 * only, no inline styles (the CSP). Both pieces stay hidden until pricing.js has the live count
 * from the app, so without JavaScript (or without an answer) no page shows a number of seats.
 *
 *  - .price-seats   The pricing card's live count, "Only 17 seats left", a badge on the card's
 *                   top edge (out of the flow: no layout shift when it appears).
 *  - .seat-toast    The small notice at the bottom of the screen: the founding price, the
 *                   seats left and "Claim yours"; the whole notice is one link to /pricing,
 *                   with a close button. It comes after the visitor's first scroll and then
 *                   stays (owner, 10 November 2026).
 *
 * Both read in the warning tone, and in the danger tone (red) from 5 seats down
 * ([data-tone="danger"], set by pricing.js).
 */

/* ---------- The pricing card's live line ---------- */

.price-seats {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 6px 14px 6px 28px;
  border-radius: var(--radius-pill);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: .875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
}
/* A live dot with a soft pulse ring (lp-pulse, site.css); reduced motion
   stops the ring (site.css), the dot stays. */
.price-seats::before,
.price-seats::after {
  content: "";
  position: absolute;
  top: 50%;
  border-radius: 50%;
}
.price-seats::before { left: 12px; width: 8px; height: 8px; margin-top: -4px; background: currentColor; }
.price-seats::after {
  left: 8px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid currentColor;
  opacity: 0;
  animation: lp-pulse 2.4s var(--ease) infinite;
}
.price-seats[data-tone="danger"] { background: var(--danger-soft); color: var(--danger); }
/* On the card's top edge (top right), out of the flow: showing it when the app answers moves
   nothing on the page. Opaque there, so the card's edge does not show through it: the same
   amber or red mixed into the page's darkest colour (as the app's --*-surface colours), so the
   words read at 4.5:1 or more whatever glows behind them (amber 6.5, red 4.9; owner, 6 November
   2026). .price-top's top is the card's padding below its edge. */
.price-top { position: relative; }
.price-card .price-seats {
  position: absolute;
  top: calc(-1 * clamp(24px, 3.2vw, 36px));
  right: 0;
  margin: 0;
  transform: translateY(-50%);
  background: color-mix(in srgb, var(--warning) 16%, var(--bg-deepest));
}
.price-card .price-seats[data-tone="danger"] { background: color-mix(in srgb, var(--danger) 16%, var(--bg-deepest)); }
/* The founding pill (owner, 6 November 2026, design notes) has a line of its own, then "While
   seats last. You renew at $699.", "Regular $999 · Save $300" and the card's first buy button.
   12 px, in the premium gold (owner, 19 November 2026; green before) on a solid gold tint (the
   same gold mixed into the page's darkest colour: 7.2:1, the card's purple glow does not show
   through it). It wraps only where it would run out of the card (the browser's Very large
   text on a 320-358 px phone); its 1em corners round one line into the same pill as before and
   two lines into a rounded box. */
.price-founding .pill {
  display: flex;
  width: fit-content;
  margin: 0 0 6px;
  border-radius: 1em;
  background: color-mix(in srgb, var(--lp-premium) 16%, var(--bg-deepest));
  color: var(--lp-premium);
  font-size: .75rem;
  white-space: normal;
}
.price-top .btn-block { margin-top: 20px; }
.price-top .btn-block + .price-sub { text-align: center; }

/* "Save $300" beside the regular price (owner, 5 October 2026): green, as every gain. */
.price-save { color: var(--success-text); font-weight: 600; }

/* ---------- The notice ---------- */

/* Fixed at the bottom left (bottom, nearly full width, on phones), so it never moves the page.
   It slides up when pricing.js shows it (.is-in), once the visitor has scrolled, never on the
   first screen, and then stays (owner, 10 November 2026: no stepping aside). Solid, and one
   tap target: "Claim yours" links to /pricing and its box covers the whole notice; only the
   close button sits above it. */
.seat-toast {
  position: fixed;
  z-index: 40;            /* under the sticky header and its menu (50) */
  /* In line with the page's left edge (the footer's logo). */
  left: max(var(--lp-gutter), env(safe-area-inset-left), calc((100vw - var(--lp-max)) / 2 + var(--lp-gutter)));
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  padding: 10px 6px 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-pop), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease),
              border-color var(--dur) var(--ease);
}
.seat-toast.is-in { opacity: 1; visibility: visible; transform: none; }
.seat-toast:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border-soft)); }
/* Keyboard focus on the link rings the whole notice (all of it is the link), not the button. */
.seat-toast:has(.seat-toast-cta:focus-visible) { box-shadow: var(--focus-ring), var(--shadow-pop); }
.seat-toast:has(.seat-toast-cta:focus-visible) .seat-toast-cta { box-shadow: none; }
/* While it shows, a control that takes focus scrolls clear of it (54 to 71 px plus its offset);
   not once it is closed ([hidden]; pricing.js leaves .is-in on). */
html:has(.seat-toast.is-in:not([hidden])) { scroll-padding-bottom: 96px; }
/* Room below the footer once the count is known ([data-tone], before it shows), so at the end of
   a page it rests over nothing. Kept after it is closed on this page, so nothing jumps; the next
   page has none. */
body:has(.seat-toast[data-tone]) .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

.seat-toast-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--warning);
}
.seat-toast-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr);  /* never wider than its cell, so never under the button */
  gap: 2px;
  min-width: 0;
  margin: 0;
  font-size: .8125rem;
  line-height: 1.3;
}
/* The price wraps (in balanced lines) where its cell is too narrow for one line. */
.seat-toast-price { color: var(--text-primary); font-weight: 600; text-wrap: balance; }
.seat-toast-seats { color: var(--warning); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seat-toast[data-tone="danger"] .seat-toast-icon { background: var(--danger-soft); color: var(--danger); }
.seat-toast[data-tone="danger"] .seat-toast-seats { color: var(--danger); }

/* No press nudge: the link's box would move away under the finger (no click). */
.seat-toast .seat-toast-cta { height: 36px; padding: 0 14px; font-size: .8125rem; transform: none; }
/* The link's box stretches over the whole notice (the notice is its containing block). */
.seat-toast-cta::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.seat-toast:hover .seat-toast-cta { background: var(--accent-hover); }
/* A plain X over the link, 44 x 44 px: tapping it only closes. */
.seat-toast-close {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -6px 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.seat-toast-close:hover { color: var(--text-primary); }
.seat-toast-close:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }

/* Phones: along the bottom, 16 px from each side, above the home indicator. */
@media (max-width: 640px) {
  .seat-toast {
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    gap: 10px;
    padding: 8px 2px 8px 10px;
  }
  .seat-toast-icon { width: 30px; height: 30px; border-radius: 9px; }
  .seat-toast .seat-toast-cta { padding: 0 12px; }
  body:has(.seat-toast[data-tone]) .site-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}
/* Phone widths (up to the largest phones, 440 px): the icon goes, so the text keeps its room
   (the price on one line from about 390 px, on two below). */
@media (max-width: 440px) {
  .seat-toast { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding-left: 14px; }
  .seat-toast-icon { display: none; }
}
/* The smallest phones (320 to 359 px): the price without its label and a tighter button, so
   the notice keeps two lines ("$699 a year", "Only 17 seats left"). */
@media (max-width: 359px) {
  .seat-toast { padding-left: 12px; }
  .seat-toast .seat-toast-cta { padding: 0 10px; }
  .seat-toast-label { display: none; }
}

/* No slide for visitors who asked for reduced motion: it simply appears. */
@media (prefers-reduced-motion: reduce) {
  .seat-toast { transform: none; transition: none; }
}

@media print {
  .seat-toast { display: none !important; }
}
