/*
 * The following styles are for the large-screen horizontal navigation menu.
 * Through javascript the 'main' <ul> tag will then be assigned class 'rmlmenu'.
 */

.rmlmenu {
  float: right;
  margin: 0;
  padding: 0;
}

.rmlmenu li {
  display: inline-block;
  position: relative;
  line-height: 1.5em;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  margin-bottom: 0;
  margin-left: 2px; /* The left margin of any (except the first) top menuitem */
}
.rmlmenu li:first-child {
  margin-left:0;
}
.rmlmenu li.rmlmenu-margin-xl {
  margin-left: 150px;
}
.rmlmenu li a {
  text-decoration: none;
  padding: 16px 10px 16px 10px;
  display: block;
  -webkit-transition: all 0.2s ease-in-out 0s;
  -moz-transition: all 0.2s ease-in-out 0s;
  -o-transition: all 0.2s ease-in-out 0s;
  transition: all 0.2s ease-in-out 0s;
  color: #162e5a; /* The text color of any menuitem that is not selected */
  font-size: 1.2em; /* The size of the text of the top menuitems */
  font-weight: 200;
}
.rmlmenu li a:hover,
.rmlmenu li:hover > a,
.rmlmenu li.hover > a {
  /* Style when one hovers over a top menuitem */
  font-weight: 200;
  color: #fff;
  /*background: #497981;*/
  background: #555;
}
.rmlmenu ul {
  display: none;
  margin: 0;
  padding: 0;
  width: 170px; /* Width of a submenu popup */
  position: absolute;
  top: 53px; /* Top position of 1st level submenu (should match with height of {rmlmenu li a} */
  left: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #c0c0c0;  
}
.rmlmenu ul li {
  display:block;
  float:none;
  background:none;
  margin: 0;
  padding: 0;
}
.rmlmenu ul li a {
  /* All child menuitems that are not selected */
  display: block;
  background: #f3f6f7;
  color: #162e5a;
  font-size: 0.95em;
  border-top: 1px solid #c0c0c0; 
  border-left: 1px solid #c0c0c0; 
  border-right: 1px solid #c0c0c0; 
}
.rmlmenu ul li a:not(:only-child) {
  /* All child menuitems with submenu(s) that are not selected */
  background: #f3f6f7 url(images/light-gray-arrow-right.png) no-repeat right center;
}
.rmlmenu ul li a:hover,
.rmlmenu ul li:hover > a,
.rmlmenu ul li.hover > a
{
  color: #fff;
  /*background: #497981;*/
  background: #888;
}
.rmlmenu ul li:hover > a:not(:only-child),
.rmlmenu ul li.hover > a:not(:only-child) {
  color: #fff;
  background: #497981 url(images/white-arrow-right.png) no-repeat right center;
}
.rmlmenu li:hover > ul,
.rmlmenu li.hover > ul {
  display:block;
}
.rmlmenu ul ul {
  left: 169px; /* Left position of 2nd-level popup in relation to 1st-level */
  top: 0;
}

/*
 * The following styles are used when the navigation menu is reduced to a popup menu.
 * Through javascript the navigation container is assigned class 'rmlPopupPanel' and the
 * main <ul> tag is assigned class 'rmlpopupmenu'.
 */
.rmlPopupPanel {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  height: 100%;
  /* The background color and possible border of the whole popup: */
  background: #383838;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.rmlPopupPanel h3 {
  height: 54px;
  margin: 0;
  padding: 13px 15px 0px 15px;
  font-family: 'Ubuntu', sans-serif;
  font-weight: 300;
  font-size: 1.4em;
  /* The background color, text color and possible bottom border of the top 'Menu' titel */
  background: #497981;
  color: #fff; 
  border-bottom: 1px solid #686868;
}

.rmlMenuText {
}

