// --------------------------------------------------------------
// # Copyright (C) joomla-monster.com
// # License: http://www.joomla-monster.com/license.html Joomla-Monster Proprietary Use License
// # Website: http://www.joomla-monster.com
// # Support: info@joomla-monster.com
// ---------------------------------------------------------------

// ==========================================================================
// VARIABLES import
// ==========================================================================
   
@import "template_variables.less";
@import "bootstrap_variables.less";

// ==========================================================================
// MIXINS import
// ==========================================================================
  
@import "../../../plugins/system/ef4_jmframework/includes/assets/template/bootstrap/less-ext/mixins-ext.less"; //JM extended mixins
@import "template_mixins.less";

// ==========================================================================
// DJ-MENU styles
// ==========================================================================

.dj-main {
  margin: 0;
  min-height: 140px;
  position: relative;
  z-index: 500;
  display: block;
  width: 100%;
  background: @JMtopmenuBackground;
  border: 1px solid @JMtopmenuBorder;
  .box-sizing(border-box);
  li.dj-up {
    position: relative;
    display: block;
    float: left;
    height: 138px; 
    background: none;
    padding: 0;
    font-family: @JMtopmenuFontFamily;
  }
  li {
    a.dj-up_a {
      display: block;
      float: left;
      height: 138px; 
      line-height: 138px; 
      text-align: center;
      cursor: pointer;
      font-weight: bold;
      text-transform: uppercase;
      position: relative;
      font-size: @JMtopmenuFontSize;
      border-right: 1px solid @JMtopmenuBorder;
      border-bottom: 1px solid @JMtopmenuBorder;
      color: @JMtopmenuFontColor;
      /* span inside anchor */
      > span {
        float: left;
        display: block;
        padding: 0 25px;
      }
      span {
        /* span that has dropdown */
        &.dj-drop {}     
        /* span.image-title appears if image as menu title published */
        span.image-title {
          line-height: 63px;
          display: block;
        }   
        img {
          padding: 42px 0 0;
          max-height: 33px;
          display: block;
          margin: 0 auto;
        }
      }
    }
    /* anchor on hover/active */
    &:hover, 
    &.active {
      a.dj-up_a:before {
        position: absolute;
        content: '';
        left: 0;
        top: -1px;
        margin: 0 -1px;
        width: 100%;
        width: calc(100% + 2px);
        width: -webkit-calc(100% + 2px);
        height: 126px;
        z-index: 301;
        border-top: 7px solid @JMtopmenuFontColor;
        border-bottom: 7px solid @JMtopmenuFontColor;
      }
      a.dj-up_a:after {
        position: absolute;
        content: '';
        left: 50%;
        margin-left: -5px;
        top: 6px;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        width: 0;
        height: 0;
        border-top: 6px solid @JMtopmenuFontColor;
      }
      // span on hover/active
      a.dj-up_a span {}
      // span that has dropdown on hover/active
      a.dj-up_a span.dj-drop {}
    }
    // change cursor to default if separator
    &.separator > a {
      cursor: default;
    }
    // Default list styling
    &:hover {
      position: relative;
      z-index: 200;
      // submenu
      ul.dj-submenu {
        left: -1px;
        top: 138px;
        border-top: 0;
        width: 240px;
        height: auto;
        z-index: 300;
        background: @JMtopmenuBackground;
        border: 1px solid @JMtopmenuBorder;
        li {
          display: block;
          position: relative;
          float: left;
          width: 240px;
          background: none;
          padding: 0;
          a {
            display: block;
            width: 190px;
            font-weight: bold;
            text-transform: uppercase;
            padding: 25px;
            text-decoration: none;
            font-size: @JMtopmenuFontSize;
            color: @JMtopmenuFontColor;
            border-top: 1px solid @JMtopmenuBorder;
          }
        }
      }
    }
  }
  // anchor of list that has submenu
  ul.dj-submenu li a.dj-more {
    &:after {
      position: absolute;
      content: '';
      right: 15px;
      margin-top: -5px;
      top: 50%;
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
      width: 0;
      height: 0;
      border-left: 6px solid @JMtopmenuFontColor;
    }
  }
  // submenu anchor on hover/active
  li:hover ul.dj-submenu li a:hover, 
  li ul.dj-submenu li > a.active {
    &:before {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 0;
      margin: 0 -1px;
      width: calc(100% + 2px);
      z-index: 301;
      border-bottom: 7px solid @JMtopmenuFontColor;
    }
  }
  
  li:hover ul.dj-submenu li a.dj-more:hover {
    &:before {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 0;
      margin: 0 -1px;
      width: calc(100% + 2px);
      z-index: 301;
      border-bottom: 7px solid @JMtopmenuFontColor;
    }
  }
 
  li:hover ul.dj-submenu li a.dj-more-active {  
    &:before {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 0;
      margin: 0 -1px;
      width: calc(100% + 2px);
      z-index: 301;
      border-bottom: 7px solid @JMtopmenuFontColor;
    }
  }
  
  li:hover ul.dj-submenu li a.dj-more-active:hover {
    &:before {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 0;
      margin: 0 -1px;
      width: calc(100% + 2px);
      z-index: 301;
      border-bottom: 7px solid @JMtopmenuFontColor;
    }
  }
  
  li:hover li:hover > ul {
    left: 240px;
    top: 0;
    border-top: 0;
    width: 240px;
    z-index: 400;
    height: auto;
    background: @JMtopmenuBackground;
    border: 1px solid @JMtopmenuBorder;
  }
  
  li ul, 
  li:hover > ul ul {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    margin: 0;
  }
  
  li:hover li:hover > a.dj-more {
    &:before {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 0;
      margin: 0 -1px;
      width: calc(100% + 2px);
      z-index: 301;
      border-bottom: 7px solid @JMtopmenuFontColor;
    }
  }

  li:hover li:hover > li > a.dj-more {
    &:before {
      display: none;
    }
  }
}

select.dj-select {
  font-size: 16px;
  padding: 4px 6px;
  height: 30px;
  max-width: 100%;
  margin: 0;
  float: right;
}