.navbar-container {
  position: relative;
}

.navbar-shadow {
  position: fixed;
  right: 0;
  top: 0;
  height: var(--header-height-collapsed);
  width: 20px;
  z-index: 50;
  background-image: linear-gradient(to left, rgba(0, 0, 0, 0.4), transparent);
}

@media (min-width: 768px) {

  .navbar-shadow {
    height: var(--header-height);
  }
}

@media (min-width: 1025px) {

  .navbar-shadow {
    display: none;
  }
}

.navbar {
  position: fixed;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  right: 0;
  top: 0;
  left: var(--asidenav-width-xl);
  height: var(--header-height);
  background: var(--color-darker); /* Old browsers */
  background: -moz-linear-gradient(bottom, var(--color-primary) 0%, var(--color-primary) 80%, var(--color-dark) 100%); /* FF3.6-15 */
  background: -webkit-linear-gradient(bottom, var(--color-primary) 0%, var(--color-primary) 80%, var(--color-dark) 100%); /* Chrome10-25,Safari5.1-6 */
  background: linear-gradient(to top, var(--color-primary) 0%, var(--color-primary) 80%, var(--color-dark) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  color: white;
  z-index: 20;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  overflow: auto;
  transition: all .2s cubic-bezier(0.03, 0.43, 0.58, 1);
}

@media (max-width: 1199px) {
  .navbar {
    left: var(--asidenav-width-lg);
  }
}

@media (max-width: 768px) {
  .navbar {
    left: 0;
  }
}

/* links */
.navbar__link-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  height: 80px;
  min-width: 90px;
  color: var(--color-lightwhite);
  transition: height .2s cubic-bezier(0.03, 0.43, 0.58, 1);

  &:hover {
    color: var(--color-lightwhite);
  }
}

.navbar__link-label {
  transition: opacity .2s ease;
  padding: 4px 6px;
  text-transform: uppercase;
}

@media (min-width: 769px) {

  .navbar__link-wrapper {
    border: 1px solid var(--color-lmu-box-border);
  }
}

@media (max-width: 768px) {

  .navbar__link-wrapper {
    box-shadow: none;
    min-width: 0;
    align-items: center;
    justify-content: center;
  }

  .navbar__link-label {
    padding: 0 7px;
  }
}

/* navbar list */
.navbar__list {
  white-space: nowrap;

  + .navbar__list {
    margin-left: 12px;
  }
}

@media (min-width: 769px) {

  .navbar__list:last-of-type {
    padding-right: 40px;
  }
}

@media (max-width: 768px) {

  .navbar__list {
    + .navbar__list {
      margin-left: 0;
      padding-right: 80px;
    }
  }
}

/* list item */
.navbar__list-item {
  position: relative;
  transition: background-color .1s ease;

  &:not(.navbar__list-item--favorite) + .navbar__list-item {
    margin-left: 12px;
  }

  .fas {
    height: 20px;
    margin-left: 8px;
  }
}

@media (max-width: 768px) {

  .navbar__list-item {

    .fas {
      margin-left: 0;
    }
  }
}

@media (max-width: 500px) {

  .navbar__list-item {
    min-width: 60px;

    &:not(.navbar__list-item--favorite) + .navbar__list-item {
      margin-left: 0;
    }
  }
}

.navbar__list-left {
  flex: 5;
  padding-left: 40px;
}

@media (max-width: 768px) {

  .navbar__list-left {
    padding-left: 0;
  }
}

/* "Favorites" list item, only visible on small screens and logged in */
.navbar__list-item {
  &.navbar__list-item--favorite {
    display: none;
  }
}
.navbar__list-item--favorite {
  display: none;
  background-color: var(--color-primary);
}

.logged-in {
  .navbar__list {
    li.navbar__list-item--favorite,
    .navbar__list-item--favorite {
      display: inline-block;
    }
  }
}

@media (min-width: 426px) {

  .logged-in {
    .navbar__list {
      .navbar__list-item--favorite {
        display: none !important;
      }
    }
  }
}

.navbar__list-item--active {
  background-color: var(--color-lightwhite);
  color: var(--color-dark);

  .navbar__link-wrapper {
    color: var(--color-dark);
  }
}

.navbar__list-item--active .navbar__link-wrapper {
  color: var(--color-dark);
}

.navbar .navbar__list-item:not(.navbar__list-item--active):not(.navbar__list-item--favorite):hover .navbar__link-wrapper {
  background-color: var(--color-darker);
  color: var(--color-lightwhite);
}

/* sticky state */
.navbar--sticky {
  height: var(--header-height-collapsed);
  z-index: 100;

  .navbar__link-wrapper {
    height: var(--header-height-collapsed);
  }
}

.navbar__pushdown {
  height: var(--header-height);
  transition: height .2s cubic-bezier(0.03, 0.43, 0.58, 1);
}

.navbar--sticky + .navbar__pushdown {
  display: block;
  height: var(--header-height-collapsed);
}

@media (max-width: 768px) {

  .navbar,
  .navbar__pushdown {
    height: var(--header-height-collapsed);
  }

  .navbar__link-wrapper {
    height: var(--header-height-collapsed);
  }
}

@media (max-height: 500px) {

  .navbar,
  .navbar__pushdown {
    height: var(--header-height-collapsed);
  }

  .navbar__link-wrapper {
    height: var(--header-height-collapsed);
  }
}
