/* ==========================================================================
   IONITY CENTRAL - JUDGE TOUR
   Guided spotlight walkthrough for hackathon judges & first-time visitors.
   Author: Johan Wilhelm van Antwerp | Antwerp Designs | Ionity Global (Pty) Ltd
   Aesthetic: inherits main.css tokens (Canvas #1A1A1A / Accent #3366FF / 8-Bit Gold #FFA000)
   ========================================================================== */

.jt-root { position: fixed; inset: 0; z-index: 9600; pointer-events: none; }
.jt-root.jt-active { pointer-events: auto; }

/* ---- Dimmer: four panes around the spotlight, so the target stays crisp ---- */
.jt-shade {
  position: fixed;
  background: rgba(8, 8, 8, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: all 260ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 9601;
}

/* ---- Spotlight ring ---- */
.jt-ring {
  position: fixed;
  border: 2px solid var(--accent-primary, #3366FF);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 0 0 3px rgba(51, 102, 255, 0.18), 0 0 32px rgba(51, 102, 255, 0.55);
  transition: all 260ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 9603;
  pointer-events: none;
}
.jt-ring::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid var(--accent-8bit-gold, #FFA000);
  opacity: 0;
  animation: jt-pulse 2.2s ease-out infinite;
}
@keyframes jt-pulse {
  0%   { opacity: 0.85; transform: scale(1); }
  70%  { opacity: 0;    transform: scale(1.045); }
  100% { opacity: 0;    transform: scale(1.045); }
}

/* ---- Coach card ---- */
.jt-card {
  position: fixed;
  width: min(388px, calc(100vw - 32px));
  background: var(--glass-bg-elevated, rgba(42, 42, 42, 0.95));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border-hover, rgba(51, 102, 255, 0.45));
  border-radius: var(--radius-xl, 18px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  padding: 18px 20px 16px;
  z-index: 9604;
  transition: all 260ms cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--font-sans, sans-serif);
  color: var(--text-main, #fff);
}
.jt-card.jt-enter { opacity: 0; transform: translateY(8px) scale(0.985); }

.jt-card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.jt-chip {
  font-family: var(--font-8bit, monospace);
  font-size: 8px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-8bit-gold, #FFA000);
  border: 1px solid var(--accent-8bit-gold, #FFA000);
  background: var(--accent-8bit-gold-subtle, rgba(255,160,0,0.15));
  padding: 4px 7px; border-radius: 3px; white-space: nowrap;
}
.jt-count { font-family: var(--font-mono, monospace); font-size: 11px; color: var(--text-subtle, #707070); }

.jt-title {
  font-size: 16px; font-weight: 700; line-height: 1.3;
  margin: 0 0 6px; letter-spacing: -0.01em;
}
.jt-body { font-size: 13px; line-height: 1.55; color: var(--text-muted, #A0A0A0); margin: 0; }
.jt-body strong { color: var(--text-main, #fff); font-weight: 600; }
.jt-body code {
  font-family: var(--font-mono, monospace); font-size: 11.5px;
  background: rgba(51, 102, 255, 0.16); color: #9DB6FF;
  padding: 1px 5px; border-radius: 3px;
}

/* ---- Progress ---- */
.jt-track {
  height: 3px; border-radius: 2px; margin: 15px 0 13px;
  background: rgba(255, 255, 255, 0.09); overflow: hidden;
}
.jt-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-primary, #3366FF), var(--accent-8bit-gold, #FFA000));
  transition: width 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Controls ---- */
.jt-actions { display: flex; align-items: center; gap: 8px; }
.jt-btn {
  font-family: var(--font-sans, sans-serif); font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-subtle, #333); background: transparent;
  color: var(--text-muted, #A0A0A0); cursor: pointer;
  transition: all 140ms ease; white-space: nowrap;
}
.jt-btn:hover { color: var(--text-main, #fff); border-color: var(--border-highlight, rgba(255,255,255,0.14)); background: rgba(255,255,255,0.04); }
.jt-btn-primary {
  background: var(--accent-primary, #3366FF); border-color: var(--accent-primary, #3366FF);
  color: #fff; box-shadow: 0 4px 16px rgba(51, 102, 255, 0.4);
}
.jt-btn-primary:hover { background: var(--accent-hover, #4D7BFF); border-color: var(--accent-hover, #4D7BFF); color: #fff; }
.jt-btn-ghost { border-color: transparent; padding: 8px 10px; }
.jt-spacer { flex: 1; }
.jt-hint {
  margin-top: 11px; font-family: var(--font-mono, monospace);
  font-size: 10px; color: var(--text-subtle, #707070); text-align: center;
}
.jt-hint kbd {
  font-family: var(--font-mono, monospace); font-size: 9.5px;
  border: 1px solid var(--border-subtle, #333); border-bottom-width: 2px;
  border-radius: 3px; padding: 1px 4px; margin: 0 1px; color: var(--text-muted, #A0A0A0);
}

/* ---- Relaunch pill ---- */
/* Anchored under the header on the right: the bottom-left corner belongs to the
   dockable camera widget and the bottom-right to the OCR inspector HUD. */
.jt-relaunch {
  position: fixed;
  top: calc(var(--header-height, 60px) + 14px);
  right: 18px; z-index: 9500;
  display: flex; align-items: center; gap: 7px;
  background: var(--glass-bg-elevated, rgba(42,42,42,0.9));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
  border-radius: 100px; padding: 8px 15px 8px 12px;
  font-family: var(--font-sans, sans-serif); font-size: 12px; font-weight: 600;
  color: var(--text-muted, #A0A0A0); cursor: pointer;
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,0.6));
  transition: all 160ms ease;
}
.jt-relaunch:hover {
  color: #fff; border-color: var(--glass-border-hover, rgba(51,102,255,0.45));
  transform: translateY(-1px); box-shadow: 0 10px 30px rgba(0,0,0,0.7), 0 0 20px rgba(51,102,255,0.25);
}
.jt-relaunch-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--status-green, #00E676); box-shadow: 0 0 8px var(--status-green, #00E676);
  animation: jt-blink 2.4s ease-in-out infinite; flex: none;
}
@keyframes jt-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- Finale ---- */
.jt-finale { text-align: center; }
.jt-finale .jt-mark {
  font-family: var(--font-8bit, monospace); font-size: 15px; line-height: 1.7;
  color: var(--accent-8bit-gold, #FFA000); margin-bottom: 12px; letter-spacing: 0.04em;
}
.jt-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 15px 0 4px;
}
.jt-stat {
  background: rgba(255,255,255,0.035); border: 1px solid var(--border-subtle, #333);
  border-radius: var(--radius-md, 8px); padding: 9px 4px;
}
.jt-stat-n {
  font-family: var(--font-mono, monospace); font-size: 15px; font-weight: 700;
  color: var(--accent-primary, #3366FF); display: block; line-height: 1.2;
}
.jt-stat-l { font-size: 9px; color: var(--text-subtle, #707070); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Mobile ---- */
@media (max-width: 720px) {
  .jt-card {
    left: 12px !important; right: 12px !important;
    width: auto !important; bottom: 14px !important; top: auto !important;
  }
  .jt-ring { display: none; }
  .jt-relaunch {
    top: calc(var(--header-height, 60px) + 10px);
    right: 10px; bottom: auto; left: auto;
    padding: 6px 12px 6px 9px; font-size: 11px;
  }
  .jt-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .jt-shade, .jt-ring, .jt-card, .jt-fill { transition: none; }
  .jt-ring::after, .jt-relaunch-dot { animation: none; }
}
