/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* Overall */
body {
  padding-top: 51px !important;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  background-color: #f9f9fb;
}

body #content {
  line-height: 1.6; /* Inspired by Github's wiki style */
}

pre {
  font-family: "Menlo", "Lucida Console", monospace;
}

code {
  font-family: "Menlo", "Lucida Console", monospace;
  border: none;
  padding: 0;
  color: #444444;
  background-color: #f9f9fb;
  font-size: 85%;
}

a code {
  color: #FF7032;
}

a:hover code {
  color: #d74108;
  text-decoration: none;
}

.navbar .projecttitle > a:hover, .navbar .projecttitle > a:focus {
  color: #FFF
}

.container {
  max-width: 914px;
}

#content {
  margin-top: 30px;
  margin-bottom: 50px;
  color: #363f3f;
}

h1, h2, h3, h4, h5, h6 {
  font-size: 2em;
  line-height: 1.3em;
  font-weight: 700;
  margin-bottom: 0.5em;
}

pre {
  background-color: #FFF
}
/* Branding */
.brand {
  font-weight: normal !important;
  padding-top: 0px;
  padding-bottom: 0px;
  max-width: 75%;
}

img.logo {
  height: 31px;
  width: 32px;
  margin-right: 10px;
  display: none;
  margin-top: 10px;
  margin-left: 10px;
}

/* Navigation Bar */
.navbar {
  background-color: rgba(0, 0, 0, 0.9);
  height: 68px;
}

.navbar-brand {
  font-size: 20px;
}

.navbar-brand.brand.projecttitle {
  padding-top: 7px;
}

.navbar-right {
  height: 100%;
}

.navbar-collapse.collapse {
  height: 67px !important;
}

.navbar-header {
  padding-top: 10px;
}

.navbar .container {
  background-image: none;
}

.navbar .divider-vertical {
  border-right-color: lightgray;
}

.navbar-text .version-text {
  color: #555555;
}

.navbar .version {
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  line-height: 20px;
  margin: 0;
  padding: 0 0 0 2px;
  vertical-align: bottom;
}

.navbar .projecttitle {
  margin-top: 7px;
  height: 40px;
  white-space: nowrap;
}

.navbar .projectlogo {
  width: 75px;
}

/* Dropdown menu */
.dropdown-menu {
  /* Remove the default 2px top margin which causes a small
    gap between the hover trigger area and the popup menu */
  margin-top: 0;
  /* Avoid too much whitespace at the right for shorter menu items */
  min-width: 50px;
}

/**
 * Made the active tab caption blue. Otherwise the active tab is black, and inactive tab is blue.
 * That looks weird. Changed the colors to active - blue, inactive - black, and
 * no color change on hover.
 */
.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
  color: #08c;
}

.nav-tabs > li > a, .nav-tabs > li > a:hover {
  color: #333;
}

/**
 * MathJax (embedded latex formulas)
 */
.MathJax .mo { color: inherit }
.MathJax .mi { color: inherit }
.MathJax .mf { color: inherit }
.MathJax .mh { color: inherit }

/**
 * AnchorJS (anchor links when hovering over headers)
 */
a.anchorjs-link:hover { text-decoration: none; }

table td, table th {
  border: 1px solid #333;
  padding: 0 .5em;
}

table th {
  background: #CCC;
  padding: 0 .5em;
}

table {
  margin-bottom: 20px;
}

.grayboldcell {
  background: #CCC;
  font-weight: bold;
}

.centerboldcell {
  text-align: center;
  font-weight: bold;
}

.boldcell {
  font-weight: bold;
}

.lightgreen {
  background: #bfffba;
}

.lightred {
  background: #ff7b7b;
}

.navbar a, .navbar .nav > li > a {
  font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
  font-style: normal;
  text-shadow: none;
  color: #FFF;
  height: 100% !important;
  padding-top: 25px;
}

.navbar a:hover {
  text-decoration: none;
}

.navbar .nav > li > a:focus, .navbar .nav > li > a:hover {
  background-color: #ff5003;
  color: #FFF;
}

.navbar .nav > li {
  height: 100%;
}

.dropdown-menu a {
  color: #FFF !important;
}

.dropdown-menu b {
  color: #FFF !important;
  margin-left: 0.5em;
}

.dropdown-menu li > a:focus, .dropdown-menu li > a:hover {
  background-color: #ff5003;
  background-image: none;
  font-color: red;
}

a {
  color: #FF7032;
}

a:focus, a:hover {
  color: #d74108;
  text-decoration: none;
}

#trademark {
    font-size: 0.5em;
    font-weight: 300;
    vertical-align: middle;
}

/* Media queries */
@media only screen and (max-device-width: 768px) and (orientation : landscape) {
  /* landscape mobile */
  img.logo {
    display: inline;
  }
}

@media only screen and (min-device-width: 768px) {
  /* >= tablet */
  img.logo {
    display: inline;
  }

  .brand {
    max-width: initial;
  }

  .dropdown-menu a {
    color: #333 !important;
  }

  .dropdown-menu a:hover {
    color: #FFF !important;
    transition: all 0.2s ease-in-out 0s;
  }

  .dropdown-menu b {
    color: #333 !important;
  }
}

@media only screen and (min-device-width: 1024px) {
  /* Desktop */

  /**
   * Make dropdown menus in nav bars show on hover instead of click
   * using solution at http://stackoverflow.com/questions/8878033/how-
   * to-make-twitter-bootstrap-menu-dropdown-on-hover-rather-than-click
   **/
  ul.nav li.dropdown:hover ul.dropdown-menu{
    display: block;
  }

  a.menu:after, .dropdown-toggle:after {
    content: none;
  }

  /** Make the submenus open on hover on the parent menu item */
  ul.nav li.dropdown ul.dropdown-menu li.dropdown-submenu:hover ul.dropdown-menu {
    display: block;
  }

  /** Make the submenus be invisible until the parent menu item is hovered upon */
  ul.nav li.dropdown ul.dropdown-menu li.dropdown-submenu ul.dropdown-menu {
    display: none;
  }

  /**
   * Made the navigation bar buttons not grey out when clicked.
   * Essentially making nav bar buttons not react to clicks, only hover events.
   */
  .navbar .nav li.dropdown.open > .dropdown-toggle {
    background-color: transparent;
  }
}
