/* =========================================================================
   FretboardU — upsell.css
   The locked-tab takeover built by js/upsell.js, plus the 🔒 marker on a
   locked tab button. Uses the custom properties from style.css, so it tracks
   the app's theme without redefining a single colour.
   ========================================================================= */

/* When the gate is up, the controls and the fretboard are not merely hidden —
   they must not be reachable by keyboard either, or Tab walks straight into
   the locked controls behind the panel. `display: none` handles both. */
main.app-shell.is-gated > .controls-panel,
main.app-shell.is-gated > .visualizer-panel {
  display: none !important;
}

main.app-shell.is-gated {
  /* The shell is a two-column grid in the normal case. Gated, there is one
     thing to show and it should have the whole width. */
  display: block;
}

.upsell-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3.5vw, 36px) 16px;
}

.upsell-gate.hidden { display: none !important; }

.upsell-card {
  position: relative;
  width: min(620px, 100%);
  text-align: center;
  padding: clamp(24px, 4vw, 34px) clamp(20px, 4vw, 44px) clamp(22px, 3vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;

  /* A warm amber wash bleeding down from the top edge: enough to read as
     "premium" without turning into a banner ad. */
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(245, 158, 11, 0.16), transparent 62%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

/* Six faint horizontal lines across the top — the neck, abstracted. It ties
   the panel to the product without shipping an image. */
.upsell-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 92px;
  background: repeating-linear-gradient(
    180deg,
    rgba(209, 213, 219, 0.16) 0 1px,
    transparent 1px 16px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
  pointer-events: none;
}

.upsell-lock {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 14px;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(245, 158, 11, 0.42);
}

.upsell-headline {
  position: relative;
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 3.4vw, 1.75rem);
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.01em;
}

.upsell-blurb {
  position: relative;
  margin: 0 auto 18px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

/* Left-aligned inside a centred card: a bullet list that is itself centred
   is markedly harder to scan, and this list is the actual sales pitch. */
.upsell-perks {
  position: relative;
  display: inline-block;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.upsell-perks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 7px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.upsell-tick {
  flex: none;
  margin-top: 1px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--deg-1);
  background: rgba(34, 197, 94, 0.14);
}

.upsell-sub {
  position: relative;
  margin: 0 auto 20px;
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.upsell-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.upsell-actions .primary-btn,
.upsell-actions .ghost-btn {
  min-width: 190px;
  padding: 12px 22px;
  font-size: 0.95rem;
}

.upsell-footnote {
  position: relative;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------------------------------------------------------- locked tab mark
   A small padlock ahead of the label, not a disabled style: the tab is fully
   clickable, and greying it out would say the opposite. */
.tab.is-locked::before {
  content: "🔒";
  margin-right: 7px;
  font-size: 0.82em;
  opacity: 0.75;
}

@media (max-width: 560px) {
  .upsell-actions .primary-btn,
  .upsell-actions .ghost-btn { width: 100%; min-width: 0; }
}

/* ------------------------------------------------- inline (sub-panel) lock
   For a feature that is a panel inside a tab — the Backing Band and the Jam
   Recorder — rather than a tab of its own. Same idea, sidebar-sized. */
.upsell-inline {
  border: 1px dashed var(--border);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.07), transparent 70%);
}

.upsell-inline-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.upsell-inline-lock { flex: none; opacity: 0.85; }

/* Fills the 300px controls column, but does not stretch to a banner when the
   panel it replaces sits in the wide visualizer column (the Jam Recorder). */
.upsell-inline .primary-btn { width: 100%; max-width: 260px; }
