/* ###### 6.4 Header  ###### */
.main-header {
  z-index: 100;
  height: 64px;
  position: fixed;
  margin-block-end: 20px;
  box-shadow: none;
  background: transparent;
  backdrop-filter: blur(5px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  content: "";
  inset-inline-start: 0;
  inset-inline-end: 0;
  top: 0;
  width: 100%;
  &.sticky.sticky-pin {
    position: fixed;
    top: 0;
    background-color: rgb($background-gradient-color);
    transition: top ease 0.3s;
  }
  > {
    .container,
    .container-fluid {
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
  }
  .dropdown-menu {
    border: 1px solid #{$primary-03} !important;
    .main-message-list {
      .dropdown-item {
        padding: 0.75rem;

        &:last-of-type {
          border-block-end: 0 !important;
        }
      }
    }
    .main-notification-list a {
      &:last-of-type {
        border-block-end: 0 !important;
      }
    }
  }
}
.main-header > .main-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-position: center top;
  background-repeat: no-repeat;
  content: "";
  inset-inline-start: 0;
  inset-inline-end: 0;
  top: 0;
  width: 100%;
  &:before {
    position: absolute;
    content: "";
    width: 50%;
    height: 1px;
    bottom: 0;
    inset-inline-start: 30%;
    background: linear-gradient(45deg, transparent, $primary-03, $primary-06, $primary-06, $primary-03, transparent);
    box-shadow: 0 8px 17px 0.0125px $primary;
  }
}
.side-header {
  position: fixed;
  width: 100%;
  z-index: 10 !important;
  border-block-end: 1px solid #{$border};
}
@media (min-width: 992px) {
  .main-header > .container {
    padding: 0;
  }

  .main-header.hor-header.sticky.sticky-pin {
    position: relative;
  }
  .hor-header > .main-container {
    &::before {
      display: none;
    }
  }
}
@media (max-width: 991.98px) {
  .main-header > .container {
    max-width: none;
  }
  .main-header {
    z-index: 1030 !important;
  }
}
@media (max-width: 1158px) {
  .main-header-left #dropdownMenuButton {
    display: none;
  }
}
@media (max-width: 1052px) {
  .main-header-left #dropdownMenuButton2 {
    display: none;
  }
}
.main-profile-menu.nav-link {
  padding: 0rem !important;
  margin: auto 6px;
}
.main-header .main-header-left .main-logo {
  display: none;
}
@media (min-width: 992px) {
  .main-header .main-header-left .main-logo {
    display: flex;
  }
}
.main-header-left {
  display: flex;
  align-items: center;

  .list-items {
    li {
      display: inline-block;

      i {
        display: block;
        font-size: 24px;
        color: #{$gray-900};
        position: relative;
        line-height: 0.9;
        outline: none;
        margin-inline-end: 15px;
      }
    }
    margin-block-end: 0;
  }
  .main-header-arrow {
    display: none;
    position: relative;
    inset-block-start: -2px;
  }
}
.main-logo {
  display: flex;
  align-items: center;
  position: relative;
  height: 2.5rem;
  margin: 0 auto;
  justify-content: center;
  text-align: center;
}
.main-logo {
  &:hover,
  &:focus {
    color: #{$primary};
  }

  i {
    display: block;
    line-height: 0.9;
    margin-inline-end: 8px;
    font-size: 40px;

    &::before {
      width: auto;
      height: auto;
    }
  }
}

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

@media (min-width: 992px) {
  .main-header-center {
    display: block;
  }
}

.main-header-right {
  .main-profile-menu {
    .dropdown-menu::before {
      background: #{$primary};
      border-width: 0px;
    }
  }
}

.main-profile-menu {
  .dropdown-menu:before {
    inset-inline-end: 15px;
  }
}

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

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

  i {
    line-height: 0;
  }

  &:hover,
  &:focus {
    color: #{$gray-700};
  }
}

.header-icons .new.nav-link {
  position: relative;
  margin: auto 6px !important;
}

.header-icons .new.nav-link {
  display: block;
  font-size: 22px;
  color: #{$bg-active};
  position: relative;
  line-height: 33px;
  outline: none;
  height: 37px;
  width: 37px;
  margin: auto;
  text-align: center;
}

