/* =====================================================================
   ML_LAB — Archetype 3: Bootcamp & Course Reader Styles
   ---------------------------------------------------------------------
   Provides the unified sticky Architectural Course Sub-Bar (.course-subbar)
   across DataEngineering/module1..10.html and GaTech/CSE 8803/week1..15.html:
   - <- Course Hub + Course Tag
   - Module/Week jump selector (<select>) with live completion indicators
   - Mark Complete toggle button synced with localStorage
   - Prev / Next navigation + 3px bottom reading progress bar
   ===================================================================== */

.course-subbar {
  position: sticky;
  top: 0;
  z-index: 980;
  background: #ffffff;
  border-bottom: 1px solid #d2d0ce;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.course-subbar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.course-subbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.course-subbar__hub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #1e3a8a;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #d2d0ce;
  background: #f8fafc;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.course-subbar__hub:hover {
  border-color: #0066cc;
  background: #eff6ff;
  text-decoration: none;
}

.course-subbar__badge {
  font-family: "IBM Plex Mono", "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
}

.course-subbar__center {
  flex: 1 1 220px;
  max-width: 380px;
  display: flex;
  align-items: center;
}

.course-subbar__select {
  width: 100%;
  padding: 6px 10px;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
}
.course-subbar__select:focus {
  outline: 2px solid #0066cc;
  outline-offset: 1px;
}

.course-subbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.course-subbar__complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f766e;
  background: #ffffff;
  border: 1px solid #0f766e;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.course-subbar__complete-btn:hover {
  background: #f0fdfa;
}
.course-subbar__complete-btn.is-complete {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

.course-subbar__nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.course-subbar__step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #d2d0ce;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.course-subbar__step:hover {
  border-color: #0066cc;
  color: #1e3a8a;
  background: #eff6ff;
  text-decoration: none;
}
.course-subbar__step--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.course-subbar__progress {
  width: 100%;
  height: 3px;
  background: #e2e8f0;
  overflow: hidden;
}

.course-subbar__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1e3a8a, #0066cc);
  transition: width 0.08s linear;
}

/* Bottom Mark Complete button for CSE 8803 .page-nav */
.cse-complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: 2px solid #0f766e;
  border-radius: 8px;
  background: #ffffff;
  color: #0f766e;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cse-complete-btn:hover {
  background: #f0fdfa;
}
.cse-complete-btn.is-complete {
  background: #0f766e;
  color: #ffffff;
}

/* Hide legacy page .topnav once .course-subbar replaces it */
nav.topnav.course-subbar-replaced {
  display: none !important;
}

@media (max-width: 760px) {
  .course-subbar__inner {
    padding: 8px 14px;
    gap: 8px;
  }
  .course-subbar__badge {
    display: none;
  }
  .course-subbar__center {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }
}
