@charset "utf-8";

@import "../initial";

.navbar-collapse.in {
  overflow-y: unset;
}

.modules-menu {
  font-family: $sub-font;
  max-height: none;
  z-index: 4;

  @media(max-width: 767px) {
    position: absolute;
    top: 0;
    width: 100%;
    background: $theme-white;
    padding: 0 1em;
  }

  li {
    white-space: nowrap;
  }
  .menu-drop.opened {
    transform: rotateX(180deg);
  }
  
  .modules-menu-level-0 {
    margin: 0 0 0.5em 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    float: left !important;

    .has-dropdown.level-1.active {
      .modules-menu-level-1 {
        display: block;
        // max-height: 80em;
        // -moz-transition: all 0.8s; 
        // -webkit-transition: all 0.8s;  
        // -ms-transition: all 0.8s;  
        // -o-transition: all 0.8s;  
        // transition: all 0.8s; 
      }
    }

    .has-dropdown.level-2.active {
      .modules-menu-level-2 {
        display: block;
        // max-height: 80em;
        // -moz-transition: all 0.8s; 
        // -webkit-transition: all 0.8s;  
        // -ms-transition: all 0.8s;  
        // -o-transition: all 0.8s;  
        // transition: all 0.8s; 
      }
    }

    // .dropdown-toggle-icon {
    //   position: absolute;
    //   top: 0.5em;
    //   right: 0.3em;
    //   width: 2.5em;
    //   height: 2.5em;
    //   cursor: pointer;
    //   line-height: 2.5em;
    //   font-size: 1em;
    //   text-align: center;
    //   border-radius: 0.13em;
    // }
  
    .menu-drop {
      position: absolute;
      top: 0.5em;
      right: 0.3em;
      width: 2.5em;
      height: 2.5em;
      cursor: pointer;
      line-height: 2.5em;
      font-size: 1em;
      text-align: center;
      border-radius: 0.13em;    
    }

    // .dropdown-toggle-icon.level-1 {
    //   background-color: lighten($theme-gray, 10%);
    // }

    // .dropdown-toggle-icon.level-2 {
    //   background-color: lighten($theme-gray, 10%);
    // }

    & > li {
      position: relative;
      margin: 0 -1em;
      padding: 0 1em;

      & > a {
        display: block;
        padding: 1.125em 0;
        font-family: $main-font;
        font-size: 0.8rem;
        text-align: center;
        line-height: 1.5em;
        width: 99px;
      }

      &:hover {
        & > a {
          color: #fff;
          background: url(/assets/meuhover.png) left top no-repeat;
        }
      }

      @media (min-width: $screen-sm) {
        position: relative;
        padding: 0;
        border-bottom: none;
        margin: 0 0 4px 15px;

        &:nth-child(odd) {
          margin-left: 0;
        }

        &:last-child {
        

          .modules-menu-level-1 {
            left: auto;

            &:before {
              right: 0.625em;
              left: auto;
            }

            & > li {
              padding-right: 1em;
              padding-left: 1em;

              & > a {
                padding-left: 0;
              }
            }

            .modules-menu-level-2 {
              right: 100%;
              left: auto;
            }
          }
        }

        & > a {
          padding: 0.5rem;
          color: $theme-gray-darker;
        }

        &:hover {
          .modules-menu-level-1 {
            // display: block;
            // max-height: 80em;
            // -moz-transition: all 0.8s; 
            // -webkit-transition: all 0.8s;  
            // -ms-transition: all 0.8s;  
            // -o-transition: all 0.8s;  
            // transition: all 0.8s; 
          }
        }
      }
    }
  }

  .modules-menu-level-1 {
    display: none;
    // max-height: 0;
    // overflow: hidden;
    // -moz-transition: all 0.3s; 
    // -webkit-transition: all 0.3s;  
    // -ms-transition: all 0.3s;  
    // -o-transition: all 0.3s;  
    // transition: all 0.3s; 
    min-width: 100%;
    margin: 0;
    padding: 0;
    background-color: $theme-gray;
    list-style: none;
    z-index: 1;

    & > li {
      position: relative;
      & + li {
        border-top: 0.0625em solid lighten($theme-gray, 5%);
      }

      & > a {
        display: block;
        padding: 1em 1.5em;
        font-family: $main-font;
        font-size: 0.8rem;
        color: #fff;
      }

      &:hover {
        background-color: $theme-color-second;
        & > a {
          color: $theme-color-main;
        }
      }
    }

    @media (min-width: $screen-sm) {
      position: absolute;

      & > li {
        padding-right: 2em;

        & > a {
          padding-left: 1em;
        }

        &:hover {
          .modules-menu-level-2 {
            display: block;
            // max-height: 80em;
            // -moz-transition: all 0.8s; 
            // -webkit-transition: all 0.8s;  
            // -ms-transition: all 0.8s;  
            // -o-transition: all 0.8s;  
            // transition: all 0.8s; 
          }
        }
      }
    }
  }

  .modules-menu-level-2 {
    display: none;
    // max-height: 0;
    // overflow: hidden;
    // -moz-transition: all 0.3s; 
    // -webkit-transition: all 0.3s;  
    // -ms-transition: all 0.3s;  
    // -o-transition: all 0.3s;  
    // transition: all 0.3s; 
    margin: 0;
    padding: 0;
    background-color: $theme-gray;
    list-style: none;

    & > li {
      & + li {
        border-top: 0.0625em solid lighten($theme-gray, 5%);
      }

      & > a {
        display: block;
        padding: 0.9em 3em;
        font-family: $main-font;
        color: #fff;
        font-size: 0.8rem;
      }

      &:hover {
        background-color: $theme-color-second;
      }
    }

    @media (min-width: $screen-sm) {
      position: absolute;
      top: 0;
      left: 100%;

      & > li  > a {
          padding-left: 1em;
        }
    }
  }
}

.has-mobile-dropdown {
  .modules-menu {
    .dropdown-toggle-icon {
      display: block;
    }
  }
}

@media (max-width: 767px) {
  .modules-menu .modules-menu-level-0 {
    display: unset;
    width: 100%;
  }
}