.pc-header {
  background: var(--pc-header-background);
  color: var(--pc-header-color);
  min-height: $header-height;
  border-bottom: 1px solid rgb(240, 240, 240);
  position: fixed;
  left: $sidebar-width;
  right: 0;
  z-index: 1025;
  display: flex;

  ul {
    margin-bottom: 0;
    display: inline-flex;
  }

  .m-header {
    height: $header-height;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: $sidebar-width;
    padding: 16px 10px 16px 24px;
  }

  .header-wrapper {
    display: flex;
    padding: 0 25px 0px 12px;
    flex-grow: 1;
    justify-content: space-between;

    @include media-breakpoint-down(sm) {
      padding: 0 15px;
    }
  }

  .header-search {
    position: relative;

    .form-control {
      border-radius: $border-radius;
      padding: 0.344rem 1.8rem;
      width: 200px;
      max-width: 100%;
      font-size: 0.75rem;

      @media (max-width: 1024px) {
        width: 100%;
      }
    }

    .search {
      position: absolute;
      top: 5px;
      left: 11px;
      width: 12px;
      height: 12px;
    }

    .btn-search {
      position: absolute;
      top: 7px;
      right: 9px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;
      border-radius: $border-radius;
    }
  }

  .pc-h-item {
    min-height: $header-height;
    display: flex;
    align-items: center;
    position: relative;
  }

  .pc-head-link {
    margin: 0 8px;
    position: relative;
    font-weight: 500;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: $border-radius;
    color: var(--pc-header-color);
    overflow: hidden;
    background: $white;

    &.user-login-info {
      height: 44px;
    }

    &.dropdown-toggle::after {
      display: none;
    }

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 1;
      background: var(--pc-active-background);
      border-radius: 50%;
      transform: scale(0);
      transition: all 0.08s cubic-bezier(0.37, 0.24, 0.53, 0.99);
    }

    > img,
    > span,
    > svg,
    > i {
      position: relative;
      z-index: 5;
      transition: all 0.08s cubic-bezier(0.37, 0.24, 0.53, 0.99);
    }

    > i {
      color: var(--pc-header-color);
      font-size: 16px;
    }

    > svg {
      width: 20px;
      height: 20px;
    }

    &.active,
    &:active,
    &:focus,
    &:hover {
      text-decoration: none;
      color: var(--pc-header-color);

      > svg,
      > i {
        color: var(--pc-header-color);
      }

      &::before {
        border-radius: 0;
        transform: scale(1);
      }

      .hamburger {
        .hamburger-inner {
          background-color: $secondary;

          &::after,
          &::before {
            background-color: $secondary;
          }
        }
      }

      i.material-icons-two-tone {
        background-color: $secondary;
      }
    }

    .pc-h-badge {
      display: flex;
      flex-flow: wrap;
      place-content: center;
      font-weight: 500;
      font-size: 0.75rem;
      line-height: 1;
      transition: transform 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
      transform-origin: 100% 0%;
      min-width: 16px;
      height: 16px;
      padding: 4px;
      position: absolute;
      top: 2px;
      right: 2px;
      border-radius: 50%;
      z-index: 9;

      &.dots {
        width: 9px;
        height: 9px;
        top: 7px;
        right: 16px;
        padding: 0;
      }
    }

    .user-desc,
    .user-name {
      display: block;
      line-height: 1;
    }

    .user-name {
      margin-bottom: 5px;

      font: {
        size: 15px;
        weight: 600;
      }
    }

    .user-desc {
      font: {
        size: 12px;
        weight: 400;
      }

      color: var(--pc-header-color);
    }

    .settings {
      animation: anim-rotate 2s infinite linear;
    }
  }

  .pc-h-dropdown {
    transform: none !important;
    top: 100% !important;

    &.dropdown-menu-end {
      right: 0 !important;
      left: auto !important;
    }
  }

  .pc-level-menu {
    position: relative;

    &:hover {
      > .dropdown-menu {
        display: block;
        left: 100%;
        top: -18px !important;
      }
    }
  }

  .pc-mega-menu {
    position: static;

    .pc-mega-dropdown {
      transform: none !important;
      left: auto !important;
      right: 20px !important;
      top: 100% !important;
      padding: 0;

      .image-block {
        padding: 36px 36px 24px;
        .img-charts {
          margin-bottom: -20px;
          margin-right: -30px;
        }
      }
      .row.g-0 {
        > .col:not(.image-block) {
          padding: 15px 0;
          border-right: 1px dashed $border-color;
        }
      }

      .mega-title {
        margin: 10px 25px;
        position: relative;
      }

      .pc-mega-list {
        display: block;
        list-style: none;
        padding-left: 0;

        .dot-badge {
          width: 7px;
          height: 7px;
          border-radius: 50%;
          border: 1px solid rgb(140, 140, 140);
          margin-right: 8px;
        }
      }
    }
  }

  .drp-search {
    min-width: 20rem;
  }
  .pc-cart-menu .drp-cart {
    min-width: 20rem;
    padding: 0;

    .cart-head {
      border-radius: 2px 2px 0 0;
      padding: 20px;
      background: transparentize(shift-color($primary, $soft-bg-level), 0.8);
      border-bottom: 1px solid $border-color;
    }

    .cart-item {
      display: flex;
      padding: 10px 20px;

      + .cart-item {
        border-top: 1px dashed $border-color;
      }

      img {
        width: 60px;
      }

      .cart-desc {
        flex: 1;
      }

      .p-star {
        fill: currentColor;
      }

      &.table-responsive {
        border-top: 1px solid $border-color;
        background: transparentize(shift-color($primary, $soft-bg-level), 0.8);
      }

      svg {
        width: 14px;
        height: 14px;
      }
    }
  }
  .user-avatar {
    width: 40px;
    border-radius: 50%;
  }
  .header-user-profile {
    .pc-head-link {
      width: auto;
      padding: 7px;

      > span > i {
        font-size: 22px;
        margin-right: 8px;
      }

      .user-avatar {
        width: 34px;
      }

      @include media-breakpoint-down(sm) {
        width: 40px;

        .user-avatar {
          margin-right: 0;
        }

        > span,
        > span > i {
          display: none;
        }
      }
    }
  }

  .dropdown-user-profile {
    min-width: 290px;
    max-width: 100%;
    .drp-tabs {
      border-bottom: 0;
      display: flex;
      margin-bottom: 10px;
      .nav-item {
        margin-bottom: -0px;
        .nav-link {
          position: relative;
          padding: 0.7rem;
          font-weight: 500;
          color: $body-color;
          display: flex;
          align-items: center;
          justify-content: center;
          i {
            font-size: 18px;
            margin: 0 4px;
          }
          .material-icons-two-tone {
            font-size: 20px;
          }
          &:after {
            content: '';
            background: $primary;
            position: absolute;
            transition: all 0.3s ease-in-out;
            left: 50%;
            right: 50%;
            bottom: -1px;
            height: 2px;
            border-radius: 2px 2px 0 0;
          }
        }
      }

      .nav-link:hover {
        border-color: transparent;
        color: $primary;
        .material-icons-two-tone {
          background-color: $primary;
        }
      }

      .nav-item.show .nav-link,
      .nav-link.active {
        border-color: transparent;
        color: $primary;
        .material-icons-two-tone {
          background-color: $primary;
        }
        &:after {
          left: 0;
          right: 0;
        }
      }
    }
    .tab-content {
      .dropdown-item {
        i {
          font-size: 14px;
        }
        svg {
          margin-right: 0px;
          width: 14px;
          height: 14px;
        }
      }
    }
  }

  .dropdown-notification {
    min-width: 420px;
    max-width: 100%;

    .list-group-item-action {
      &:active,
      &:hover,
      &:focus {
        background: shift-color($primary, $soft-bg-level);
      }

      .user-avatar,
      h5 {
        cursor: pointer;
      }
    }

    .badge {
      font-size: 0.8125rem;
      padding: 0.43em 1em;
    }

    .user-avatar {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      font-size: 20px;
    }

    .notification-file {
      display: flex;
      align-items: center;

      i {
        font-size: 20px;
        margin-right: 16px;
      }
    }
    @media (max-width: 575.98px) {
      min-width: 100%;
    }
  }
}