@media (min-width: 992px) {
  .main-header-notification > a::after,
  .main-header-message > a::after {
    inset-block-end: -36px;
  }
}

.main-header-notification .dropdown-menu {
  width: 100%;
  position: fixed;
  border-radius: 0;
  width: 300px;
  position: absolute;
  inset-block-start: 44px;
  inset-inline-start: auto;
  inset-inline-end: -10px;
  inset-block-end: auto;
  padding: 0;
  z-index: 9;
}

.main-header-message .dropdown-menu {
  width: 300px;
  position: absolute;
  inset-block-start: 44px;
  inset-inline-start: auto;
  inset-inline-end: -10px;
  inset-block-end: auto;
  z-index: 9;
  padding: 0;
}

.main-header-shop .dropdown-menu {
  width: 410px;
  position: absolute;
  inset-block-start: 44px;
  inset-inline-start: auto;
  inset-inline-end: -10px;
  inset-block-end: auto;
  z-index: 9;
  padding: 0px;
}

.main-header-notification {
  .dropdown-footer {
    text-align: center;
    padding-block-start: 10px;
    font-size: 13px;
    border-block-start: 1px dotted #{$gray-400};
  }

  &.show .dropdown-menu {
    display: block;
  }
}

@media (min-width: 576px) {
  .main-header-notification.show > a::after,
  .main-header-message.show > a::after {
    display: block;
  }
}

