/* ----------------------------------
 * HEADERS: default
 * ---------------------------------- */

body[role="application"] section[role="region"] > header > button,
body[role="application"] section[role="region"] > header > a {
  width: 6rem;
}

body[role="application"] section[role="region"] > header > a .icon.icon-menu,
body[role="application"] section[role="region"] > header > button .icon.icon-menu {
  background-position: center center;
}

body[role="application"] section[role="region"] > header > button .icon:after,
body[role="application"] section[role="region"] > header > a .icon:after {
  width: 4rem;
}

body[role="application"] section[role="region"] > header > button,
body[role="application"] section[role="region"] > header > a {
  background-position: 4rem center;
}

body[role="application"] section[role="region"] > header h1 {
  margin-left: 5rem;
}

section[role="region"] > header:first-child {
  position: relative;
  z-index: 10;
  padding: 0;
  height: 5rem;
  color: #fff;
  background: url(../images/ui/headers/header.png) repeat-x 0 0;
  background-size: auto 100%;
  border: none;
}

section[role="region"] > header:first-child:after {
  content: "";
  display: block;
  height: 0.3rem;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: url(../images/ui/headers/shadow.png) repeat-x 0 0;
  background-size: auto 100%;
}

section[role="region"] > header:first-child h1 {
  font: 2.2rem/4.8rem "Open Sans", Sans-serif;
  text-align: left;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  overflow: hidden;
  margin: 0 0 0 3rem;
  height: 100%
}

section[role="region"] > header:first-child h1 em {
  font: bold 1.5rem/1em "Open Sans", Sans-serif;
}

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

section[role="region"] > header:first-child input[type=text] {
  width: 100%;
  height: 3rem;
  
  box-sizing: border-box;
  -moz-box-sizing: border-box;	/* Firefox */
  
  padding: 0 0.8rem;
  border: solid 0.1rem #9d4123;
  border-top-color: #a6501e;
  border-radius: 0.3rem;
  background: #fff url(../images/ui/headers/shadow.png) repeat-x left -0.1rem;
  font: 1.35rem/3em "Open Sans", Sans-serif;
  box-shadow: none;
}

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(../images/icons/clear.png) no-repeat center center;
}

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

/* 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 {
  height: 5rem;
  min-width: 5rem;
  width: auto;
  margin-bottom: 0;
  border-radius: 0;
  line-height: 5rem;
  float: left;
  background: none;
  padding: 0 1.75rem;
  
  box-sizing: border-box;
  -moz-box-sizing: border-box;	/* Firefox */
  
  text-align: center;
  text-shadow: none;
  position: relative;
  z-index: 5;
}

section[role="region"] > header:first-child menu[type="toolbar"] a:last-child,
section[role="region"] > header:first-child menu[type="toolbar"] button:last-child {
  background: url(../images/ui/headers/separator.png) no-repeat left center;
  margin-left: -0.2rem;
  z-index: 1;
}

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;
  background: none;
  padding: 0;
  overflow: hidden;
  font: 600 1.4rem/1.1em "Open Sans", Sans-serif;
  color: #fff;
  border-radius: 0;
}


/* 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:not([aria-disabled="true"]):active .icon:after,
section[role="region"] > header:first-child button:not(:disabled):active .icon:after,
section[role="region"] > header:first-child menu[type="toolbar"] a:not([aria-disabled="true"]):active,
section[role="region"] > header:first-child menu[type="toolbar"] button:not(:disabled):active  {
  background: #008aaa !important;
  transition: background 0.2s ease;
  border-bottom: solid 0.1rem rgba(0, 0, 0, 0.2) !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;
}

section[role="region"] > header:first-child a:first-letter,
section[role="region"] > header:first-child button:first-letter {
  text-transform: uppercase;
}

/* Icon definitions */
section[role="region"] > header:first-child .icon {
  display: inline-block;
  vertical-align: top;
  float: none;
  width: 3rem;
  height: 3rem;
  margin: 0 -1rem;
  background: transparent no-repeat center center;
  font-size: 0;
  overflow: hidden;
  position: relative;
  height: 4.9rem;
}

section[role="region"] > header:first-child .icon.icon-add {
  background-image: url(../images/icons/add.png);
}

section[role="region"] > header:first-child .icon.icon-edit {
  background-image: url(../images/icons/edit.png);
}

section[role="region"] > header:first-child .icon.icon-close {
  background-image: url(../images/icons/close.png);
}

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

section[role="region"] > header:first-child .icon.icon-menu {
  background-image: url(../images/icons/menu.png);
}

