/* =========================================================
   Phase 1.5 — Sticky Header & Navigation Alignment (v2)
   Fixes:
   - Day navigation still behaving like a sticky/fixed bar
   - Nav layout anchored left inside a huge strip
   ========================================================= */

/* ---------- Sticky top bar ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--emerald, #053827);
}

/* Hide header on home */
body.home-view .app-header {
  display: none !important;
}

/* Header bars */
.header-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}

body.previous-runs-view .header-bar--utility,
body.feedback-view .header-bar--utility {
  display: flex;
}

body.workbook-view .header-bar--workbook {
  display: flex;
}

.header-actions-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* =========================================================
   WORKBOOK NAV (secondary bar below header)
   ========================================================= */

/* Show nav only in workbook view */
body.workbook-view .day-list {
  display: flex;
}
body.home-view .day-list,
body.previous-runs-view .day-list,
body.feedback-view .day-list {
  display: none !important;
}

/* HARD OVERRIDE: neutralize any legacy sticky/fixed behavior */
.day-list {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 0 !important;

  /* Remove the “full-width bar” feeling */
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;

  /* Center the navigator */
  justify-content: center;
  padding: 10px 14px;
  margin: 0;

  /* Undo any legacy scrolling strip behavior */
  overflow: visible !important;
}

/* Center and constrain the nav component */
.day-nav {
  width: min(1100px, 100%);
  margin: 0 auto;
}

/* Ensure content anchors don't hide under sticky header */
body.workbook-view .day-content {
  scroll-margin-top: 90px;
}
