@import "../variables";
@import "../mixin";

/*===========================
  NAVBAR css 
===========================*/
.navbar-toggler:focus {
  box-shadow: none;
}

.mb-100 {
  margin-bottom: 100px;
}

/*===== NAVBAR NINE =====*/

.navbar-area {
  &.navbar-nine {
    background: var(--primary);
    padding: 10px 0;

    @media #{$md, $xs} {
      padding: 10px 0;
    }

    .navbar-brand {
      margin: 0;
    }

    & .navbar {
      position: relative;
      padding: 0;

      & .navbar-toggler {
        & .toggler-icon {
          width: 30px;
          height: 2px;
          background-color: var(--white);
          margin: 5px 0;
          display: block;
          position: relative;
          @include transition(0.3s);
        }

        &.active {
          & .toggler-icon {
            &:nth-of-type(1) {
              @include transform(rotate(45deg));
              top: 7px;
            }

            &:nth-of-type(2) {
              opacity: 0;
            }

            &:nth-of-type(3) {
              @include transform(rotate(135deg));
              top: -7px;
            }
          }
        }
      }

      & .navbar-collapse {
        @media #{$md, $xs} {
          position: absolute;
          top: 116%;
          left: 0;
          width: 100%;
          background-color: var(--primary);
          z-index: 8;
          padding: 10px 16px;
        }
      }

      & .navbar-nav {
        @media #{$laptop,$desktop} {
          margin-left: 80px;
        }

        @media #{$md, $xs} {
          margin-right: 0;
        }

        & .nav-item {
          position: relative;

          & a {
            display: flex;
            align-items: center;
            padding: 11px 16px;
            color: var(--white);
            text-transform: capitalize;
            position: relative;
            border-radius: 5px;
            font-weight: 500;
            @include transition(0.3s);
            margin: 14px 0;
            opacity: 0.7;

            &:hover {
              opacity: 1;
            }

            @media #{$md, $xs} {
              padding: 10px 0;
              display: block;
              border: 0;
              margin: 0;
            }

            &.active {
              opacity: 1;
            }

            i {
              font-size: 12px;
              font-weight: 700;
              padding-left: 7px;
              @include transition(0.3s);

              @media #{$md,$xs} {
                position: relative;
                top: -5px;
              }
            }
          }

          & .sub-menu {
            position: absolute;
            left: 0;
            top: 130%;
            width: 230px;
            background-color: var(--white);
            border-radius: 5px;
            opacity: 0;
            visibility: hidden;
            @include transition(0.3s);
            z-index: 99;
            @include box-shadow(0 2px 6px 0 rgba(0, 0, 0, 0.16));
            padding: 10px;

            @media #{$md, $xs} {
              position: relative !important;
              width: 100% !important;
              left: 0 !important;
              top: auto !important;
              opacity: 1 !important;
              visibility: visible !important;
              right: auto;
              @include transform(translateX(0%));
              @include transition(none);
              @include box-shadow(none);
              text-align: left;
              border-top: 0;
              height: 0;
            }

            &.collapse:not(.show) {
              height: auto;
              display: block;

              @media #{$md, $xs} {
                height: 0;
                display: none;
              }
            }

            &.show {
              @media #{$md, $xs} {
                height: auto;
              }
            }

            & li {
              position: relative;

              & .sub-nav-toggler {
                color: var(--black);
                @include transition(0.3s);
              }

              & a {
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 8px 16px;
                position: relative;
                color: var(--dark-2);
                @include transition(0.3s);
                border-radius: 0;
                margin: 0 0;
                z-index: 5;
                opacity: 1;

                i {
                  font-weight: 700;
                  font-size: 12px;

                  @media #{$md, $xs} {
                    display: none;
                  }
                }

                & .sub-nav-toggler {
                  & i {
                    display: inline-block;
                  }
                }
              }

              & .sub-menu {
                right: auto;
                left: 100%;
                top: 0;
                opacity: 0;
                visibility: hidden;
                @include transition(0.3s);

                @media #{$laptop,$desktop} {
                  margin-left: 10px;
                }


                @media #{$md} {
                  padding-left: 30px;
                }

                @media #{$xs} {
                  padding-left: 30px;
                }

                &.show {
                  @media #{$md, $xs} {
                    visibility: visible;
                    height: auto;
                    position: relative;
                  }
                }
              }

              &:hover {
                & .sub-menu {
                  opacity: 1;
                  visibility: visible;
                }

                & .sub-nav-toggler {
                  color: var(--white);

                  @media #{$md, $xs} {
                    color: var(--primary);
                  }
                }

                &>a {
                  color: var(--primary);
                  padding-left: 22px;

                  i {
                    color: var(--primary);
                  }

                  @media #{$md, $xs} {
                    color: var(--primary);
                  }

                  &::after {
                    opacity: 1;
                  }

                  &::before {
                    opacity: 1;
                  }
                }
              }
            }
          }

          &:hover {
            & .sub-menu {
              opacity: 1;
              visibility: visible;
              top: 115%;
            }
          }

          .sub-nav-toggler {
            @media #{$md, $xs} {
              display: inline-block;
              position: absolute;
              top: 0;
              right: 0;
              padding: 10px 14px;
              font-size: 16px;
              background: none;
              border: 0;
              color: var(--white);
            }
          }
        }
      }

      & .navbar-btn {
        margin-top: 6px;

        @media #{$md} {
          position: absolute;
          right: 70px;
          top: 7px;
        }

        @media #{$xs} {
          position: absolute;
          right: 60px;
          top: 7px;
        }

        & .menu-bar {
          font-size: 22px;
          position: relative;
          overflow: hidden;
          color: var(--white);
          height: 40px;
          width: 40px;
          line-height: 40px;
          text-align: center;
          border: 1px solid rgba(238, 238, 238, 0.425);
          border-radius: 50%;
          @include transition(0.3s);

          &:hover {
            border-color: transparent;
            color: var(--primary);
            background-color: var(--white);
          }
        }
      }
    }
  }
}

