@charset "utf-8";

@import "../initial";

.sitemenu-horizontal {
  padding: 10px 0;

  @include clearfix;

  .sitemenu-title {
    display: none;
  }

  .sitemenu-item.level-1 {
    font-size: 0.8125rem;
    position: relative;
    float: left;
    margin-right: 1%;
    margin-bottom: 12px;
    padding: 6px 12px;
    color: #fff;
    background: #9c9c9c;

    &:hover {
      background: darken( $theme-color-second,  15%);
      color: #fff;
      .sitemenu-link.level-1{
        color: #fff;
      }
    }
    &:hover ul.dropdown-menu{
      display: block;
    }
  }

  .sitemenu-link.level-1 {
    margin-right: .25rem;
    color: #fff;
    font-weight: bold;

  }

  .sitemenu-dropdown-toggle {
    font-size: 0.75rem;
    padding: 2px .3125rem;
    cursor: pointer;
  }

  // sitemenu dropdown
  .sitemenu-list.dropdown-menu { /*第三層選單*/
    min-width: 100%;
    margin-top: 0;
    border: none;
    background: $theme-color-second;
    border-radius: 0;
  }

  .sitemenu-link.level-2 {
    color: $theme-white;
    font-size: 0.8125rem;
    padding: 4px 0.625rem;

    &:hover {
      text-decoration: none;
      background-color: darken( $theme-color-second , 10%);
    }
  }
}

.sitemenu-vertical {
  .sitemenu-list {
  }
  .sitemenu-list.level-1.list-unstyled{
    border: 1px solid #e5e5e5;
    border-bottom-width: 4px;
    padding: 0 4px;
  }
  .sitemenu-item.level-1 {
    position: relative;
    color: #444;  
    margin: 0 -4px; 
    &:hover{
      background-color: darken( $theme-color-second , 10%);
      color: #fff;
      .sitemenu-link{
        color: #fff;
      }
    } 
    &:hover ul.dropdown-menu{
      display:block;
    }
    &:last-child > .sitemenu-link{
      border-bottom: 0;
    }
  }

  .sitemenu-link {
    font-size: 0.8125rem;
        font-weight: bold;
    padding: 8px 30px 8px 20px;
    color: #444;
    display: block;
    border-bottom: 1px solid #e5e5e5;
  }

  .sitemenu-dropdown-toggle {
    font-size: 0.75rem;
    padding: 2px .3125rem;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 50%;
    margin-top: -8px;
  }

  .sitemenu-list.dropdown-menu {
    border: none;
    border-radius:0 0 .2em .2em;
    margin-top: -1px;
    background: $theme-color-second;
    border-top: 1px solid darken( $theme-color-second , 5%);
    padding: 0;
    width: 100%;
  }

  .sitemenu-link.level-2 {
    color: $theme-white;
    font-size: 0.8125rem;
    padding: 8px 20px;
    border-bottom: 1px solid lighten( $theme-color-second , 5%);

    &:hover {
      text-decoration: none;
      background-color: darken( $theme-color-second , 5%);
    }
  }
}