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

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

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

.primary-btn {
  @extend %primary-btn;
}

.primary-btn-outline {
  @extend %primary-btn-outline;
}

/*===== NAVBAR THREE =====*/

.navbar-area {
  &.navbar-three {
    background: var(--primary);

    @media #{$md, $xs} {
      padding: 10px 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 {
        margin-right: 24px;

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

        & .nav-item {
          position: relative;

          & a {
            display: flex;
            align-items: center;
            padding: 8px 20px;
            color: var(--white);
            text-transform: capitalize;
            position: relative;
            border: 1px solid transparent;
            border-radius: 30px;
            font-weight: 500;
            @include transition(0.3s);
            margin: 22px 4px;
            font-size: 16px;

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

            i {
              font-size: 14px;
              font-weight: 700;
              padding-left: 8px;
            }

            &.active {
              border: 1px solid rgba(255, 255, 255, 0.281);

              @media #{$md, $xs} {
                border: 0;
              }
            }
          }

          &:hover {
            &>a {
              border: 1px solid rgba(255, 255, 255, 0.3);

              @media #{$md, $xs} {
                border: 0;
              }

              &::before,
              &::after {
                @include transform(translateX(-50%) scaleX(1));
              }
            }
          }

          & .sub-menu {
            position: absolute;
            right: 0;
            top: 100%;
            width: 260px;
            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;
            border-radius: 5px;

            @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: 10px 24px;
                position: relative;
                color: var(--black);
                @include transition(0.3s);
                margin: 0 0;
                border: 0;
                border-radius: 5px;

                @media #{$md,$xs} {
                  font-size: 15px;
                }

                & i {
                  font-weight: 700;
                  font-size: 14px;

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

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

                &::before {
                  display: none;
                }

                &::after {
                  display: none;
                }
              }

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

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

                @media #{$md, $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);
                }

                &>a {
                  background: var(--primary);
                  color: var(--white);

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

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

          .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-social {
        @media #{$md} {
          position: absolute;
          right: 70px;
          top: 50%;
          @include transform(translateY(-50%));
        }

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

        & ul {
          display: flex;

          & li {
            display: inline-block;
            margin-left: 12px;

            & a {
              height: 40px;
              width: 40px;
              line-height: 40px;
              text-align: center;
              font-size: 18px;
              color: var(--white);
              border: 1px solid rgba(255, 255, 255, 0.356);
              border-radius: 50%;
              @include transition(0.3s);

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