@keyframes anim-rotate {
  0% {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

.notification-modal.modal.fade .modal-dialog {
  transform: translate(100%, 0);
}

.notification-modal.modal.show .modal-dialog {
  transform: none;
}

.notification-modal {
  padding-right: 0 !important;

  .modal-dialog {
    margin: 0 0 0 auto;
  }

  .modal-content {
    min-height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: -1px 0 9px -3px rgba(0, 0, 0, 0.6);
  }
}

@media (min-width: 1025px) {
  .pc-header .pc-h-item.pc-sidebar-popup {
    display: none;
  }
}

@media (max-width: 1024px) {
  .pc-header {
    top: 0;
    left: 0;
    transition: all 0.15s ease-in-out;

    .m-header {
      display: none;
    }

    .pc-head-link {
      .user-desc,
      .user-name {
        display: none;
      }
    }

    .pcm-logo {
      margin-left: 30px;

      img {
        max-width: 160px;
      }
    }

    &.mob-header-active {
      top: $header-height;

      .header-wrapper {
        background: var(--pc-header-background);
        position: relative;
        z-index: 5;
      }
    }

    .pc-md-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      z-index: 1;
      background: rgba(0, 0, 0, 0.2);
    }

    .pc-level-menu .dropdown-menu {
      left: 0;
      display: block;
      padding-left: 30px;
    }

    .pc-mega-menu .pc-mega-dropdown .row.g-0 > .col.image-block {
      display: none;
    }

    .pc-mob-drp {
      &.mob-drp-active {
        .pc-h-item {
          display: block;
          min-height: auto;
          position: relative;

          .pc-head-link {
            display: block;
            margin: 5px 10px !important;
          }

          .dropdown-menu {
            position: relative !important;
            width: 100%;
            float: none;
            box-shadow: none;
          }
        }

        ul {
          display: block;
        }
      }
    }
  }
}

@include media-breakpoint-down(md) {
  .pc-mega-menu .pc-mega-dropdown {
    max-height: calc(100vh - #{$header-height});
    overflow-x: auto;

    .row.g-0 > .col {
      flex: 100%;
    }
  }
}

@include media-breakpoint-down(sm) {
  .pc-header {
    .pc-head-link {
      padding: 0.65rem;
      margin: 0 5px;
    }

    .pc-h-item {
      position: static;

      .pc-h-dropdown {
        left: 0 !important;
        right: 0 !important;
      }
    }
  }
}
