/* =============================================================================
   JOURNEY ON THE SHARED THEME — first-login onboarding modal, Apprentice
   welcome screen, Mission Control drawer, mission toast, gift reveal and the
   gift teaser (styles live in css/base/style.css; this file only re-skins).

   White cards stay white: they sit on the white workspace on purpose. What
   changes is the theme language around them — IBM Plex, one blue for actions
   on white, theme slate for the dark surfaces with a cyan accent, solid
   headings (no gradient text), no glow / lift / sheen, no purple.
   Loaded after the workspace stylesheets on index, roadmap and learn builder.
============================================================================= */
.mission-control-drawer,
.mission-complete-toast,
.apprentice-transition,
.apprentice-gift-overlay,
.gift-teaser-backdrop,
#journey-onboarding-modal {
  --blue: #3b82f6;
  --blue-2: #3b82f6;
  --cyan: #0e9fbf;
  --violet: #0f766e;           /* Practice: teal instead of purple */
  --bg-header: #0e1626;
  --bg-inset-dark: rgba(255,255,255,0.08);
  --border-hover: rgba(59,130,246,0.45);
  --glow-blue: 0 0 0 1px rgba(59,130,246,0.35);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.mission-control-drawer button,
.apprentice-transition button,
.apprentice-gift-overlay button,
.gift-teaser-backdrop button,
#journey-onboarding-modal button { font-family: inherit; }

/* Mono numbers: Plex Mono like the rest of the site */
#mission-control-head-progress,
.mission-module-fraction,
.mission-task-progress-pct,
.apprentice-transition-chip,
.apprentice-pipeline-complete .pipeline-meta,
.offer-duration strong,
#journey-onboarding-modal .journey-step-eyebrow > span {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ─── Onboarding modal ─────────────────────────────────────────────────────── */
#journey-onboarding-modal .modal-header h2 { letter-spacing: -0.025em; color: #0f172a; }
#journey-onboarding-modal #journey-onboarding-submit,
#journey-onboarding-modal #journey-onboarding-continue,
#journey-onboarding-modal #journey-activate-gift {
  background: #3b82f6;
  border-color: #3b82f6;
  box-shadow: none;
  transform: none;
}
#journey-onboarding-modal #journey-onboarding-submit:hover,
#journey-onboarding-modal #journey-onboarding-continue:hover,
#journey-onboarding-modal #journey-activate-gift:hover { background: #2563eb; border-color: #2563eb; box-shadow: none; transform: none; }
#journey-onboarding-modal .journey-select-trigger:hover { border-color: rgba(59,130,246,0.45); }
#journey-onboarding-modal .journey-select.open .journey-select-trigger { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.14); }
#journey-onboarding-modal .journey-select[data-select-id="journey-onboarding-type"] .journey-select-item-icon { background: rgba(59,130,246,0.1); color: #2563eb; }
#journey-onboarding-modal .journey-select-item.active { background: #f1f5f9; border-color: rgba(59,130,246,0.25); }
#journey-onboarding-modal .journey-step-dots span.on { background: #3b82f6; }
#journey-onboarding-modal .journey-onboarding-success { background: #f8fafc; }
#journey-onboarding-modal .journey-onboarding-success-head h3,
#journey-onboarding-modal .journey-welcome-gift h4 { color: #0f172a; }
#journey-onboarding-modal .journey-welcome-gift { background: #ffffff; }

