/** 
 *------------------------------------------------------------------------------
 * @package       T3 Framework for Joomla!
 *------------------------------------------------------------------------------
 * @copyright     Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved.
 * @license       GNU General Public License version 2 or later; see LICENSE.txt
 * @authors       JoomlArt, JoomlaBamboo, (contribute to this project at github 
 *                & Google group to become co-author)
 * @Google group: https://groups.google.com/forum/#!forum/t3fw
 * @Link:         http://t3-framework.org 
 *------------------------------------------------------------------------------
 */


// -------------------------------------------------------
//  DEFAULT BOOTSTRAP NAVBAR (navbars.less)
// -------------------------------------------------------

// Base Navbars
// --------------------------------------------------
.navbar {
  @media (min-width: @grid-float-breakpoint) {
  }
}


// Navbar heading
// --------------
.navbar-header {
  @media (min-width: @grid-float-breakpoint) {
  }
}


// Navbar collapse (body)
// ----------------------
.navbar-collapse {
  @media (min-width: @grid-float-breakpoint) {
  }
}


// Brand/project name
// ------------------
.navbar-brand {
  // Link states
  &:hover,
  &:focus {
  }
  @media (min-width: @grid-float-breakpoint) {
  }
}


// Navbar toggle
// -------------
.navbar-toggle {
  float: left;
  padding: 0;
  height: 52px;
  line-height: 52px;
  margin: 0;
  border: none;
  width: 40px;

  @media screen and (min-width: @screen-sm) {
    width: 52px;
  }

  // Bars
  .fa-bars {
  }

  // Hide on breakpoint
  @media (min-width: @grid-float-breakpoint) {
    display: none;
  }
}


// Navbar nav links
// ----------------
.navbar-nav {
  margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;

  > li > a {

  }

  // T3 Note: Dropdown Menu styles when collapsed
  // Dropdowns get custom display when collapsed
  @media (max-width: @screen-xs-max) {
    .open .dropdown-menu {
      > li > a,
      .dropdown-header {
      }
      > li > a {

        // Link states
        &:hover,
        &:focus {
        }
      }
    }
  }

  // T3 Note: Main Styles for breakpoint
  // Uncollapse the nav
  @media (min-width: @grid-float-breakpoint) {
    margin: 0;
    > li {
      > a {
      }
    }
  }

  // End
}


// Navbar form
// ------------
.navbar-form {
}


// Dropdown in navbars
// -------------------
// Menu position and menu carets
.navbar-nav > li > .dropdown-menu {
  margin-top: -1px;
}


// Buttons in navbars
// ------------------
.navbar-btn {
}


// Text in navbars
// ---------------
.navbar-text {
}



// Default Navbars (Visual Style only)
// --------------------------------------------------
.navbar-default {
  background: none;
  border: 0;

  .navbar-brand {
    color: @navbar-default-brand-color;
    &:hover,
    &:focus {
      color: @navbar-default-brand-hover-color;
      background-color: @navbar-default-brand-hover-bg;
    }
  }

  .navbar-text {
    color: @navbar-default-color;
  }

  .navbar-nav {
    > li {
      border-right: 1px solid @navbar-default-border;
    }

    > li > a {
      color: @navbar-default-link-color;
      padding: @navbar-padding-vertical @navbar-padding-horizontal;
	  	text-transform: uppercase;

      &:hover,
      &:focus,
      &:active {
        color: @navbar-default-link-hover-color;
        background-color: @navbar-default-link-hover-bg;
        outline: none;
      }
    }

    > li > .nav-header {
      color: @navbar-default-link-color;
      display: inline-block;
      padding-top: @t3-global-padding * 0.75;
      padding-bottom: @t3-global-padding * 0.75;
    }

    > .open > a {
    	border-color: @t3-border-color;
    }

    > .active > a {
      &,
      &:hover,
      &:focus {
        font-weight: @font-weight-bold;
        color: @navbar-default-link-active-color;
        background-color: @navbar-default-link-active-bg;
      }
    }
    > .disabled > a {
      &,
      &:hover,
      &:focus {
        color: @navbar-default-link-disabled-color;
        background-color: @navbar-default-link-disabled-bg;
      }
    }
  }

  .navbar-toggle {
    border-color: @navbar-default-toggle-border-color;
    &:hover,
    &:focus {
      background-color: @navbar-default-toggle-hover-bg;
    }
    .icon-bar {
      background-color: @navbar-default-toggle-icon-bar-bg;
    }
  }

  .navbar-collapse,
  .navbar-form {
    border-color: @navbar-default-border;
  }

  // Dropdown menu items and carets
  .navbar-nav {
    // Caret should match text color on hover
    > .dropdown > a:hover .caret,
    > .dropdown > a:focus .caret {
      border-top-color: @navbar-default-link-hover-color;
      border-bottom-color: @navbar-default-link-hover-color;
    }

    // Remove background color from open dropdown
    > .open > a {
      &,
      &:hover,
      &:focus {
        background-color: @navbar-default-link-active-bg;
        color: @navbar-default-link-active-color;
        .caret {
          border-top-color: @navbar-default-link-active-color;
          border-bottom-color: @navbar-default-link-active-color;
        }
      }
    }

    > .dropdown > a .caret {
        border-top-color: @navbar-default-link-color;
        border-bottom-color: @navbar-default-link-color;
    }


    @media (max-width: @screen-xs-max) {
      // Dropdowns get custom display when collapsed
      .open .dropdown-menu {
        > li > a {
          color: @navbar-default-link-color;
          &:hover,
          &:focus {
            color: @navbar-default-link-hover-color;
            background-color: @navbar-default-link-hover-bg;
          }
        }
        > .active > a {
          &,
          &:hover,
          &:focus {
            color: @navbar-default-link-active-color;
            background-color: @navbar-default-link-active-bg;
          }
        }
        > .disabled > a {
          &,
          &:hover,
          &:focus {
            color: @navbar-default-link-disabled-color;
            background-color: @navbar-default-link-disabled-bg;
          }
        }
      }
    }
  }


  // Links in navbars
  //
  // Add a class to ensure links outside the navbar nav are colored correctly.
  .navbar-link {
    color: @navbar-default-link-color;
    &:hover {
      color: @navbar-default-link-hover-color;
    }
  }

}



