/* ###### 6.4 Header  ###### */

.az-header {
  height: $az-height-header-mobile;
  position: relative;
  z-index: 100;

  @include media-breakpoint-up(lg) {
    height: $az-height-header;
    border-bottom: 1px solid transparent;
  }

  .container,
  .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 20px;
    padding-right: 20px;
  }

  .container {
    @include media-breakpoint-up(lg) { padding: 0; }
    @include media-breakpoint-down(md) { max-width: none; }
  }

  .az-logo {
    display: none;
    @include media-breakpoint-up(lg) { display: block; }
  }
}

.az-header-app {
  background-color: #fff;
}

.az-header-left {
  display: flex;
  align-items: center;

  .az-header-arrow {
    display: none;
    position: relative;
    top: -2px;
  }
}

.az-logo {
  font-size: 28px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: $gray-900;
  letter-spacing: -1.8px;

  span { color: $az-color-primary; }

  @include hover-focus() {
    color: $gray-900;
  }
}

.az-header-menu-icon {
  margin-right: 10px;
  width: 20px;
  height: 30px;
  display: flex;
  align-items: center;

  @include media-breakpoint-up(lg) { margin-right: 25px; }

  span {
    display: block;
    position: relative;
    width: 15px;
    height: 2px;
    background-color: $gray-900;
    @include border-radius();
    @include transition($transition-base);

    &::before,
    &::after {
      content: '';
      position: absolute;
      left: 0;
      width: 20px;
      height: 2px;
      background-color: $gray-900;
      @include border-radius();
      @include transition($transition-base);
    }

    &::before { top: -6px; }
    &::after { bottom: -6px; }
  }
}

.az-header-center {
  flex: 1;
  margin: 0 50px;
  position: relative;
  display: none;

  @include media-breakpoint-up(lg) { display: block; }

  .form-control {
    border-color: $gray-200;
    border-width: 2px;
    background-color: #fcfcfc;
    transition: none;
    height: $az-height-base + 2px;

    &:focus {
      background-color: #fff;
      border-color: $gray-400;
      box-shadow: none !important;

      + .btn { color: $gray-600; }
    }
  }

  .btn {
    position: absolute;
    top: 0;
    right: 0;
    background-color: transparent;
    height: $az-height-base + 2px;
    color: $gray-400;
    transition: none;
    font-size: 16px;
    padding-right: 13px;

    @include hover-focus() { color: $gray-900; }
  }
}

.az-header-right {
  display: flex;
  align-items: center;
}

.az-header-search-link {
  font-size: 18px;
  color: $gray-700;
  line-height: 1;
  margin-right: 15px;
}

.az-header-arrow {
  font-size: 27px;
  color: $gray-900;
  display: inline-block;
  line-height: 0;

  i { line-height: 0; }

  @include hover-focus() { color: $gray-700; }
}

.az-header-message,
.az-header-notification {
  position: relative;

  > a {
    display: block;
    font-size: 24px;
    color: $gray-900;
    position: relative;
    line-height: .9;
    outline: none;

    &.new {
      &::before {
        content: '';
        position: absolute;
        top: -2px;
        right: 2px;
        width: 7px;
        height: 7px;
        background-color: $red;
        @include border-radius(100%);
      }
    }
  }
}

.az-header-notification {
  margin-left: 15px;

  > a {
    &::after {
      content: '';
      position: absolute;
      top: 47px;
      left: 50%;
      margin-left: -7px;
      width: 14px;
      height: 14px;
      border: 2px solid transparent;
      border-top-color: $gray-300; //$az-border-color;
      border-left-color: $gray-300; //$az-border-color;
      transform: rotate(45deg);
      background-color: #fff;
      z-index: 901;
      display: none;

      @include media-breakpoint-up(lg) { bottom: -36px; }
    }
  }

  .dropdown-menu {
    background-color: #fff;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 15px 20px;
    border-width: 0;
    margin-top: 0;
    z-index: 900;
    @include border-radius(0);

    @include media-breakpoint-up(sm) {
      width: 300px;
      position: absolute;
      top: 52px;
      left: auto;
      right: -10px;
      bottom: auto;
      padding: 20px 20px 15px;
      border-color: $gray-300;
      border-width: 2px;
    }
  }

  .dropdown-footer {
    text-align: center;
    padding-top: 10px;
    font-size: $font-size-sm;
    border-top: 1px dotted $gray-400;
  }

  &.show {
    > a::after {
      @include media-breakpoint-up(sm) { display: block; }
    }
    .dropdown-menu { display: block; }
  }
}

