/* ─────────────────────────────────────────
   Woosh Bikes — Interactive Code Tour Stylesheet
   css/tour.css
   ───────────────────────────────────────── */

.tour-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  font-family: var(--font-family);
  color: var(--text-primary);
}

.tour-header {
  margin-bottom: 32px;
}

.tour-header h1 {
  font-size: clamp(28px, 3.5vw, 42px);
  margin-bottom: 8px;
}

.tour-header p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 700px;
}

/* ── DASHBOARD LAYOUT ── */
.tour-dashboard {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
}

/* ── LEFT COLUMN: PLAYER ── */
.tour-player-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Player Screen */
.player-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #0f172a; /* Deep Slate 900 */
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Mockup Display Slides */
.player-mockup-wrapper {
  flex: 1;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mockup-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ── PREVIEW MOCKUP COMPONENT STYLING ── */
.preview-card {
  width: 90%;
  height: 85%;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.preview-browser-bar {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}
.preview-dot.red { background: #ef4444; }
.preview-dot.yellow { background: #f59e0b; }
.preview-dot.green { background: #10b981; }

.preview-address-bar {
  flex: 1;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 10px;
  color: #64748b;
  padding: 2px 8px;
  display: flex;
  align-items: center;
}

.preview-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-size: 12px;
  position: relative;
  background: #fff;
  color: #334155;
}

/* Slide Specific Previews */
.preview-intro {
  background: radial-gradient(circle, #f0fdf4 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}
.preview-intro-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.preview-intro-logo span { color: var(--accent); font-style: italic; }
.preview-intro-pulse {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  margin: 12px;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.preview-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  height: 100%;
  align-items: center;
}
.preview-badge-green {
  background: var(--primary-pale);
  color: var(--primary);
  border: 1px solid var(--primary-mid);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 8px;
  display: inline-block;
  margin-bottom: 4px;
}
.preview-hero-title { font-size: 15px; font-weight: 700; color: #1e293b; line-height: 1.2; }
.preview-hero-sub { font-size: 9px; color: #64748b; margin: 4px 0 8px; }
.preview-btn {
  background: var(--accent);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  display: inline-block;
}
.preview-btn-orange { background: #d97706; }
.preview-hero-right {
  background: #fafbfc;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-left: 1px solid #f1f5f9;
  padding: 8px;
}
.preview-bike-thumb {
  width: 80%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}
.preview-call-bar {
  background: var(--primary);
  color: white;
  width: 100%;
  font-size: 7px;
  padding: 4px;
  text-align: center;
  border-radius: 4px;
  margin-top: auto;
}

.preview-bikes-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.preview-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.preview-mini-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  background: white;
}
.preview-mini-img {
  background: #f8fafc;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-mini-img img { max-height: 38px; }
.preview-mini-body { padding: 6px; }
.preview-mini-title { font-size: 9px; font-weight: 700; }
.preview-mini-price { font-size: 9px; font-weight: 700; color: var(--primary); margin-top: 4px; }

.preview-kits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 100%;
  align-items: center;
}
.preview-kit-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.preview-kit-title { font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.preview-bullet-list { font-size: 8px; list-style: none; color: #64748b; padding-left: 0; }
.preview-bullet-list li { margin: 2px 0; }

.preview-config-banner {
  background: linear-gradient(135deg, var(--warning-pale) 0%, #fffbeb 100%);
  border: 1px solid #fef3c7;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.preview-config-text { flex: 1; }
.preview-config-title { font-size: 12px; font-weight: 700; color: #78350f; }

.preview-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--primary);
  padding: 12px;
  border-radius: 8px;
  color: white;
}
.preview-why-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px;
  border-radius: 6px;
  text-align: center;
}
.preview-why-emoji { font-size: 14px; margin-bottom: 4px; }
.preview-why-title { font-size: 9px; font-weight: 600; color: #fff; }
.preview-why-desc { font-size: 7px; color: rgba(255,255,255,0.7); margin-top: 2px; }

.preview-reviews-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
}
.preview-reviews-stars { color: #f59e0b; font-weight: bold; }
.preview-bubble-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  box-shadow: var(--shadow-sm);
}
.preview-bubble-text { font-style: italic; color: #475569; font-size: 9px; }
.preview-bubble-author { font-size: 8px; font-weight: bold; margin-top: 4px; }

.preview-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.preview-contact-card {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}
.preview-contact-icon { font-size: 14px; margin-bottom: 4px; }
.preview-contact-title { font-size: 9px; font-weight: 700; }
.preview-contact-detail { font-size: 8px; color: var(--accent-hover); font-weight: 600; margin-top: 4px; }

.preview-footer-box {
  background: #0c1814;
  color: rgba(255,255,255,0.5);
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.preview-footer-logo { font-weight: bold; color: white; font-size: 13px; margin-bottom: 6px; }
.preview-footer-logo span { color: var(--accent); }
.preview-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; font-size: 8px; }
.preview-footer-col h5 { color: rgba(255,255,255,0.3); font-size: 7px; text-transform: uppercase; margin-bottom: 4px; }
.preview-footer-col ul { list-style: none; padding-left: 0; }
.preview-footer-col li { margin: 1px 0; }

/* ── SUBTITLE OVERLAY ── */
.player-subtitles-area {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.8) 80%, transparent 100%);
  padding: 24px 24px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.player-presenter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.presenter-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Audio Visualizer Bouncing Waves */
.voice-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  width: 24px;
}

.wave-bar {
  width: 3px;
  height: 4px;
  background: var(--accent);
  border-radius: 3px;
  transition: height 0.15s ease;
}

.voice-waves.playing .wave-bar:nth-child(1) { animation: bounceWave 0.6s infinite alternate; }
.voice-waves.playing .wave-bar:nth-child(2) { animation: bounceWave 0.5s infinite alternate 0.1s; }
.voice-waves.playing .wave-bar:nth-child(3) { animation: bounceWave 0.7s infinite alternate 0.2s; }
.voice-waves.playing .wave-bar:nth-child(4) { animation: bounceWave 0.4s infinite alternate 0.15s; }

@keyframes bounceWave {
  0% { height: 4px; }
  100% { height: 22px; }
}

.player-subtitles-text {
  flex: 1;
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ── PLAYER CONTROLS PANEL ── */
.player-controls {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: -21px; /* Stitch to screen bottom */
}

/* Timeline scrub bar */
.timeline-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-stamp {
  font-family: monospace;
  font-size: 12px;
  color: #94a3b8;
  width: 40px;
}

.timeline-scrub-bar {
  flex: 1;
  height: 6px;
  background: #334155;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.timeline-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  cursor: pointer;
  left: 0%;
  transition: left 0.1s linear;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Chapters nodes on Timeline */
.timeline-chapter-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
  border: 1px solid #1e293b;
  z-index: 2;
  cursor: pointer;
}

.timeline-chapter-marker.passed {
  background: var(--accent);
}

/* Button & Config dashboard */
.controls-dashboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.2s;
  background: #1e293b;
}

.ctrl-btn:hover {
  color: #fff;
  background: #334155;
}

.ctrl-btn.play-btn {
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
}

.ctrl-btn.play-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.settings-group {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 13px;
}

.settings-select {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  cursor: pointer;
}

/* ── RIGHT COLUMN: CODE WORKSTATION ── */
.tour-code-panel {
  display: flex;
  flex-direction: column;
  height: 566px; /* Matches player screen + control panel height */
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.code-shell-header {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  flex-shrink: 0;
}

.code-file-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 8px 16px;
  color: #f8fafc;
  font-size: 13px;
  height: 38px;
  margin-top: 10px;
}

.code-file-tab span.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #800080; /* PHP Purple */
}

.code-tabs-menu {
  display: flex;
  background: #1e293b;
  border-bottom: 1px solid var(--border-color);
  padding: 0 12px;
  height: 40px;
  align-items: flex-end;
  flex-shrink: 0;
}

.code-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.code-tab-btn:hover {
  color: var(--text-primary);
}

.code-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

/* Viewport for file content */
.code-shell-body {
  flex: 1;
  background: #1e293b; /* VS Code slate editor backdrop */
  overflow: auto;
  position: relative;
}

.code-content-pane {
  display: none;
  padding: 20px;
  height: 100%;
}

.code-content-pane.active {
  display: block;
}

/* Explanation Tab Styling */
.explanation-layout {
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.7;
}

.explanation-layout h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 12px;
  font-family: var(--font-display);
}

.explanation-layout p {
  margin-bottom: 14px;
}

.explanation-layout ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.explanation-layout li {
  margin-bottom: 8px;
}

.explanation-layout strong {
  color: #fff;
}

.badge-seo {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}

.badge-design {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}

/* Code Snippet Styles */
pre.code-editor-pre {
  margin: 0;
  font-family: 'Consolas', 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #d4d4d4; /* Default editor light gray */
  background: #1e293b;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Custom Regex Highlighting Color Tokens */
.hl-comment  { color: #6a9955; font-style: italic; }
.hl-tag      { color: #569cd6; font-weight: 600; }
.hl-attr     { color: #9cdcfe; }
.hl-str      { color: #ce9178; }
.hl-php      { color: #e06c75; font-weight: 600; }
.hl-selector { color: #dcdcaa; font-weight: 600; }
.hl-property { color: #9cdcfe; }
.hl-val      { color: #b5cea8; }

/* ── SIDEBAR PLAYLIST ── */
.tour-playlist-panel {
  grid-column: span 2;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}

.tour-playlist-panel h3 {
  font-size: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.playlist-tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.playlist-track {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  text-align: left;
}

.playlist-track:hover {
  background: var(--primary-pale);
  border-color: var(--primary-mid);
  transform: translateY(-2px);
}

.playlist-track.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.track-number {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.track-title {
  font-weight: 600;
  font-size: 15px;
}

.track-duration {
  font-size: 12px;
  opacity: 0.6;
  font-family: monospace;
}

.playlist-track.active .track-duration {
  opacity: 0.9;
}

/* Floating helper link */
.btn-jump-live {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-jump-live:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

/* ── RESPONSIVE RESPONSIVENESS ── */
@media (max-width: 1024px) {
  .tour-dashboard {
    grid-template-columns: 1fr;
  }
  .tour-playlist-panel {
    grid-column: span 1;
  }
  .tour-code-panel {
    height: 480px;
  }
}

@media (max-width: 600px) {
  .player-subtitles-area {
    padding: 12px;
    gap: 8px;
  }
  .presenter-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .player-subtitles-text {
    font-size: 12px;
    min-height: 32px;
  }
  .voice-waves {
    display: none;
  }
  .controls-dashboard {
    flex-direction: column;
    align-items: flex-start;
  }
  .controls-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ── VISITOR TOUR PANEL SPECIFICS ── */
.visitor-transcript-text {
  font-size: 16px;
  line-height: 1.8;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 16px;
  border-left: 4px solid var(--accent);
  margin-bottom: 20px;
}

.spec-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.visitor-highlight-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visitor-highlight-card h4 {
  color: #fff;
  font-size: 15px;
  font-family: var(--font-display);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 4px;
}

.visitor-spec-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #cbd5e1;
}

.visitor-spec-line strong {
  color: #fff;
}

.btn-tour-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 8px;
  margin-top: 10px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-tour-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-tour-cta.btn-amber {
  background: #d97706;
}

.btn-tour-cta.btn-amber:hover {
  background: #b45309;
}

#code-file-name:hover {
  color: var(--accent) !important;
  text-decoration: underline !important;
}

