/* ----------------------------------
 * HEADERS: default
 * ---------------------------------- */
section[role="region"] > header:first-child {
  position: relative;
  z-index: 10;
  padding: 0;
  height: 4.5rem;
  color: #fff;
  background: #005466;
  border: none;
}

section[role="region"] > header:first-child h1 {
  font-size: 2.5rem;
  line-height: 4.9rem;
  text-align: left;
  color: #00ff99;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  overflow: hidden;
  margin: 0;
  padding: 0 1rem 0 3rem;
  height: 100%;
  font-weight: normal;
}

section[role="region"] > header:first-child h1 em {
  border-radius: 0.8rem;
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1.8rem;
  font-weight: bold;
  font-size: 1.2rem;
  font-style: normal;
  background: #00ff99;
  color: #005466;
  display: inline-block;
  text-align: center;
  position: absolute;
  top: 0.7rem;
  left: 1.8rem;
}

section[role="region"] > header:first-child form {
  display: block;
  margin: 0 1rem 0 3.5rem;
  overflow: hidden;
  position: relative;
}

section[role="region"] > header:first-child input[type="text"] {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  height: 4.5rem;
  line-height: 4.5rem;
  width: 100%;
  padding: 0 1.2rem;
  -moz-box-sizing: border-box;
  width: 100%;
  box-shadow: none;
  border-radius: 0;
}

section[role="region"] > header:first-child form button[type="reset"] {
  font-size: 0;
  overflow: hidden;
  position: absolute;
  right: 1rem;
  top: 1rem;
  bottom: 0;
  width: 3rem;
  height: auto;
  margin: 0;
  display: none;
  border: none;
  background: url(headers/images/icons/clear.png) no-repeat center center / 1.7rem auto;
}

section[role="region"] > header:first-child input[type="text"]:valid + button[type="reset"] {
  display: block;
}

section[role="region"] > header:first-child input[type="text"]::-moz-placeholder {
  opacity: 0.35;
}

/* Generic set of actions in toolbar */
section[role="region"] > header:first-child menu[type="toolbar"] {
  height: 100%;
  float: right;
}

section[role="region"] > header:first-child menu[type="toolbar"] a,
section[role="region"] > header:first-child menu[type="toolbar"] button {
  -moz-box-sizing: border-box;
  position: relative;
  float: left;
  width: auto;
  min-width: 5rem;
  height: 4.4rem;
  margin-bottom: 0;
  padding: 0 1rem;
  border-radius: 0;
  line-height: 4.4rem;
  background: none;
  text-align: center;
  text-shadow: none;
  z-index: 5;
}

section[role="region"] > header:first-child menu[type="toolbar"] {
  padding: 0;
  margin: 0;
}

section[role="region"] > header:first-child a,
section[role="region"] > header:first-child button {
  border: none;
  padding: 0;
  overflow: hidden;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.1em;
  color: #fff;
  border-radius: 0;
  text-decoration: none;
}

/* Pressed state */
section[role="region"] > header:first-child a::-moz-focus-inner,
section[role="region"] > header:first-child button::-moz-focus-inner,
section[role="region"] > header:first-child a:active,
section[role="region"] > header:first-child button:active,
section[role="region"] > header:first-child a:focus,
section[role="region"] > header:first-child button:focus {
  outline: none !important;
  border: none !important;
}

section[role="region"] > header:first-child > a:active:after,
section[role="region"] > header:first-child > button:active:after,
section[role="region"] > header:first-child menu[type="toolbar"] a:active,
section[role="region"] > header:first-child menu[type="toolbar"] button:active  {
  background: rgba(0,0,0,0.3) !important;
}

/* Disabled state */
section[role="region"] > header:first-child menu[type="toolbar"] a[aria-disabled="true"],
section[role="region"] > header:first-child menu[type="toolbar"] button[disabled]  {
  opacity: 0.5;
  pointer-events: none
}

