/* Design tokens moved to tokens.css; this file uses CSS variables only */

/* ====== NAV container + logo ====== */
.navigation-container {
  width: 260px;
  min-width: 180px;
  height: 100vh;
  background: #fff;
  border-right: 2px solid #f3f3f3;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  margin: 0;
}
.nav-logo-container { text-align: center; margin-bottom: 18px; }
.nav-logo-link { display: block; text-align: left; }
.nav-logo {
  height: 36px;
  max-width: 90%;
  object-fit: contain;
  margin-bottom: 12px;
  padding-left: 8px;
}

/* ====== NAV lists/buttons ====== */
.nav-buttons-container { flex: 1 1 auto; display: flex; flex-direction: column; margin-bottom: 18px; }
.nav-buttons-list { list-style: none; padding: 0; margin: 0; font-size: 0.95rem; }

/* ====== Nav items (mobile-first basis) ====== */
.chapter-nav-item {
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 8px 18px;
  margin-bottom: 10px;
  background-color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.89rem;
  font-weight: 700;
  box-shadow: none;
  text-align: left;
  transition: all 0.3s ease;
}
.chapter-nav-item img { width: 30px; height: 30px; margin-bottom: 4px; vertical-align: middle; object-fit: contain; }
.chapter-nav-item:hover { background: #e9ecef; transform: translateX(5px); box-shadow: none; }
.chapter-nav-item.active { background: var(--color-primary); color: #fff; }

/* Profiel knop in nav */
.chapter-nav-item.menu-profile { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.chapter-nav-item.menu-profile img {
  width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: transparent;
  box-shadow: 0 2px 8px rgba(75,189,255,0.10);
}
.chapter-nav-item.menu-profile #menuProfileName { font-weight: 700; color: var(--color-text); font-size: 1rem; line-height: 1.1; }
.chapter-nav-item.menu-profile .menu-profile-label {
  display:none; font-size:0.6rem; font-weight:600; letter-spacing:.04em; margin-top:4px; color: var(--color-text);
}
#menuProfileBtnMobile { display: none; }

/* ===== KD NAV namespace (scoped) ===== */
nav.navigation-container.kd-nav .chapter-nav-item {
  display:flex;
  background: var(--nav-btn-bg);
  color: var(--nav-btn-text);
  border-radius: var(--nav-btn-radius);
}
nav.navigation-container.kd-nav .chapter-nav-item:not(.active):hover { background: var(--nav-btn-bg-hover); }
nav.navigation-container.kd-nav .chapter-nav-item.active {
  background: var(--nav-btn-bg-active);
  color: var(--nav-btn-text-active);
}
nav.navigation-container.kd-nav .chapter-nav-item:focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; }
nav.navigation-container.kd-nav .chapter-nav-item.active:focus-visible { outline:2px solid #fff; outline-offset:2px; }
@media (prefers-color-scheme: dark) {
  :root { --nav-btn-bg:#1f2731; --nav-btn-bg-hover:#26313e; --nav-btn-text:#e6f0f7; }
  nav.navigation-container.kd-nav .chapter-nav-item.active { background: var(--nav-btn-bg-active); color: var(--nav-btn-text-active); }
}

/* ====== <=900px tweaks (labels tonen, logo verbergen) ====== */
@media (max-width: 900px) {
  .navigation-container hr, .profile-divider, .nav-user-separator { display: none; }
  .nav-logo-container { display: none; }

  .chapter-nav-item span {
    display: block;
    margin-top: 8px;
    font-size: 0.65rem;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: .03em;
  }
  .chapter-nav-item.menu-profile {
    flex-direction: column; align-items: center; justify-content: center; gap: 0; margin-top: 0;
  }
  .chapter-nav-item.menu-profile img { width:24px; height:24px; margin:0 auto; display:block; }
  .chapter-nav-item.menu-profile #menuProfileName { display:none; }
  .chapter-nav-item.menu-profile .menu-profile-label {
    display:block; margin-top:6px; font-size:0.65rem; font-weight:600; letter-spacing:.03em; line-height:1.05;
  }
}

/* ====== <=700px: bottom nav bar ====== */
@media (max-width: 700px) {
  .navigation-container.side-nav {
    display: flex; flex-direction: row; align-items: stretch; justify-content: space-between;
    height: var(--mobile-nav-height);
    width: 100vw; position: fixed; bottom: 0; top: auto;
    background: #fff; box-shadow: 0 -2px 12px rgba(75,189,255,0.10);
    z-index: 1000; padding: 0; border-top: 2px solid #f3f3f3; border-right: none; border-radius: 0;
  }
  .nav-buttons-container { flex: 1 1 auto; display: flex; flex-direction: row; height: 100%; margin: 0; padding: 0; }
  .nav-buttons-list {
    display: flex; flex-direction: row; align-items: stretch; height: 100%; width: 100%;
    justify-content: space-evenly; align-items: center; margin: 0; padding: 0; list-style: none;
  }
  .nav-buttons-list > li { height: 100%; display: flex; align-items: stretch; flex: 1 1 0; }

  .navigation-container.side-nav .chapter-nav-item {
    display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
    width: 100%; border: none; cursor: pointer; text-align: center; padding: 0; white-space: nowrap;
    background-color: transparent; color: var(--color-text); font-size: 0.66rem; font-weight: 700;
    -webkit-tap-highlight-color: transparent; position: relative; border-radius: 0; margin-bottom: 0;
  }
  .navigation-container.side-nav .chapter-nav-item img.nav-btn-icon {
    width:24px; height:24px; z-index:1; position:relative; transition:none;
  }
  /* Maak alle afbeeldingen in de knop blok-level en zonder extra marge */
  .navigation-container.side-nav .chapter-nav-item img { display:block; margin-bottom:0; }
  /* Zorg dat ook profiel-afbeelding (zonder .nav-btn-icon) blok-level is en exact 22x22 */
  .navigation-container.side-nav .chapter-nav-item > img { display:block; width:24px; height:24px; }
  .navigation-container.side-nav .chapter-nav-item span {
    display:flex; align-items:center; justify-content:center;
    margin-top:0; font-size:0.6rem; font-weight:600; letter-spacing:.02em;
    height:14px; line-height:14px; /* vaste labelhoogte voor identieke uitlijning */
  }
  .navigation-container.side-nav .chapter-nav-item::after {
    content: ''; position: absolute; top: 7px; left:50%; width:70%; max-width:64px; height:30px;
    transform:translateX(-50%); background: transparent; border-radius: 12px;
    transition: background .25s ease, box-shadow .25s ease; z-index: 0; border:1px solid transparent;
  }
  .navigation-container.side-nav .chapter-nav-item.active::after,
  .navigation-container.side-nav .chapter-nav-item:focus-visible::after {
    background:var(--nav-mobile-active-bg); border-color: var(--nav-mobile-active-border);
  }
  .navigation-container.side-nav .chapter-nav-item:hover,
  .navigation-container.side-nav .chapter-nav-item:focus,
  .navigation-container.side-nav .chapter-nav-item:active {
    color: var(--color-text); background: transparent; transform: none; box-shadow: none;
  }
  .navigation-container.side-nav .chapter-nav-item svg { width: 20px; height: 20px; fill: currentColor; }
  .navigation-container.side-nav .chapter-nav-item:focus-visible { outline: none; }
  .navigation-container.side-nav .chapter-nav-item.active span { color: var(--color-primary); }

  /* Profiel pictogram compacter */
  .chapter-nav-item.menu-profile img { width:24px; height:24px; border-radius:15%; box-shadow:none; }
  .chapter-nav-item.menu-profile .menu-profile-label {
    font-size:0.6rem;
    font-weight:600;
    letter-spacing:.02em;
    margin-top:0;
  }

  .navigation-container hr, .profile-divider, .nav-user-separator { display: none; }
  .navigation-container.side-nav hr, .navigation-container hr, nav.navigation-container hr { display: none; }

  /* Geef de pagina-inhoud ruimte boven het vaste bottom menu */
  body { padding-bottom: var(--mobile-nav-height); }

  /* Geen blauwe achtergrond/border voor actieve knop op mobiel (zonder !important) */
  nav.navigation-container.side-nav.kd-nav .chapter-nav-item.active::after,
  nav.navigation-container.side-nav.kd-nav .chapter-nav-item:focus-visible::after {
    background: transparent;
    border-color: transparent;
  }
  /* Ook de actieve knop zelf geen achtergrond op mobiel */
  nav.navigation-container.side-nav.kd-nav .chapter-nav-item.active { background: transparent; }
}

/* Touch devices: logo verbergen in nav */
@media (hover: none) and (pointer: coarse) { .nav-logo-container { display: none; } }

/* (optioneel) touch-only overrides verwijderd om zonder !important te blijven */

/* ====== >=901px desktop nav ====== */
@media (min-width: 901px) {
  /* Maak de side-nav vast links en schuif content op */
  .navigation-container.side-nav { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; }
  :root { --desktop-side-gap: clamp(100px, 10vw, 200px); }
  body {
      padding-left: calc(260px + var(--desktop-side-gap));
      /* Symmetrische buitenmarge zodat content echt gecentreerd is */
      padding-right: var(--desktop-side-gap);
    }
  nav.navigation-container .chapter-nav-item {
    display: flex; flex-direction: row; gap: 16px; align-items: center; justify-content: flex-start;
    padding: 10px 14px; margin-bottom: 10px; background: var(--nav-btn-bg); border: 1px solid transparent;
    border-radius: var(--nav-btn-radius); font-size: 0.9rem; font-weight: 600; line-height: 1.05;
    color: var(--nav-btn-text); box-shadow: none; transform: none !important;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
  }
  nav.navigation-container .chapter-nav-item img {
    width: 32px; height: 32px; margin: 0; object-fit: contain; display: block; flex-shrink: 0;
  }
  nav.navigation-container .chapter-nav-item span { white-space: nowrap; letter-spacing:.02em; }
  nav.navigation-container .chapter-nav-item:hover {
    background: var(--nav-btn-bg-hover); border-color: #e2e8ef; color: var(--nav-btn-text); transform: none !important;
  }
  nav.navigation-container .chapter-nav-item.active {
    background: var(--nav-btn-bg-active); color: var(--nav-btn-text-active); font-weight: 700; border-color: var(--nav-btn-bg-active);
  }
  nav.navigation-container .chapter-nav-item:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
  nav.navigation-container .chapter-nav-item.active:focus-visible { outline:2px solid #fff; }

  /* Profiel knop desktop variant */
  nav.navigation-container .chapter-nav-item.menu-profile img { width:32px; height:32px; border-radius:6px; box-shadow:0 2px 6px rgba(0,0,0,0.08); }
  nav.navigation-container .chapter-nav-item.menu-profile #menuProfileName { font-weight: 600; font-size: 0.9rem; line-height: 1.05; margin: 0; padding: 0; }
  nav.navigation-container .chapter-nav-item.menu-profile.active #menuProfileName { font-weight: 700; color: var(--nav-btn-text-active); }
  nav.navigation-container .chapter-nav-item.menu-profile:hover { transform: none !important; }
}