section[role="region"] > header:first-child .icon.icon-user {
  background-image: url(../images/icons/user.png);
}

/* Navigation links (back, cancel, etc) */
section[role="region"] > header:first-child > button,
section[role="region"] > header:first-child > a {
  position: absolute;
  left: 0;
  width: 4rem;
  height: 5rem;
  background: url(../images/ui/headers/separator-large.png) no-repeat 2rem center;
  overflow: hidden;
  text-align: center;
}

section[role="region"] > header:first-child > button .icon,
section[role="region"] > header:first-child > a .icon {
  overflow: visible;
  font-size: 0;
  position: static;
  margin-left: -3rem;
  height: 4.9rem;
}

section[role="region"] > header:first-child > button .icon:after,
section[role="region"] > header:first-child > a .icon:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  width: 2rem;
  height: 4.9rem;
  background: #9d3d26 url(../images/ui/headers/negative.png) repeat-x 0 0;
}

section[role="region"] > header > a .icon.icon-menu,
section[role="region"] > header > button .icon.icon-menu {
  background-position: -1rem center;
}

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

section[role="region"] > header {
  background: url(../images/ui/headers/subheader.png) repeat left bottom;
  border-bottom: solid 0.1rem #e6e6e6;
  z-index: 0;
  padding: 0.4rem 0;
  height: auto;
  color: #424242;
}

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

section[role="region"] > header h2 {
  font-family: "Open Sans", Sans-serif;
  font-weight: 600;
  margin: 0 3rem;
  font-size: 1.3rem;
  line-height: 1.8rem;
}

/* ----------------------------------
 * HEADERS: dark
 * ---------------------------------- */
section[role="region"].skin-dark > header:first-child,
.skin-dark section[role="region"] > header:first-child {
  background: url(../images/ui/headers/dark/header.png) repeat-x 0 0;
}

/* Navigation links (back, cancel, etc) */
section[role="region"].skin-dark > header:first-child > a .icon:after,
.skin-dark section[role="region"] > header:first-child > a .icon:after,
section[role="region"].skin-dark > header:first-child > button .icon:after,
.skin-dark section[role="region"] > header:first-child > button .icon:after {
  background: #26272c url(../images/ui/headers/dark/negative.png) repeat-x 0 0;
}

section[role="region"].skin-dark > header:first-child menu[type="toolbar"] a:last-child,
.skin-dark section[role="region"] > header:first-child menu[type="toolbar"] a:last-child,
section[role="region"].skin-dark > header:first-child menu[type="toolbar"] button:last-child,
.skin-dark section[role="region"] > header:first-child menu[type="toolbar"] button:last-child {
  background-image: url(../images/ui/headers/dark/separator.png);
}

section[role="region"].skin-dark > header,
.skin-dark section[role="region"] > header {
  background: #7f7f7f url(../images/ui/headers/dark/subheader.png) repeat-x left bottom;
  color: #c5c5c5;
}

/* ----------------------------------
 * HEADERS: organic
 * ---------------------------------- */

section[role="region"].skin-organic > header:first-child,
.skin-organic section[role="region"] > header:first-child {
  background: url(../images/ui/headers/organic/header.png) repeat-x 0 0,  url(../images/ui/headers/organic/pattern.png) repeat 0 0;
}

section[role="region"].skin-organic > header:first-child:after,
.skin-organic section[role="region"] > header:first-child:after {
  margin-top: -0.1rem;
}

/* Navigation links (back, cancel, etc) */
section[role="region"].skin-organic > header:first-child > a .icon:after,
.skin-organic section[role="region"] > header:first-child > a .icon:after,
section[role="region"].skin-organic > header:first-child > button .icon:after,
.skin-organic section[role="region"] > header > button .icon:after {
  background: url(../images/ui/headers/organic/negative.png) repeat-x 0 0;
}

section[role="region"].skin-organic > header:first-child menu[type="toolbar"] a:last-child,
.skin-organic section[role="region"] > header:first-child menu[type="toolbar"] a:last-child,
section[role="region"].skin-organic > header:first-child menu[type="toolbar"] button:last-child,
.skin-organic section[role="region"] > header:first-child menu[type="toolbar"] button:last-child {
  background-image: url(../images/ui/headers/organic/separator.png);
}

section[role="region"].skin-organic > header,
.skin-organic section[role="region"] > header {
  background: #7f7f7f url(../images/ui/headers/organic/subheader.png) repeat-x left bottom;
  color: #fff;
}