.rmlpopupmenu {
  display: block;
  margin: 0;
  padding: 0;
  /* The width of the popup */
  width: 260px;
}
.rmlpopupmenu li {
  margin: 0;
  -webkit-tap-highlight-color:rgba(0,0,0,0);
}
.rmlpopupmenu li ul {
  margin: 0;
  padding: 0;
}
.rmlpopupmenu li a {
  display: block;
  text-decoration: none;
  padding: 13px 13px 13px 15px;
  /* The text color, background color and bottom border of any popup menuitem that is not selected */
  color: #fff;
  font-family: 'Ubuntu', sans-serif;
  font-weight: 300;
  font-size: 1.1em;
  background: #383838;
  border-bottom: 1px solid #686868;
}
.rmlpopupmenu li a:not(:only-child) {
  /* The color here must match with the background color before */
  background: #383838 url(images/arrow-right.png) no-repeat right center;
}
.rmlpopupmenu li.rmlm-back a {
  /* The background color, text color and possible bottom border of a 'Back' popup menuitem */
  background: #101010;
  color: #fff; 
  border-bottom: 1px solid #606060;
}
.no-touch .rmlpopupmenu li:hover > a,
.rmlpopupmenu li.touchStart > a {
   /* The background color and text color of a popup menuitem when hovering over it */
  color: #fff; 
  background: #707070;
}
.no-touch .rmlpopupmenu li:hover > a:not(:only-child),
.rmlpopupmenu li.touchStart > a:not(:only-child) {
  /* The color here must match with the background color before */
  background: #707070 url(images/arrow-right.png) no-repeat right center;
}
.rmlpopupmenu ul li {
  display: none;
}
/* 
When a submenu is opened, we will hide all li siblings.
For that we give a class to the parent menu called "dl-subview".
We also hide the submenu link. 
The opened submenu will get the class "dl-subviewopen".
All this is done for any sub-level being entered.
*/
.rmlpopupmenu.dl-subview li,
.rmlpopupmenu.dl-subview li.dl-subviewopen > a,
.rmlpopupmenu.dl-subview li.dl-subview > a {
	display: none;
}

.rmlpopupmenu.dl-subview li.dl-subview,
.rmlpopupmenu.dl-subview li.dl-subview ul,
.rmlpopupmenu.dl-subview li.dl-subviewopen,
.rmlpopupmenu.dl-subview li.dl-subviewopen > ul,
.rmlpopupmenu.dl-subview li.dl-subviewopen > ul > li {
	display: block;
}

/*
 * The following styles handle a default popup menu button that is constructed using 3 'block' spans
 * to show a 'hamburger' style menu button
 */
.rmlpopupmenu-button {
  display: none;
  float: right;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.rmlpopupmenu-button span {
  color: #ffffff;
  font-size: 2.9em;
  display: block;
  padding: 10px 10px 14px 10px;
  width: 60px;
}
.no-touch .rmlpopupmenu-button span:hover {
}
.rmlpopupmenu-button span span {
  padding: 0;
  width: 40px;
  height: 6px;
  margin: 4px 0 0 0;
  float: none;
  background: #333333;
}

/*
 * The following styles handle a popup menu button that contains text
 */
.rmlpopupmenuButtonText {
  margin: 10px 0 0 0;
  padding: 0.6em 0.8em 0.7em 0.8em;
  line-height: 1.0em;
  font-family: "Ubuntu", sans-serif;
  color: #fff;
  background: #333; 
  vertical-align: top;
  border: none;
  text-align: center;
  font-weight: normal; 
  cursor: pointer;
}
.rmlpopupmenuButtonText:hover,
.rmlpopupmenuButtonText.touchStart
{
  color: #fff;
  background: #497981;
}


/*
 * Popup menu is enabled on small screens
 */
@media only screen {
  .rmlmenu {
    display: none;
  }
  .rmlpopupmenuButton,
  .rmlpopupmenuButtonText {
    display: block;
  }
}
/*
 * Full menu is enabled on screens of 1024 pixels and higher
 */
@media only screen and (min-width: 64em) {
  .rmlmenu {
    display: block;
  }
  .rmlpopupmenuButton,
  .rmlpopupmenuButtonText {
    display: none;
  }
}