// -------------------------------------------------------
//  T3 MAIN MENU
// -------------------------------------------------------
.t3-mainnav {
  border-left: 0;
  border-right: 0;
  margin-bottom: 0;
  border-radius: 0;
  padding-left: 0;
  float: left;
  position: static;

  // Navbar
  // -------
  .t3-navbar {
    padding-left: 0;
    padding-right: 0;

    // Dropdown Menu
    .open .dropdown-menu {
      font-size: @t3-font-size-small;
      padding-top: @t3-global-padding/2;
      padding-bottom: @t3-global-padding/2;


      > li > a,
      .dropdown-header {
        color: @dropdown-link-color;

      }

      > li > a {
        // Link states
        &:hover,
        &:focus {
          color: darken(@gray-dark, 5%);
          background: none;
        }

        &:after {
          border-left-color: @gray-light;
          margin-top: 9px;
        }
      }

      > li.open > a {
        color: @brand-primary;
        background: none;

        &:after {
          border-left-color: @brand-primary;
        }
      }

      > li.active > a {
        color: @brand-primary;
        background: none;

        // Link states
        &:hover,
        &:focus {
          color: @brand-primary;
        }
      }

      img {
        display: none;
      }

    }
  }


  // Collapse Navbar
  // ---------------
  .t3-navbar-collapse {
    background: @gray-darker;
    font-size: @t3-font-size-smaller;
    font-weight: @font-weight-bold;
    position: absolute;
    left: 0;
    width: 100%;
    max-height: 400px;
    overflow: auto;

    // Hide the generated navbar on breakpoint
    @media (min-width: @grid-float-breakpoint) {
      display: none !important;
    }

    // Navbar nav links
    // ----------------
    .navbar-nav {
      margin: 0 -@navbar-padding-horizontal;

      // image

      li a img {
        @media screen and (max-width: @screen-sm-max) {
          display: none;
        }
      }

      //font awesome
      li > a .fa {
        margin-right: 5px;
      }

      > li > a {
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: @gray-light;

        

        &:hover, &:active, &:focus {
          background: @black;
          color: @white;

          .caret {
            border-top-color: @white;
          }
        }
      }

      > li.open > a {
        background: @black;
        color: @white;



      }

      > li.active > a {
        background: @black;
        color: @brand-primary;
      }

      > li:first-child  > a {
        border-top: 0;
      }

      // Dropdown Menu
      .open .dropdown-menu {
        font-size: @t3-font-size-small;
        padding: 5px 10px;

        > li > a,
        .dropdown-header {
        }

        > li > a {
          color: @gray-light;

          &:after {
            border: 4px solid transparent;
            border-top: 4px solid @gray-light;
            margin: 0;
            position: absolute;
            right: 0;
            top: 20px;
          }

          // Link states
          &:hover,
          &:focus {
            background: none;
            color: @white;

            &:after {
              border-top-color: @white;
            }
          }
        }

        > li.open > a {
          color: @white;
          background: none;
        }

        > li.active > a {
          color: @brand-primary;
          background: none;
        }

        > .mega-group > a {
          font-weight: @font-weight-bold;
        }

      }

      .dropdown-submenu .dropdown-menu {
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        font-size: @t3-font-size-smaller - 1;
        margin: 5px 15px 5px 25px;

        li > a {
          color: @gray;
          padding: 5px 0;

          // Link states
          &:hover, &:focus {
            color: @white;
          }
        }
      }

      // Re-Align the caret on right
      .dropdown > a {
        .caret {
          position: absolute;
          top: 40%;
          right: @padding-base-horizontal;
        }
      }
    }

  // End Collapse Navbar
  }

// End
}
