// ============================
//   4. header css start
// ============================

.pc-header {
  background: var(--pc-header-background);
  color: var(--pc-header-color);
  min-height: $header-height;
  box-shadow: var(--pc-header-shadow);
  backdrop-filter: blur(7px);
  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;
    flex-grow: 1;

    @include media-breakpoint-down(sm) {
      padding: 0 15px;
    }

    .dropdown-btn {
      &:active {
        border-color:  transparent !important;
      }
    }
    .btn {
      &.show {
        border-color:  transparent !important;
      }
    }
  }

  .form-search {
    position: relative;

    .form-control {
      border-radius: var(--bs-border-radius);
      padding: 0.62rem 2.6rem;
      width: 100%;
      max-width: 300px;

      @media (max-width: 1024px) {
        width: 100%;
      }
    }

    .icon-search {
      position: absolute;
      top: 11px;
      left: 14px;
      font-size: 20px;
      opacity: 0.4;
    }

    .btn-search {
      position: absolute;
      top: 8px;
      right: 8px;
      padding: 2px 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--bs-border-radius-sm);
    }
  }

  .pc-h-item {
    min-height: $header-height;
    display: flex;
    align-items: center;
    position: relative;
  }

  .pc-head-link {
    margin: 0 4px;
    position: relative;
    font-weight: 500;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: $border-radius;
    color: var(--pc-header-color);
    overflow: hidden;

    &::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);
    }
    //custom add
    // @media (min-width: 576px)  {
    //   width: 30px;
    // }

    >svg,
    >i {
      position: relative;
      z-index: 5;
      color: var(--pc-header-color);
      transition: all 0.08s cubic-bezier(0.37, 0.24, 0.53, 0.99);
    }

    >i {
      font-size: 24px;
    }

    >svg {
      width: 24px;
      height: 24px;
    }

    &.active,
    &:active,
    &:focus,
    &:hover {
      text-decoration: none;
      color: var(--pc-header-color);

      >svg,
      >i {
        color: var(--pc-header-color);
        transform: scale(1.08);
      }

      &::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 {
      position: absolute;
      top: 2px;
      right: 2px;
      border-radius: 50%;
      font-size: 9px;
      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);
    }
  }

  .pc-h-dropdown {
    .ti-circle {
      font-size: 7px;
      vertical-align: middle;
    }

    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;
      }
    }
  }

  .drp-search {
    min-width: 20rem;
  }

  #vertical-nav-toggle {
    margin-left: -15px;
  }

  .user-avtar {
    width: 40px;
    border-radius: 50%;
  }

  .dropdown-qta {
    min-width: 400px;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - 90px);

    &::-webkit-scrollbar {
      width: 4px;
    }

    &::-webkit-scrollbar-track {
      background: transparent;
    }

    &::-webkit-scrollbar-thumb {
      background: darken($body-bg, 05%);
    }

    &::-webkit-scrollbar-thumb:hover {
      background: darken($body-bg, 25%);
    }

    .qta-links {
      display: flex;
      flex-wrap: wrap;
      overflow: hidden;

      a {
        width: calc(100% /3);
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 20px 10px;
        border-radius: 0px;
        background: var(--bs-dropdown-bg);
        border: 1px solid var(--bs-body-bg);
        margin: 0;
        position: relative;

        &::after {
          content: "";
          position: absolute;
          left: 5px;
          right: 5px;
          top: 5px;
          bottom: 5px;
          border-radius: var(--bs-border-radius);
          opacity: 0.1;
        }

        i {
          margin: 0;
          font-size: 26px;
        }
        &:hover{
          color: var(--bs-primary);
          &::after {
            background: var(--bs-primary);
          }
        }
      }
    }
  }

  .header-user-profile {
    .pc-head-link {
      width: auto;
      padding: 7px;
      background: transparent;

      &:focus,
      &:hover {
        .user-avtar {
          transform: scale(1.03);
        }

        &::before {
          display: none;
        }
      }

      >span>i {
        font-size: 22px;
        margin-right: 8px;
      }

      .user-avtar {
        width: 40px;
        transition: all 0.08s cubic-bezier(0.37, 0.24, 0.53, 0.99);
      }

      @include media-breakpoint-down(sm) {
        width: 40px;

        .user-avtar {
          margin-right: 0;
        }

        >span,
        >span>i {
          display: none;
        }
      }
    }
  }

  .dropdown-user-profile {
    min-width: 352px;
    max-width: 100%;
    padding: 0;
    overflow: hidden;

    .dropdown-header,
    .dropdown-footer {
      padding: 16px 20px;
    }

    .dropdown-header,
    .dropdown-body {
      border-bottom: 1px solid var(--bs-border-color);
    }

    .dropdown-item {
      font-weight: 500;
      padding: 10px 15px;
      display: flex;
      border-radius: var(--bs-border-radius);
      align-items: center;
      justify-content: space-between;

      i {
        font-size: 24px;
      }

      &:hover,
      &:focus {
        color: var(--bs-dropdown-link-color);
        background: var(--pc-active-background);
      }

      .user-group {

        .avtar,
        img {
          width: 30px;
          height: 30px;
          font-size: 14px;
        }
      }
    }

    .dropdown-body {
      .list-group-item {
        padding: 16px 20px;
      }
    }

    @media (max-width: 575.98px) {
      min-width: 100%;
    }
  }

  .dropdown-notification {
    min-width: 450px;
    max-width: 100%;
    padding: 0;

    .dropdown-header,
    .dropdown-footer {
      padding: 16px 20px;
    }

    h6.text-truncate,
    p>.text-truncate {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
    }

    .dropdown-header,
    .dropdown-body {
      border-bottom: 1px solid var(--bs-border-color);
    }

    .list-group-item-action {

      &:active,
      &:hover,
      &:focus {
        background: shift-color($primary, $soft-bg-level);
      }

      .user-avtar,
      h6 {
        cursor: pointer;
      }
    }

    .badge {
      font-size: 0.8125rem;
      padding: 0.43em 1em;
    }

    .user-avtar {
      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;
      }
    }

    .card {
      cursor: pointer;

      &:hover {
        background: var(--pc-active-background);
      }
    }

    @media (max-width: 575.98px) {
      min-width: 100%;
    }
  }
}

.drp-upgrade-card {
  background-size: cover;

  .user-group {

    .avtar,
    img {
      font-size: 14px;
    }
  }
}

.user-group {
  display: inline-flex;
  align-items: center;

  .avtar,
  img {
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.1s ease-in-out;
    border: 2px solid $card-bg;

    +.avtar,
    +img {
      margin-left: -14px;
    }

    &:hover {
      z-index: 5;
    }
  }
}

.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 (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-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;
        }
      }
    }
  }

  .minimenu {
    .pc-header {
      left: 0;
    }
  }
}

#pc-noti-home {
  >.d-flex {
    &:hover {
      margin: -15px;
      padding: 15px;
      background: rgba($primary, 0.1);
    }
  }
}

@include media-breakpoint-down(sm) {
  .pc-header {
    min-height: 60px;

    .pc-head-link {
      padding: 0.65rem;
      margin: 0 5px;
    }

    .pc-h-item {
      position: static;
      min-height: 60px;

      .pc-h-dropdown {
        left: 12px !important;
        right: 12px !important;
        min-width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
      }
    }
  }
}

// ============================
//   4. header css end
// ============================