.az-notification-title {
  font-size: 18px;
  font-weight: 700;
  color: $gray-900;
  margin-bottom: 5px;
  line-height: 1;
}

.az-notification-text {
  font-size: $font-size-sm;
  margin-bottom: 15px;
}

.az-notification-list {
  .media {
    padding: 10px 0;
    position: relative;

    + .media { border-top: 1px dotted $gray-400; }

    &.new { color: $gray-900; }

    @include hover-focus() {
      cursor: pointer;
      z-index: 1;

      &::before {
        content: '';
        position: absolute;
        top: -1px;
        left: -20px;
        bottom: -1px;
        right: -20px;
        background-color: $gray-100;
        border-top: 1px solid $gray-300;
        border-bottom: 1px solid $gray-300;
        z-index: -1;
      }
    }
  }

  .media-body {
    margin-left: 15px;
    font-size: $font-size-sm;

    p {
      margin-bottom: 5px;
      line-height: 1.3;
    }

    strong { font-weight: $font-weight; }
    span {
      display: block;
      font-size: 11px;
      color: $gray-500;
    }
  }
}

.az-profile-menu {
  position: relative;
  margin-left: 15px;

  > .az-img-user {
    outline: none;
    width: 32px;
    height: 32px;

    &::before {
      content: '';
      position: absolute;
      bottom: -33px;
      left: 50%;
      margin-left: -7px;
      width: 14px;
      height: 14px;
      border: 2px solid transparent;
      border-top-color: $gray-300; //$az-border-color;
      border-left-color: $gray-300; //$az-border-color;
      transform: rotate(45deg);
      background-color: #fff;
      z-index: 901;
      display: none;
    }

    &::after { display: none; }
  }

  .dropdown-menu {
    background-color: #fff;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 15px 20px 5px;
    border-width: 0;
    margin-top: 0;
    z-index: 900;
    @include border-radius(0);

    @include media-breakpoint-up(sm) {
      padding-top: 20px;
      position: absolute;
      top: 56px;
      left: auto;
      right: -10px;
      bottom: auto;
      width: 230px;
      border-color: $gray-300;
      border-width: 2px;
    }
  }

  .dropdown-item {
    position: relative;
    padding: 0;
    height: $az-height-base;
    display: flex;
    align-items: center;
    font-size: $font-size-sm;
    color: $gray-700;

    i {
      font-size: 24px;
      margin-right: 10px;
      width: 24px;
      text-align: center;

      &.typcn { line-height: .9; }
    }

    @include hover-focus() {
      background-color: transparent;
      color: $az-color-primary;
    }

    + .dropdown-item { border-top: 1px dotted $gray-400; }

    &:last-child { margin-bottom: 10px; }
  }

  &.show {
    .az-img-user::before {
      @include media-breakpoint-up(sm) { display: block; }
    }
    .dropdown-menu { display: block; }
  }
}

.az-header-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;

  .az-img-user {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;

    @include media-breakpoint-up(sm) {
      width: 80px;
      height: 80px;
    }

    &::after { display: none; }
  }

  h6 {
    font-size: 24px;
    font-weight: 700;
    color: $gray-900;
    margin-bottom: 0;

    @include media-breakpoint-up(sm) { font-size: 18px; }
  }

  span {
    display: block;
    font-size: $font-size-sm;
  }
}
