@charset "utf-8";

@import "../initial";

$h-level-1-bgColor:#eaeaea;
$h-level-1-bgColor-hover: darken( $theme-color-main , 10%);
$h-level-2-bgColor:$theme-color-five;


$v-level-1-bgColor:#eaeaea;
$v-level-1-bgColor-hover: darken( $theme-color-main , 10%);
$v-level-2-bgColor:$theme-color-main;

.sitemenu-horizontal {
  padding: 10px 0 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: 8px .8em;
    padding-bottom: 8px;
    color: #474747;
    border-radius: 5px;
    behavior: url("/assets/ie_support/PIE2/PIE.htc");
    background: $h-level-1-bgColor;

    &:hover {
      background: $h-level-1-bgColor-hover;
      color: #fff;
      .sitemenu-link.level-1{
        color: #fff;
      }
    }
    &:hover ul.dropdown-menu{
      display: block;
    }
  }

  .sitemenu-link.level-1 {
    margin-right: .25rem;
    color: #474747;
  }

  .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: $h-level-2-bgColor;
  }

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

    &:hover {
      text-decoration: none;
      background-color: darken( $h-level-2-bgColor , 10%);
    }
  }
}

.sitemenu-vertical {
  h3.sitemenu-title{
    margin-top: 0;
  }
  .sitemenu-list.level-1.list-unstyled{

  }
  .sitemenu-item.level-1 {
    position: relative;
    color: #474747;  
    margin: 0 -4px; 
    > .sitemenu-link{
      background: url(/assets/sub-icon.jpg) 10px 14px no-repeat;
    }
    &:hover{
      color: $theme-color-main;
      > .sitemenu-link{
        color: $theme-color-main;
        background-color: #f1f1f1;
        
      }
    } 
    &:hover ul.dropdown-menu{
      display:block;
    }
    &:last-child > .sitemenu-link{
      border-bottom: 0;
    }
  }

  .sitemenu-link {
    font-size: 0.8125rem;
    padding: 8px 30px 8px 26px;
    color: #474747; 
    display: block;
    border-bottom: 1px solid #eaeaea;
    
  }

  .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: 0;
    background: $v-level-2-bgColor;
    padding: 0;
    @media (min-width: $screen-md){
      width: 100%;
    }
  }

  .sitemenu-link.level-2 {
    color: $theme-white;
    font-size: 0.8125rem;
    padding: 10px 26px;
    border-bottom: 1px solid lighten( $v-level-2-bgColor , 5%);
    background-color: $v-level-2-bgColor; 
    &:hover {
      text-decoration: none;
      background-color: darken( $v-level-2-bgColor , 5%);
      color: $theme-white;
      .sitemenu-link{
        color: $theme-white;
        
      }
    }
  }
}