.main-header-message.show .dropdown-menu {
  display: block;
}

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

    + .media {
      border-block-start: 1px dotted #{$gray-400};
    }

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

    &:hover,
    &:focus {
      z-index: 1;
    }

    &:hover::before,
    &:focus::before {
      content: "";
      position: absolute;
      inset-block-start: -1px;
      inset-inline-start: -20px;
      inset-block-end: -1px;
      inset-inline-end: -20px;
      background-color: #{$gray-100};
      border-block-start: 1px solid #{$border};
      border-block-end: 1px solid #{$border};
      z-index: -1;
    }
  }

  .media-body {
    margin-inline-start: 15px;
    font-size: 13px;

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

    strong {
      font-weight: 500;
    }

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

.main-profile-menu {
  > .main-img-user {
    outline: none;
    width: 32px;
    height: 32px;

    &::before {
      content: "";
      position: absolute;
      inset-block-end: -20px;
      inset-inline-end: -90px;
      margin-inline-start: -7px;
      width: 14px;
      height: 14px;
      border: 2px solid transparent;
      border-block-start-color: #{$gray-300};
      border-inline-start-color: #{$gray-300};
      transform: rotate(45deg);
      background-color: rgb($white);
      z-index: 901;
      display: none;
    }
  }

  .dropdown-menu {
    padding: 0;
    z-index: 900;
    position: absolute;
    inset-inline-start: auto;
    inset-inline-end: 0px;
    inset-block-end: auto;
    width: 230px;
  }

  .dropdown-item {
    position: relative;
    padding: 20px 16px;
    height: 38px;
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #{$default-color};

    i {
      font-size: 17px;
      margin-inline-end: 10px;
      width: 24px;
      text-align: center;

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

  &.show .dropdown-menu {
    display: block;
    inset-block-start: 50px;
  }
}

@media (min-width: 576px) {
  .main-profile-menu.show .main-img-user::before {
    display: block;
  }
}

.main-header-profile {
  display: flex;
  flex-direction: column;
  align-items: center;

  .main-img {
    margin-block-end: 10px;
    margin-block-start: 10px;

    img {
      width: 60px;
      height: 60px;
      border-radius: 50%;
    }
  }

  h6 {
    font-weight: 700;
    color: #{$gray-900};
    margin-block-end: 3px;
    font-size: 16px;
    color: rgb($white);
  }

  span {
    display: block;
    font-size: 12px;
    margin-block-end: 0;
    color: #{$white-6};
  }
}

@media (min-width: 576px) {
  .main-header-profile .main-img-user {
    width: 80px;
    height: 80px;
  }
}

/*--Search--*/
.main-header-right {
  .input-group-btn .btn {
    border: 0 !important;
    background: transparent;
    border-radius: 3px;
    color: #{$default-color};
    height: 38px;
    width: 38px;
    line-height: 24px;
    border-radius: 50px;
    font-size: 22px;

    &:hover {
      border-radius: 50%;
      color: #{$primary};

      i {
        color: #{$primary};
      }
    }

    i {
      font-size: 16px;
      color: #{$default-color};
    }
  }

  .navbar-form.active .input-group-btn .btn i {
    font-size: 14px;
    line-height: 27px;
  }

  form[role="search"] {
    inset-block-start: 0px;
    inset-inline-end: 0;
    width: 100%;
    padding: 0px;
    margin: 0px;
    z-index: 0;

    button {
      padding: 5px 12px;
      border-radius: 0px;
      border-width: 0px;
      color: #{$default-color};
      background-color: rgb(248, 248, 248);
      border-color: rgb(231, 231, 231);
      box-shadow: none;
      outline: none;
    }

    input {
      padding: 5px 12px;
      border-radius: 0px;
      border-width: 0px;
      color: #{$default-color};
      background-color: rgb(248, 248, 248);
      border-color: rgb(231, 231, 231);
      box-shadow: none;
      outline: none;
      padding: 16px 12px;
      font-size: 14px;
      color: #{$default-color};
      box-shadow: none;
    }

    button[type="reset"] {
      display: none;
      background: rgb($white);
      border: 0 !important;
    }
  }

  .input-group-btn .btn i {
    font-size: 18px;
    color: #7d7d86;
  }
}

.main-header-message.right-toggle .nav-link {
  padding: 0;
}

form[role="search"] {
  input {
    font-size: 16px;
    opacity: 0;
    display: none;
    height: 66px;
    transition: all 05s;
  }

  &.active {
    width: 100%;
    z-index: 9999;
    inset-inline-end: 0;
    border-inline-start: 0px solid #e3e3f7;
    position: absolute;
    inset-inline-start: -1px;
    display: block;

    button {
      display: table-cell !important;
      opacity: 1;
    }

    input {
      display: table-cell;
      opacity: 1;
      width: 100%;
      height: 64px;
      background: rgb($white);
      padding-inline-start: 20px;
      border-start-start-radius: 0;
      border-start-end-radius: 0;
      border-end-end-radius: 5px;
      border-end-start-radius: 5px;
      transition: all 05s;
      box-shadow: 5px 6px 6px -3px #{$shadow-color};
      inset-block-start: 3.6rem;
    }
  }
}

.main-header-message i,
.main-header-notification i,
.nav-item.full-screen i {
  height: 37px;
  width: 37px;
  text-align: center;
  line-height: 37px;
  font-size: 17px;
}

.main-header-message .dropdown-footer,
.main-header-notification .dropdown-footer,
.main-header-shop .dropdown-footer {
  border-block-start: 1px solid #{$border};
  padding: 10px;
  box-shadow: -8px 12px 18px 0 rgba(25, 42, 70, 0.1);
  border-start-start-radius: 0;
  border-start-end-radius: 0;
  border-end-end-radius: 4px;
  border-end-start-radius: 4px;
}

.main-header-message .dropdown-footer a {
  font-size: 13px;
}

.main-header-center {
  display: flex;
}

.header .form-control {
  border: 2px solid #{$gray-300};
}

@media (min-width: 992px) {
  .main-header.fixed-header {
    position: fixed;
    z-index: 999;
    margin-block-start: 0;
  }
  .main-header-left .form-control {
    height: 35px;
    border-radius: 0px;
    background: transparent;
    background: transparent;
    border: 1px solid $primary-01;
    &:focus {
      background: transparent;
      box-shadow: 0px 0px 20px -5px $primary;
      border: 1px solid $primary-05 !important;
    }
  }
  .main-header-left .btn {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0px;
    height: 35px;
    color: $black-5;
    transition: none;
    font-size: 14px;
    padding: 8px 15px;
    border-inline-start: 0px !important;
    border-start-start-radius: 0;
    border-start-end-radius: 5px;
    border-end-end-radius: 5px;
    border-end-start-radius: 0;
  }
}

.main-header-message .nav-link i,
.main-header-notification .nav-link i,
.nav-item.full-screen .nav-link i {
  text-align: center;
  line-height: 40px;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  text-align: center;
  line-height: 40px;
  font-size: 1.2rem;
  color: #39455d;
}

.header-icons .new.nav-link {
  padding: 0;
  border-radius: 4px;
  transition: all ease 0.3s;
  &:hover,
  &.show {
    background: #{$bg-hover};
    .header-icon-svgs {
      fill: #{$primary};
      color: #{$primary};
    }
  }
}

.main-header {
  .main-header-left .main-logo {
    display: flex;
    margin: 0;
  }
}

@media (max-width: 1134px) {
  .main-header-left .form-control {
    width: 150px;
  }
}

@media (min-width: 1400px) {
  .main-header-left .form-control {
    width: 500px !important;
  }
}

.main-header-arrow {
  display: none;
  position: relative;
  inset-inline-end: auto;
}

@media (max-width: 480px) {
  .main-header-right .nav .nav-item .dropdown-menu {
    inset-inline-start: auto;
    inset-inline-end: auto;
    justify-content: center;
    margin: 0 auto;
    width: 93%;
    position: fixed;
    inset-inline-start: 5px;
    inset-inline-end: 5px;
    margin-block-start: 61px;
  }
}

@media (min-width: 991px) {
  .header {
    width: 230px;
  }
}

@media (max-width: 991px) {
  .main-header-left .form-control,
  .main-header-center .btn {
    display: none;
  }
}

@media (max-width: 578px) {
  .main-header-message > a,
  .main-header-notification > a,
  .main-header-message > a,
  .nav-link.icon {
    padding: 0px;
  }
  .profile-user {
    padding: 0px;
  }

  .main-header-center {
    display: none;
  }

  .main-header-message.right-toggle .nav-link {
    padding: 0 0;
  }

  .main-header-message > a,
  .main-header-notification > a,
  .nav-item.full-screen > a,
  .nav-link.icon {
    line-height: 33px;
  }
  .nav-link.icon {
    inset-block-start: 10px;
  }
}

@media (min-width: 992px) {
  .main-header {
    z-index: 1000 !important;
    width: 100% !important;
    inset-inline-start: 0;
    padding-inline-start: 240px;
  }

  .app.sidenav-toggled {
    .main-header {
      padding-inline-start: 80px;
    }

    .main-sidebar-header {
      width: 80px;
    }
  }
}

.right-toggle {
  cursor: pointer;
}

@media (max-width: 633px) and (min-width: 321px) {
  .main-profile-menu {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    padding-inline-end: 7px !important;
    padding-inline-start: 7px !important;
  }
}

@media (max-width: 320px) {
  .main-profile-menu {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    padding-inline-end: 2px !important;
    padding-inline-start: 2px !important;
  }
}

@media (max-width: 991px) {
  .btn.btn-default.nav-link.resp-btn {
    display: block;
    font-size: 22px;
    color: #272746;
    position: relative;
    line-height: 18px;
    outline: none;
    height: 34px;
    width: 34px;
    margin: auto;
    text-align: center;
    border: 0px solid #dfd7e9;
    padding: 2px;
  }
}
.main-header .main-header-right .nav-link.icon {
  margin: 0px;
  text-align: center;
  font-size: 1.2rem;
  position: relative;
}
.nav-link.icon i {
  color: #{$default-color} !important;
  font-size: 20px;
  position: relative;
}
@media (max-width: 992px) {
  .responsive-navbar {
    .collapsing .dropdown-menu {
      display: none !important;
    }
    .collapse.show .dropdown-menu.show {
      display: block !important;
    }
  }
}
@media (max-width: 360px) {
  .responsive-navbar.navbar .new.nav-link {
    margin: 10px 0 !important;
  }
}

.header-icon-svgs {
  width: 20px;
  height: 20px;
  color: #{$primary};
  fill: #{$header-color};
  transition: all ease 0.3s;
}
