/*
 * ========================================================================
 * ANALYTIC ENDEAVORS - GUIDE NAVIGATION COMPONENTS
 * Shared styles for all guide/article pages
 * Copyright (c) 2024-2025 Havens Consulting Inc. All Rights Reserved.
 * ========================================================================
 */

/* ===== READING PROGRESS BAR ===== */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--card-bg);
  z-index: 1001;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  width: 0%;
  transition: width 0.1s ease;
}

/* Progress bar color variants via CSS custom property */
.progress-bar--purple {
  background: linear-gradient(90deg, var(--purple), var(--teal));
}

.progress-bar--orange {
  background: linear-gradient(90deg, var(--teal), var(--orange));
}

/* ===== STICKY NAVIGATION ===== */
.sticky-nav {
  position: fixed;
  top: -70px;
  left: 0;
  right: 0;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: top 0.3s ease;
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sticky-nav.visible {
  top: 4px;
}

.sticky-nav-brand {
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--teal-light), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Brand gradient variants */
.sticky-nav-brand--purple {
  background: linear-gradient(135deg, var(--purple-light), var(--teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sticky-nav-brand--orange {
  background: linear-gradient(135deg, var(--teal-light), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo {
  height: 28px;
  width: auto;
}

/* ===== BACK TO GUIDES LINK ===== */
.back-to-guides {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-surface);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  margin-right: 0.5rem;
}

.back-to-guides:hover {
  border-color: var(--teal);
  color: var(--teal-light);
  transform: translateX(-2px);
}

.back-to-guides svg {
  width: 18px;
  height: 18px;
}

[data-theme="light"] .back-to-guides {
  background: var(--card-bg);
}

.nav-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ===== SHARE BUTTONS ===== */
.share-buttons {
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.share-btn:hover {
  border-color: var(--teal);
  color: var(--teal-light);
  transform: scale(1.1);
}

.share-btn svg {
  width: 18px;
  height: 18px;
}

/* ===== THEME TOGGLE (Guide-specific override) ===== */
/* Overrides the fixed positioning from components.css for in-nav usage */
.nav-controls .theme-toggle,
.sticky-nav .theme-toggle {
  position: static;
  top: auto;
  right: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.nav-controls .theme-toggle:hover,
.sticky-nav .theme-toggle:hover {
  border-color: var(--teal);
  color: var(--teal-light);
  transform: scale(1.1);
}

.nav-controls .theme-toggle svg,
.sticky-nav .theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 153, 153, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

/* Back to top color variants */
.back-to-top--purple {
  background: linear-gradient(135deg, var(--purple), var(--teal));
  box-shadow: 0 4px 15px rgba(107, 91, 149, 0.4);
}

.back-to-top--orange {
  background: linear-gradient(135deg, var(--teal), var(--orange));
  box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
}

/* ===== SLIDE NAVIGATION (Side Dots) ===== */
.slide-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.slide-nav.visible {
  opacity: 1;
  visibility: visible;
}

.slide-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
}

.slide-dot:hover {
  background: var(--text-secondary);
  transform: scale(1.3);
}

.slide-dot.active {
  background: var(--teal);
  border-color: var(--teal-light);
  transform: scale(1.2);
}

/* Slide dot labels (appear on hover) */
.slide-dot::before {
  content: attr(data-label);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--card-surface);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid var(--border);
}

.slide-dot:hover::before {
  opacity: 1;
}

/* Active dot color variants */
.slide-dot.active--purple {
  background: var(--purple);
  border-color: var(--purple-light);
}

/* ===== SLIDE COUNTER ===== */
.slide-counter {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.slide-counter.visible {
  opacity: 1;
  visibility: visible;
}

.slide-counter .current {
  color: var(--teal-light);
  font-weight: 700;
}

.slide-counter .current--purple {
  color: var(--purple-light);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--teal-light);
  font-size: 0.85rem;
  font-weight: 500;
  animation: bounce 2s infinite ease-in-out;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
  opacity: 0.8;
}

.scroll-indicator svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px rgba(0, 153, 153, 0.5));
}

.scroll-indicator--purple {
  color: var(--purple-light);
}

.scroll-indicator--purple svg {
  filter: drop-shadow(0 0 8px rgba(107, 91, 149, 0.5));
}

/* ===== LIGHT MODE OVERRIDES ===== */
[data-theme="light"] .sticky-nav {
  background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .share-btn {
  background: var(--card-bg);
}

[data-theme="light"] .nav-controls .theme-toggle,
[data-theme="light"] .sticky-nav .theme-toggle {
  background: var(--card-bg);
}

[data-theme="light"] .slide-counter {
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .slide-nav {
  background: transparent;
}

[data-theme="light"] .slide-dot {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .slide-dot:hover {
  border-color: var(--teal);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .slide-nav {
    display: none;
  }

  .slide-dot {
    width: 10px;
    height: 10px;
  }

  .slide-dot::before {
    display: none;
  }

  .sticky-nav {
    padding: 0.5rem 1rem;
  }

  .back-to-top {
    width: 42px;
    height: 42px;
    bottom: 1rem;
    right: 1rem;
  }

  .slide-counter {
    bottom: 1rem;
    left: 1rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .sticky-nav,
  .back-to-top,
  .slide-nav,
  .slide-counter,
  .share-btn,
  .theme-toggle,
  .slide-dot {
    transition: none;
  }

  .scroll-indicator {
    animation: none;
  }
}
