/* vim: set tabstop=2 shiftwidth=2 expandtab smarttab: */

#main-nav ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

#main-nav li {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: "..";
}

#main-nav ul > li {
  padding-left: 24px;
  margin: 10px 0 10px 0;
}

#main-nav ul ul > li {
  padding-left: 0;
  margin: 0;
}

#main-nav h3 {
  margin: 0;
}

#main-nav h3.with-icon {
  margin-left: -24px;
}

#main-nav h3.with-icon i.fas::before {
  display: inline-block;
  width: 24px;
}

#main-nav .nav-user-name {
  padding-left: 24px;
  margin: 10px 0 0 0;
  font-size: 0.85em;
  opacity: 0.75;
  font-style: italic;
}

#main-nav-toggle {
  cursor: pointer;
}

#main-nav {
  overflow: auto;
  display: none;
  /* below styles are overridden for desktop screens below */
  position: fixed;
  top: 0;
  bottom: 0;
  left: -100vw;
  transition: left 150ms ease;
  z-index: 10;
}

#main-nav > nav {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

#main-nav.mobile-nav-open {
  left: 0;
  box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.6);
  width: 80%;
}

/* large screens (desktop) */
/* NOTE: 700px should match innerWidth check in nav.js and mobile threshold in group-finance-template.css */
@media print, screen and (min-width: 700px) {
  #main-nav {
    display: block;
    position: static !important;
    z-index: auto;
    overflow: visible;
  }

  #main-nav > nav {
    position: sticky;
    top: var(--header-height, 69px);
    min-height: calc(100vh - var(--header-height, 69px) - 24px);
    max-height: calc(100vh - var(--header-height, 69px));
    overflow-y: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

#main-nav > nav hr {
  flex-shrink: 0;
  margin: 4px 0;
}

#nav-theme-toggle {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding: 12px 0;
}

#nav-theme-toggle .theme-btn {
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 6px 12px;
  font-size: 14px;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

#nav-theme-toggle .theme-btn-light {
  border-radius: 20px 0 0 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
}

#nav-theme-toggle .theme-btn-dark {
  border-radius: 0 20px 20px 0;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}

#nav-theme-toggle .theme-btn.active {
  background-color: rgba(255, 255, 255, 0.25);
  color: white;
  border-color: rgba(255, 255, 255, 0.6);
}

#nav-theme-toggle .theme-btn:not(.active):hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}
