/* ==========================================================================
   Launch promotion banner and card.

   Scarcity that is real: the counter reads from /api/launch, which reflects seats
   actually claimed in KV. Nothing here is a countdown that resets on reload or a
   fake "3 people are viewing this" — if it says 4 seats left, four seats are left.

   The banner disappears entirely when the promotion sells out. Leaving a dead
   "หมดแล้ว" strip at the top of every page would just be noise, and the card in
   the pricing list carries the sold-out state where it is relevant.
   ========================================================================== */

.launch-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 16px;
  background: linear-gradient(90deg,
              rgba(113, 112, 255, 0.16), rgba(113, 112, 255, 0.06));
  border-bottom: 1px solid rgba(113, 112, 255, 0.24);
  font-size: 13px;
  color: var(--ink-2);
}

/* Hidden by default: the strip is only added once the counter has confirmed there
   are seats. Rendering it optimistically and retracting it would flash a promotion
   at someone who cannot have it. */
.launch-strip[hidden] { display: none; }

.launch-strip-tag {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-hi);
  font-weight: 590;
}

.launch-strip-price {
  color: var(--ink);
  font-weight: 590;
}

.launch-strip-price s {
  color: var(--ink-4);
  font-weight: 400;
  margin-right: 5px;
}

/* The number of remaining seats: the one element that must draw the eye. */
.launch-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(113, 112, 255, 0.2);
  border: 1px solid rgba(113, 112, 255, 0.34);
  color: var(--ink);
  font-weight: 590;
  font-variant-numeric: tabular-nums;
}

/* Low stock earns a colour change; three or fewer is genuinely nearly gone. */
.launch-count.is-low {
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(251, 191, 36, 0.4);
  color: #FCD34D;
}

.launch-strip a {
  color: var(--accent-hi);
  text-decoration: none;
  border-bottom: 1px solid rgba(165, 166, 246, 0.4);
  padding-bottom: 1px;
}
@media (hover: hover) {
  .launch-strip a:hover { color: var(--ink); border-bottom-color: var(--ink); }
}

@media (max-width: 560px) {
  .launch-strip { font-size: 12px; gap: 7px; padding: 8px 12px; }
  .launch-strip-tag { flex-basis: 100%; text-align: center; }
}

/* ---------- the plan card in the pricing list ---------- */

.plan-launch {
  border-color: rgba(113, 112, 255, 0.5) !important;
  background: linear-gradient(180deg,
              rgba(113, 112, 255, 0.09), rgba(113, 112, 255, 0.02)) !important;
  position: relative;
}

.plan-launch-badge {
  position: absolute;
  top: -10px;
  left: 18px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 590;
  letter-spacing: 0.02em;
}

/* Struck-through original price next to the promotional one: the saving has to be
   visible without the reader doing arithmetic. */
.plan-was {
  font-size: 15px;
  color: var(--ink-4);
  text-decoration: line-through;
  margin-right: 8px;
  font-weight: 400;
}

.plan-seats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 2px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* A bar showing how much of the promotion is gone. Reads at a glance in a way a
   bare number does not. */
.plan-seats-bar {
  flex: 1 1 auto;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.plan-seats-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width .5s cubic-bezier(.32, .72, 0, 1);
}
.plan-seats-fill.is-low { background: #FBBF24; }

.plan-seats-num { font-variant-numeric: tabular-nums; font-weight: 590; color: var(--ink); }

/* Sold out: the card stays visible but stops inviting a click. Removing it would
   make the earlier advertising look like a lie. */
.plan-launch.is-gone {
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, 0.015) !important;
}
.plan-launch.is-gone .plan-launch-badge { background: #4A4F58; }
.plan-launch.is-gone .plan-price,
.plan-launch.is-gone .plan-name { color: var(--ink-4); }

.plan-gone-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--ink-4);
}

/* Measured 36px on EVERY pricing button, promo and normal alike — under the 44px
   minimum this project applies elsewhere (the sign-in panel was corrected for the
   same reason). These buttons take money on a phone; fixing only the promotional
   one would leave the real problem in place. */
.plan .btn,
.plan-launch .btn {
  min-height: 46px;
  font-size: 14.5px;
  font-weight: 590;
}
