/* =========== Sidebar css =========== */
.sidebar-nav-wrapper {
  background: $white;
  width: 250px;
  padding: 20px 0px;
  height: 100vh;
  position: fixed;
  overflow-y: scroll;
  overflow-x: hidden;
  top: 0;
  left: 0;
  z-index: 99;
  box-shadow: 0px 0px 30px rgba(200, 208, 216, 0.3);
  @include transition(0.3s);
  @include transform(translateX(0));

  @media #{$lg, $md, $xs} {
    @include transform(translateX(-260px));
  }

  &.active {
    @include transform(translateX(-260px));

    @media #{$lg, $md, $xs} {
      @include transform(translateX(0px));
    }
  }

  .navbar-logo {
    text-align: center;
    padding: 0 25px;
    margin-bottom: 30px;
  }

  .sidebar-nav {
    .divider {
      padding: 5px 25px;
      width: 100%;

      hr {
        height: 1px;
        background: #e2e2e2;
      }
    }

    ul {
      .nav-item {
        position: relative;
        margin: 5px 0px;

        &.nav-item-has-children {
          & > a {
            color: $dark;

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

            &::after {
              content: "\ea5e";
              font: normal normal normal 1em/1 "LineIcons";
              position: absolute;
              right: 25px;
              top: 16px;
              font-size: 12px;
              @include transition(0.3s);
              @include transform(rotate(180deg));
            }

            &.collapsed {
              color: $gray;

              &::before {
                opacity: 0;
                visibility: hidden;
              }

              &::after {
                @include transform(rotate(0deg));
              }
            }
          }

          ul {
            padding: 0px 15px;
            li {
              margin-bottom: 10px;

              &:last-child {
                margin-bottom: 0px;
              }

              a {
                font-size: 14px;
                font-weight: 400;
                border-radius: 6px;
                padding: 8px 15px;
                display: flex;
                align-items: center;
                border: 1px solid transparent;

                &.active,
                &:hover {
                  color: $primary;
                  border-color: rgba($primary, 0.15);
                  background: rgba($primary, 0.1);
                }

                i {
                  font-size: 16px;
                  margin-right: 15px;
                }

                span.text {
                  display: flex;
                  align-items: center;
                  justify-content: space-between;
                  width: 100%;
                }

                span.pro-badge {
                  background: $primary;
                  color: $white;
                  padding: 1px 6px;
                  border-radius: 4px;
                  font-size: 10px;
                  margin-left: 10px;
                }
              }
            }
          }
        }

        a {
          display: flex;
          align-items: center;
          color: $gray;
          font-size: 16px;
          font-weight: 500;
          width: 100%;
          position: relative;
          z-index: 1;
          padding: 10px 25px;

          &::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background: $primary;
            border-radius: 0 3px 3px 0px;
            opacity: 0;
            visibility: hidden;
            @include transition(0.3s);
          }

          span.text {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
          }

          span.pro-badge {
            background: $primary;
            color: $white;
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 10px;
            margin-left: 10px;
          }

          .icon {
            margin-right: 12px;
            font-size: 18px;

            svg {
              fill: currentColor;
            }
          }
        }
        &.active,
        &:hover {
          & > a,
          & > a.collapsed {
            color: $dark;

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

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba($black, 0.3);
  z-index: 11;
  @include transform(translateX(-100%));
  opacity: 0;
  visibility: hidden;

  @media #{$desktop, $laptop} {
    display: none;
  }

  &.active {
    @media #{$lg, $md, $xs} {
      opacity: 1;
      visibility: visible;
      @include transform(translateX(0));
    }
  }
}

.main-wrapper {
  @include transition(0.3s);
  margin-left: 250px;
  min-height: 100vh;
  padding-bottom: 85px;
  position: relative;

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

  @media #{$xs} {
    padding-bottom: 110px;
  }

  &.active {
    margin-left: 0;
  }

  .container-fluid {
    padding-left: 40px;
    padding-right: 40px;

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

  .footer {
    padding: 25px 0;
    justify-items: flex-end;
    position: absolute;
    bottom: 0;
    width: 100%;

    .copyright {
      p {
        a {
          color: inherit;

          &:hover {
            color: $primary;
          }
        }
      }
    }

    .terms {
      @media #{$xs} {
        margin-bottom: 10px;
        text-align: center;
      }

      a {
        color: $gray;

        &:hover {
          color: $primary;
        }
      }
    }
  }
}

.promo-box {
  box-shadow: 0px 10px 20px rgba(200, 208, 216, 0.3);
  padding: 24px 16px;
  text-align: center;
  max-width: 210px;
  margin: 0 auto;
  margin-top: 32px;
  border-radius: 4px;

  h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  p {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 16px;
  }

  .main-btn {
    padding: 12px;
    width: 100%;
  }
}