/* ─── Apprentice welcome screen ────────────────────────────────────────────── */
.apprentice-transition { background: rgba(14,22,38,0.72); }
.apprentice-transition-card { border-color: rgba(15,23,42,0.1); border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(2,6,23,0.55); }
.apprentice-transition-card::after { display: none; }
.apprentice-transition-brand { background: none; }
.apprentice-transition-brand img { filter: drop-shadow(0 6px 14px rgba(15,23,42,0.18)); }
.apprentice-transition-card h2 { color: #0f172a; letter-spacing: -0.025em; }
.apprentice-transition-card h2 span {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #2563eb;
  -webkit-text-fill-color: currentColor;
}
.apprentice-transition-card p { color: #334155; }
.apprentice-transition-card p strong { color: #0f172a; }
.apprentice-transition-chip { color: #2563eb; background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.25); }
.apprentice-transition-offer { background: #f8fafc; border-color: rgba(15,23,42,0.08); }
.apprentice-transition-offer::before { display: none; }
.apprentice-transition-card #apprentice-transition-start {
  background: #3b82f6;
  border-color: #3b82f6;
  border-radius: 12px;
  box-shadow: none;
  transition: background .18s ease;
}
.apprentice-transition-card #apprentice-transition-start:hover { background: #2563eb; border-color: #2563eb; transform: none; filter: none; box-shadow: none; }
.apprentice-transition-card #apprentice-transition-start:active { box-shadow: none; }

/* ─── Mission Control drawer ───────────────────────────────────────────────── */
.mission-control-backdrop { background: rgba(14,22,38,0.4); }
.mission-control-head { background: #0e1626; border-bottom: 1px solid rgba(255,255,255,0.06); }
#mission-control-head-progress { color: #e8edf5; }
.mission-control-progress-label,
#mission-control-headline { color: #8a9ab3; }
.mission-pipeline-notch::before { background: #5cc8f2; }
.mission-pipeline-notch.is-filled::before { box-shadow: none; }
.mission-control-close:hover { color: #e8edf5; border-color: rgba(92,200,242,0.5); box-shadow: none; }

.mission-phase-node { box-shadow: none; }
.mission-phase-node.is-roadmap.is-active,
.mission-phase-node.is-learn.is-active,
.mission-phase-node.is-practice.is-active,
.mission-phase-node.is-interview.is-active { box-shadow: none; }
.mission-task-card:hover { transform: none; box-shadow: var(--shadow-card); }
.mission-task-progress-fill { background: var(--blue); }
.mission-task-card.is-completed .mission-task-progress-fill { background: var(--green); }
.mission-btn-primary,
.mission-empty-cta { background: #3b82f6; border-color: #3b82f6; box-shadow: none; }
.mission-btn-primary:hover,
.mission-empty-cta:hover { background: #2563eb; filter: none; box-shadow: none; }
.mission-btn-primary:active,
.mission-btn-ghost:active { transform: none; }
.mission-control-roadmap-link { color: #2563eb; }

/* ─── Mission complete toast (dark surface → theme slate) ──────────────────── */
.mission-complete-toast {
  background: #141e31;
  color: #e8edf5;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(2,6,23,0.6);
}
.mission-complete-toast strong { color: #5cc8f2; }
#mission-complete-progress,
#mission-complete-next { color: #b8c4d6; }

/* ─── Gift reveal + reward card + gift teaser ──────────────────────────────── */
.apprentice-gift-dot { background: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,0.18); }
.apprentice-gem-ambient { background: radial-gradient(circle, rgba(59,130,246,0.28) 0%, rgba(92,200,242,0.14) 50%, rgba(92,200,242,0) 78%); }
.apprentice-reward-card { border-radius: 16px; }
.apprentice-reward-card::before { display: none; }
.apprentice-reward-brand { background: none; }
.apprentice-reward-card h3 {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: #0f172a;
  letter-spacing: -0.025em;
}
.apprentice-pipeline-complete { background: #f8fafc; }
.apprentice-pipeline-complete .pipeline-track span { background: var(--green); box-shadow: none; }
.apprentice-reward-offer { background: #ffffff; }
.apprentice-trial-cta { background: #3b82f6; box-shadow: none; }
.apprentice-trial-cta:hover { background: #2563eb; filter: none; transform: none; box-shadow: none; }
.apprentice-trial-cta:active { transform: none; }
.gift-teaser-backdrop { background: rgba(14,22,38,0.6); }

/* ─── Mission intro carousel (js/shared/mission-intro.js) ─────────────────── */
.mission-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.mission-intro-card {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 36px;
  align-items: stretch;
  padding: 36px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  color: #0f172a;
}
.mission-intro-text { display: flex; flex-direction: column; min-height: 440px; }
.mission-intro-shot {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  overflow: hidden;
  height: 460px;
}
.mission-intro-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}
@media (max-width: 760px) {
  .mission-intro-card { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .mission-intro-shot { order: -1; height: 200px; }
  .mission-intro-text { min-height: 0; }
}
.mission-intro-eyebrow {
  font-size: var(--t-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0e9fbf;
}
.mission-intro-title {
  margin: 16px 0 0;
  font-size: var(--t-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.mission-intro-body {
  margin: 12px 0 0;
  font-size: var(--t-heading);
  line-height: 1.65;
  color: #475569;
}
.mission-intro-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: var(--t-small);
  line-height: 1.5;
  color: #334155;
}
.mission-intro-dots { display: flex; gap: 6px; margin-top: auto; padding-top: 22px; }
.mission-intro-dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; }
.mission-intro-dot.is-active { width: 18px; border-radius: 3px; background: #3b82f6; }
.mission-intro-actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.mission-intro-spacer { flex: 1; }
.mission-intro-btn {
  font-family: inherit;
  font-size: var(--t-body);
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}
.mission-intro-btn-primary { background: #3b82f6; border-color: #3b82f6; color: #ffffff; }
.mission-intro-btn-primary:hover { background: #2563eb; border-color: #2563eb; }
.mission-intro-btn-ghost { background: transparent; border-color: #e2e8f0; color: #475569; }
.mission-intro-btn-ghost:hover { border-color: #cbd5e1; color: #0f172a; }
.mission-intro-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

/* "Mark as complete": the selected theme's primary, filled, so it reads apart
   from Continue and follows the light / dark toggle. */
.mission-control-drawer .mission-btn-mark {
  color: #ffffff;
  border-color: var(--pt-primary, #3b82f6);
  background: var(--pt-primary, #3b82f6);
}
.mission-control-drawer .mission-btn-mark:hover:not(:disabled) {
  color: #ffffff;
  background: var(--pt-primary-hover, #2563eb);
  border-color: var(--pt-primary-hover, #2563eb);
}
.mission-control-drawer .mission-btn-mark:disabled { opacity: 0.6; cursor: progress; }

/* Secondary text on the white mission cards: slate-600/700 instead of the
   light greys, which were hard to read. */
.mission-control-drawer .mission-task-howto { color: #334155; }
.mission-control-drawer .mission-task-progress-pct,
.mission-control-drawer .mission-module-fraction,
.mission-control-drawer .mission-review-link,
.mission-control-drawer .mission-control-nextup-label { color: #475569; }
.mission-control-drawer .mission-task-card.is-completed .mission-task-title { color: #64748b; }
.mission-control-drawer .mission-control-progress-label { color: #cbd5e1; }

/* Change answers: Mission Control header button + the modal's Cancel */
.mission-control-drawer .mission-control-edit-answers {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: var(--t-small);
  font-weight: 600;
  color: #cbd5e1;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  cursor: pointer;
}
.mission-control-drawer .mission-control-edit-answers svg { width: 13px; height: 13px; }
.mission-control-drawer .mission-control-edit-answers:hover { color: #ffffff; border-color: rgba(255,255,255,0.4); }
.mission-control-drawer .mission-control-edit-answers[hidden] { display: none; }
#journey-onboarding-modal .modal-actions .button-row { gap: 10px; }
#journey-onboarding-modal #journey-onboarding-cancel {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.14);
  color: #334155;
}
#journey-onboarding-modal #journey-onboarding-cancel:hover { background: #f1f5f9; color: #0f172a; }