/* Icon definitions */
section[role="region"] > header:first-child .icon {
  height: 4.4rem;
  font-size: 0;
  display: block;
}

section[role="region"] > header:first-child .icon:before {
  left: 1rem;
  top: 0.7rem;
}

section[role="region"] > header:first-child > button.icon:before,
section[role="region"] > header:first-child > a.icon:before {
  color: rgba(255,255,255,0.5);
  left: 0;
}

/* Navigation links (back, cancel, etc) */
section[role="region"] > header:first-child > button,
section[role="region"] > header:first-child > a {
  position: relative;
  width: 5rem;
  height: 4.4rem;
  background: none;
  float: left;
  overflow: visible;
  margin: 0 -3.5rem 0 0;
}

section[role="region"] > header:first-child > button:after,
section[role="region"] > header:first-child > a:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  width: 3.5rem;
  height: 100%;
  background: rgba(0,0,0,0.05);
}

/* ----------------------------------
 * HEADERS: subheader
 * ---------------------------------- */

section[role="region"] > header {
  z-index: 0;
  height: auto;
}

section[role="region"] > header:after {
  display: none;
}

section[role="region"] header h2 {
  margin: 0;
  padding: 0.8rem 3rem;
  color: #424242;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.8rem;
  border-bottom: solid 0.1rem #e6e6e6;
}

/* ----------------------------------
 * Theme: A
 * ---------------------------------- */

.theme-A section[role="region"] > header:first-child {
  background: #009966;
}

.theme-A section[role="region"] > header:first-child h1 {
  color: #fff;
}

.theme-A section[role="region"] > header:first-child h1 em {
  color: #009966;
  background: #fff;
}

/*.theme-A section[role="region"] > header:first-child menu[type="toolbar"] a, 
.theme-A section[role="region"] > header:first-child menu[type="toolbar"] button {
  color: #80cc33;
}*/

/* ----------------------------------
 * Theme: B
 * ---------------------------------- */

.theme-B section[role="region"] > header:first-child {
  background: #ff6633;
}

.theme-B section[role="region"] > header:first-child h1 {
  color: #fff;
}

.theme-B section[role="region"] > header:first-child h1 em {
  color: #ff6633;
  background: #fff;
}

/*.theme-B section[role="region"] > header:first-child menu[type="toolbar"] a, 
.theme-B section[role="region"] > header:first-child menu[type="toolbar"] button {
  color: #ffb319;
}*/

/* ----------------------------------
 * Theme: C
 * ---------------------------------- */

.theme-C section[role="region"] > header:first-child {
  background: #00c5d9;
}

.theme-C section[role="region"] > header:first-child h1 {
  color: #fff;
}

.theme-C section[role="region"] > header:first-child h1 em {
  color: #00c5d9;
  background: #fff;
}

/*.theme-C section[role="region"] > header:first-child menu[type="toolbar"] a, 
.theme-C section[role="region"] > header:first-child menu[type="toolbar"] button {
  color: #fff;
}*/

/* ----------------------------------
 * HEADERS: right-to-left tweaks
 * ---------------------------------- */

/*html[dir="rtl"] section[role="region"] > header:first-child h1 {
  text-align: right;
  margin: 0 3rem 0 0;
}

html[dir="rtl"] section[role="region"] > header:first-child button,
html[dir="rtl"] section[role="region"] > header:first-child a {
  left: inherit;
  right: 0;
}

html[dir="rtl"] section[role="region"] > header:first-child > button .icon,
html[dir="rtl"] section[role="region"] > header:first-child > a .icon {
  margin-left: 0;
  margin-right: -2rem;
}

html[dir="rtl"] section[role="region"] > header:first-child > button .icon:after,
html[dir="rtl"] section[role="region"] > header:first-child > a .icon:after {
  left: inherit;
  right: 0;
}

html[dir="rtl"] section[role="region"] > header:first-child .icon.icon-back {
  background-image: url(headers/images/icons/back-rtl.png);
}*/
