/* TickTalk beta nav strip — global, injected by beta_nav.js. */

.beta-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 14px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 100;
}

.beta-nav .brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.beta-nav .brand:hover { color: var(--accent); }

/* --- Steps ----------------------------------------------------------------- */

.beta-nav .steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  position: relative;
}

.beta-nav .step a {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 8px 14px;
  text-decoration: none;
  border-radius: 10px;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
  color: var(--ink);
}
.beta-nav .step a:hover { background: var(--accent-quiet); }

.beta-nav .step .step-n {
  grid-row: 1 / 3;
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.beta-nav .step .step-label {
  grid-row: 1;
  grid-column: 2;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.beta-nav .step .step-count {
  grid-row: 2;
  grid-column: 2;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

/* Active step — accent fill on the number circle, accent text on the label */
.beta-nav .step.active .step-n {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--panel);
}
.beta-nav .step.active a { background: var(--accent-quiet); }
.beta-nav .step.active .step-label { color: var(--accent); }

/* Locked step — dim, no hover, no nav */
.beta-nav .step.locked a {
  cursor: not-allowed;
  opacity: 0.55;
}
.beta-nav .step.locked a:hover { background: transparent; }

/* --- User menu ------------------------------------------------------------- */

.beta-nav .user-menu {
  position: relative;
  /* The nav grid is `auto 1fr auto` but the V2 layout only fills two cells
   * (brand + user-menu) — without justify-self the chip lands flush against
   * the brand instead of the right edge. */
  justify-self: end;
  grid-column: -1;
}

.beta-nav .user-chip {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.beta-nav .user-chip:hover { background: var(--accent-quiet); border-color: var(--accent); }
.beta-nav .user-chip .caret { font-size: 10px; color: var(--muted); }

.beta-nav .user-menu-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(26, 24, 20, 0.08);
  display: flex;
  flex-direction: column;
  padding: 4px;
  z-index: 200;
}
/* U1: defensive [hidden] override. The display:flex above wins over the
 * [hidden] attribute's UA-default display:none, so the menu stayed visible
 * regardless of the JS toggle. Same pattern manual.css uses on <main>. */
.beta-nav .user-menu-dropdown[hidden] { display: none; }

.beta-nav .user-menu-dropdown a,
.beta-nav .user-menu-dropdown button {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  text-decoration: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
}
.beta-nav .user-menu-dropdown a:hover,
.beta-nav .user-menu-dropdown button:hover {
  background: var(--accent-quiet);
  color: var(--accent);
}

/* --- Responsive collapse below 768px ---------------------------------------
 * The steps row collapses to icons-only on narrow viewports; full labels
 * return at desktop sizes. Phase A scope doesn't promise mobile, but this
 * keeps the nav from horizontally overflowing on a phone test refresh.
 */
@media (max-width: 768px) {
  .beta-nav {
    grid-template-columns: auto auto;
    gap: 14px;
    padding: 10px 16px;
  }
  .beta-nav .steps { display: none; }
}

/* --- U12: Floating Share Feedback FAB + modal ---------------------------- *
 * Bottom-right glowing circle injected by beta_nav.js on every beta page.
 * Pulses gently to draw the eye without being distracting. Clicks open a
 * centred modal with a textarea + optional email.                         */

/* Rectangular sticker-style CTA rather than a small circle — the operator's
 * pitch ("$5 for feedback") needs room for two lines of copy. */
.feedback-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 300px;
  max-width: calc(100vw - 32px);
  padding: 14px 18px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: var(--paper);
  text-align: left;
  cursor: pointer;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 12px 32px rgba(197, 54, 58, 0.35),
              0 0 0 0 rgba(197, 54, 58, 0.4);
  animation: feedbackFabPulse 2.2s ease-in-out infinite;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  transform-origin: bottom right;
}
.feedback-fab:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 40px rgba(197, 54, 58, 0.5);
}
.feedback-fab:active { transform: scale(0.99); }

.feedback-fab-headline {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.feedback-fab-sub {
  font-family: var(--font-body);
  font-size: 12px;
  font-style: italic;
  line-height: 1.35;
  opacity: 0.92;
}

@keyframes feedbackFabPulse {
  0%, 100% { box-shadow: 0 12px 32px rgba(197, 54, 58, 0.35),
                         0 0 0 0   rgba(197, 54, 58, 0.4); }
  50%      { box-shadow: 0 12px 32px rgba(197, 54, 58, 0.5),
                         0 0 0 18px rgba(197, 54, 58, 0);  }
}
@media (prefers-reduced-motion: reduce) {
  .feedback-fab { animation: none; }
  .feedback-fab:hover { transform: none; }
}

/* --- modal ----------------------------------------------------------- */

.feedback-modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}
.feedback-modal[hidden] { display: none; }

.feedback-modal-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 24px;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}
.feedback-modal-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.feedback-modal-card .meta { margin: 0 0 14px; }

.feedback-modal-card textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  resize: vertical;
  min-height: 92px;
  margin-bottom: 12px;
}
.feedback-email-label {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.feedback-email-label input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.feedback-actions button {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.feedback-actions button.primary {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
.feedback-actions button:disabled { opacity: 0.6; cursor: wait; }