/*===== SIDEBAR ONE =====*/

.sidebar-left {
  position: fixed;
  top: 0;
  right: 0;
  background-color: var(--white);
  height: 100%;
  width: 350px;
  padding-top: 80px;
  z-index: 99;
  @include transform(translateX(100%));
  transition: all 0.4s ease-in-out;
  text-align: left;

  &.open {
    @include transform(translateX(0));
  }

  @media #{$xs} {
    width: 250px;
  }

  & .sidebar-close {
    position: absolute;
    top: 30px;
    right: 30px;

    & .close {
      font-size: 18px;
      color: var(--black);
      @include transition(0.2s);

      &:hover {
        @include transform(rotate(90deg));
      }
    }
  }

  & .sidebar-content {
    padding: 0px 30px;

    & .sidebar-menu {
      margin-top: 30px;

      .menu-title {
        font-size: 18px;
        font-weight: 600;
      }

      & ul {
        margin-top: 15px;

        & li {
          & a {
            font-size: 16px;
            line-height: 24px;
            font-weight: 500;
            padding: 8px 0;
            color: var(--dark-3);
            text-transform: capitalize;
            position: relative;
            border-radius: 5px;
            @include transition(0.3s);
            display: block;

            &:hover {
              color: var(--primary);
              padding-left: 5px;
            }
          }
        }
      }
    }

    .text {
      margin-top: 20px;
    }

    & .sidebar-social {
      margin-top: 30px;

      .social-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 25px;
      }

      & ul {
        & li {
          display: inline-block;
          margin-right: 5px;

          &:last-child {
            margin: 0;
          }

          & a {
            height: 38px;
            width: 38px;
            line-height: 38px;
            text-align: center;
            border: 1px solid #eee;
            border-radius: 50%;
            font-size: 18px;
            color: #666;
            @include transition(0.3s);

            &:hover {
              color: var(--white);
              background-color: var(--primary);
              border-color: transparent;
            }
          }
        }
      }
    }
  }
}

.overlay-left {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.6);
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 9;

  &.open {
    display: block;
  }
}