#header.header {
  align-items: center;
  background-color: rgba($primary-color, 0.95);
  backdrop-filter: blur(3px);
  display: flex;
  color: $white;
  height: 50px;
  position: fixed;
  text-shadow: $black 0 1px 0;
  top: 0;
  white-space: nowrap;
  width: 100%;
  z-index: 10;

  .site_title {
    font-weight: bold;
    margin: 0 20px 0 0;
    padding: 0 30px;
  }

  #site_title_image {
    display: block;
    height: 30px;
  }

  .header-item {
    &,
    ul {
      margin: 0;
      padding: 0;
    }

    a {
      color: rgba($white, 0.9);
      text-decoration: none;
      transition: background 250ms, color 250ms;
    }

    li {
      font-size: 14px;
      list-style: none;
      position: relative;
    }

    > li {
      display: inline-block;
      margin: 10px 5px 10px 0;

      &.current > a,
      &:hover > a {
        background: tint($primary-color, 25%);
        color: $white;
      }

      > a {
        border-radius: $radius;
        padding: 5px 10px;
      }

      &.has_nested {
        > a:before {
          border: 3px solid transparent;
          border-bottom: 0;
          border-top-color: rgba($white, 0.5);
        }

        &:hover > a:before,
        &.current > a:before {
          border-left-color: transparent;
          border-top-color: $primary-color;
        }
      }

      .has_nested > ul {
        right: -100%;
        top: 0;
      }
    }

    ul {
      background: tint($primary-color, 25%);
      border-radius: 0 $radius $radius $radius;
      height: 0;
      min-width: 175px;
      opacity: 0;
      padding: 5px 0;
      position: absolute;
      transform: scale(0);
      transform-origin: left top;
      transition: opacity 250ms, transform 250ms;
      z-index: 11;

      a {
        display: block;
        padding: 5px 10px;
        transition: all 250ms;
      }

      li:hover > a,
      a:hover {
        background-color: rgba($primary-color, 0.5);
        color: $white;
      }
    }

    .has_nested {
      &:hover > ul {
        height: auto;
        opacity: 1;
        transform: scale(1);
      }

      > a {
        padding-right: 23px;
        position: relative;

        &:before {
          border: 3px solid transparent;
          border-right: 0;
          border-left-color: rgba($white, 0.5);
          content: '';
          position: absolute;
          top: 50%;
          transition: border-color 250ms;
          right: 10px;
        }
      }

      &:hover > a:before,
      &.current > a:before {
        border-left-color: $primary-color;
      }
    }
  }

  #tabs {
    width: 100%;
  }

  #utility_nav {
    color: $silver;
    margin: 0;
    padding: 0 20px 0 0;
    text-align: right;
    transition: color 250ms;
    white-space: nowrap;
    width: 100%;

    a {
      text-decoration: none;

      &:hover {
        color: $white;
      }
    }

    li {
      display: inline;

      &:not(#current_user) {
        opacity: 0.75;
        transition: opacity 250ms;

        &:hover {
          opacity: 1;
        }
      }
    }
  }

  .menu-button {
    display: none;
  }

  // Medias
  @media #{$largest-phone-screen} {
    #tabs,
    #utility_nav {
      left: 0;
      opacity: 0;
      position: fixed;
      right: 0;
      transform: translateY(calc(-100% - 90px));
      transition: transform 250ms;
    }

    #utility_nav {
      background-color: $primary-color;
      height: 40px;
      padding: 11px 0;
      text-align: center;
      top: 50px;
    }

    #tabs {
      background-color: rgba($primary-color, 0.95);
      max-height: calc(100vh - 85px);
      overflow: auto;
      top: 90px;

      li {
        display: block;
        float: none;
        margin: 0;
        padding: 5px 15px;
        width: 100%;

        + li {
          border-top: 1px solid rgba($white, 0.1);
        }
      }

      a {
        display: block;
      }
    }

    .site_title {
      padding: 0 15px;
    }

    .header-item ul {
      background: transparent;
      height: auto;
      max-width: 100%;
      opacity: 1;
      margin-left: 5px;
      position: static;
      transform: scale(1);
      width: 100%;

      li {
        border: 0 !important;
        padding: 0 !important;

        a:before {
          display: inline;
          content: '↳';
          margin-right: 5px;
        }
      }
    }

    .menu-button {
      display: block;
      margin-left: auto;
      margin-right: 15px;
      margin-top: -5px;
    }

    @at-root .opened-menu & {
      #tabs,
      #utility_nav {
        display: block;
        opacity: 1;
        transform: translateY(0);
      }
    }
  }
}
