body{
  margin: 0;
  font-family: 'Open Sans';
  background: #fff;
}

select {
  padding: 0.3rem;
  font: 1.4rem/4rem "Open Sans",Sans-serif;
  width: 100%;
  text-overflow: ellipsis;
}

form {
  margin-top: 1rem;
  padding: 0.5em;
}

.separator {
  font: 1.4rem "Open Sans",Sans-serif;
  text-align: center;
  margin: .5rem;
}


form > button[type=submit] {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ----------------------------------
 * HEADERS: default
 * ---------------------------------- */
section[role="region"] > header:first-child {
  position: relative;
  z-index: 10;
  padding: 0;
  height: 3.5rem;
  color: #fff;
  background: url(headers/images/ui/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(headers/images/ui/shadow.png) repeat-x 0 0;
  background-size: auto 100%;
}

section[role="region"] > header:first-child h1 {
  font: 1.6rem/3rem "Open Sans", Sans-serif;
  text-align: left;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  overflow: hidden;
  margin: 0 0 0 1rem;
  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;
  -moz-box-sizing: border-box;
  padding: 0 0.8rem;
  border: solid 0.1rem #9d4123;
  border-top-color: #a6501e;
  border-radius: 0.3rem;
  background: #fff url(headers/images/ui/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(headers/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: 3.5rem;
  min-width: 3rem;
  width: auto;
  margin-bottom: 0;
  border-radius: 0;
  line-height: 5rem;
  float: left;
  background: none;
  padding: 0 1.75rem;
  -moz-box-sizing: border-box;
  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(headers/images/ui/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 -3rem;
  background: transparent no-repeat center center;
  font-size: 0;
  overflow: hidden;
  position: relative;
  height: 3.5rem;
}

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

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

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

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

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

section[role="region"] > header:first-child .icon.icon-user {
  background-image: url(headers/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(headers/images/ui/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(headers/images/ui/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(headers/images/ui/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(headers/images/ui/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(headers/images/ui/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(headers/images/ui/dark/separator.png);
}

section[role="region"].skin-dark > header,
.skin-dark section[role="region"] > header {
  background: #7f7f7f url(headers/images/ui/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(headers/images/ui/organic/header.png) repeat-x 0 0,  url(headers/images/ui/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(headers/images/ui/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(headers/images/ui/organic/separator.png);
}

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

/* ----------------------------------
 * Buttons
 * ---------------------------------- */

button::-moz-focus-inner {
  border: none;
  outline: none;
}

button,
a[role="button"] {
  width: 100%;
  height: 3.8rem;
  margin: 0 0 1rem;
  padding: 0 1.5rem;
  -moz-box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background: #fafafa url(buttons/images/ui/default.png) repeat-x left bottom;
  border: 0.1rem solid #9f9f9f;
  border-radius: 0.3rem;
  font-size: 1.6rem;
  font-family: 'Open Sans', Sans-serif;
  font-weight: 600;
  line-height: 3.8rem;
  color: #333;
  text-align: center;
  text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,0.3);
  text-decoration: none;
  outline: none;
}

/* Press (default & recommend) */
button:active,
a[role="button"]:active,
button.recommend:active,
a.recommend[role="button"]:active  {
  border-color: #008aaa;
  background: #008aaa;
  color: #333;
}

/* Recommend */
button.recommend,
a[role="button"].recommend {
  background-image: url(buttons/images/ui/recommend.png);
  background-color: #00caf2;
  border-color: #00acce;
}

/* Danger */
button.danger,
a.danger[role="button"] {
  background-image: url(buttons/images/ui/danger.png);
  background-color: #b70404;
  color: #fff;
  text-shadow: -0.1rem -0.1rem 0 #830b0b;
  border: none;
}

/* Danger Press */
button.danger:active,
a[role="button"].danger:active {
  background-image: url(buttons/images/ui/danger-press.png);
  background-color: #890707;
}

/* Disabled (default & recommend) */
button[disabled],
a[role="button"][aria-disabled="true"],
button[disabled].recommend,
a[role="button"][aria-disabled="true"].recommend {
  background-image: url(buttons/images/ui/disabled.png);
  background-color: transparent;
  border-color: #dadada;
  color: #bcbcbc;
  pointer-events: none;
}

/* Danger disabled */
button[disabled].danger,
a[role="button"][aria-disabled="true"].danger {
  background-image: url(buttons/images/ui/danger-disabled.png);
  color: #fff;
  text-shadow: none;
  pointer-events: none;
}

/* ----------------------------------
* Input areas
* ---------------------------------- */
input:not([type="radio"]),
input:not([type="checkbox"]),
input:not([type="hidden"]),
textarea {
  width: 100%;
  height: 4rem;
  display: block;
  overflow: hidden;
  resize: none;
  -moz-box-sizing: border-box;
  padding: 0 0.8rem;
  font: 1.4rem/4rem "Open Sans", Sans-serif;
  border: 0.1rem solid rgba(0,0,0,.2);
  border-radius: 0.3rem;
  box-shadow: none;
  background: #fff url(input_areas/images/ui/shadow.png) repeat-x left top;
}

input:not([type="radio"]):-moz-placeholder,
input:not([type="checkbox"]):-moz-placeholder,
input:not([type="hidden"]):-moz-placeholder,
textarea:-moz-placeholder {
  color: #666;
}

form p {
  display: block;
  position: relative;
  margin: 0;
}

form p + p {
  margin-top: 1rem;
}

form p input + button[type="reset"],
form p textarea + button[type="reset"] {
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  margin: -1.7rem 0 0;
  font: 0/0 a;
  border: none;
  position: absolute;
  right: 0rem;
  top: 50%;
  background: url(input_areas/images/icons/clear.png) no-repeat center center;
  opacity: 0;
  pointer-events: none;
}

form p input:valid + button[type="reset"],
form p textarea:valid + button[type="reset"] {
  opacity: 1;
  pointer-events: all;
}

/* Fieldset */
fieldset {
  background: #fff url(input_areas/images/ui/shadow.png) repeat-x left top;
  border-radius: 0.3rem;
  border: none;
  font: 1.4rem/1em "Open Sans", Sans-serif;
  padding: 0;
  overflow: hidden;
}

fieldset  + fieldset {
  margin-top: 1.5rem;
}

fieldset legend {
  -moz-box-sizing: border-box;
  display: inline;
  float: left;
  position: relative;
  text-transform: uppercase;
  position: relative;
  padding: 1.2rem 0.5rem 1.2rem 1.4rem;
  width: 9.5rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  color: #333;
  text-transform: uppercase;
}

fieldset legend.action {
  position: relative;
}

fieldset legend.action:after {
  content: "";
  width: 0;
  height: 0;
  border: solid 0.4rem transparent;
  border-top-color: #333;
  position: absolute;
  top: 1.8rem;
  margin-left: 0.5rem;
}

fieldset section input:not([type="radio"]),
fieldset section input:not([type="checkbox"]),
fieldset section input:not([type="hidden"]),
fieldset section textarea {
  border-radius: 0;
  border: none;
  background: none;
  font-weight: 600;
  height: 3.8rem;
}

fieldset section {
  border-left: 1px solid #DDD;
  border-radius: 0 0.3rem 0.3rem 0;
  display: block;
  overflow: hidden;
}

fieldset section p {
  border-bottom: 1px solid #DDD;
  margin: 0;
}

fieldset section p:last-child {
  border-bottom: medium none;
}

/* Tidy (search/submit) */
form[role="search"] {
  background: #e8e8e8 url(input_areas/images/ui/background.png) repeat-x left bottom;
  height: 3.7rem;
  position: relative;
}

form[role="search"].full p {
  width: 100%;
  background: none;
}

form[role="search"].full button[type="submit"] {
  position: absolute;
  left: 100%;
  top: 0;
  width: 0;
  font-size: 0;
}

form[role="search"]:after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.3rem;
  background: url(input_areas/images/ui/shadow-search.png) repeat-x left top;
}

form[role="search"].bottom:after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: -0.3rem;
  height: 0.3rem;
  background: url(input_areas/images/ui/shadow-invert.png) repeat-x left bottom;
}

form[role="search"] p {
  display: block;
  overflow: hidden;
  -moz-box-sizing: border-box;
  padding: 0.3rem 1.2rem;
}

form[role="search"] p input {
  height: 3rem;
  width: 100%;
  padding-right: 3rem;
  border: 0.1rem solid rgba(0,0,0,.33);
  background: #fff url(input_areas/images/ui/shadow-search.png) repeat-x left top;
}

form[role="search"] p input:focus {
  border-color: rgba(0,0,0,.33);
}

form[role="search"] p button[type="reset"] {
  right: 1rem;
}

form[role="search"] button[type="submit"] {
  background: url(input_areas/images/ui/separator.png) no-repeat left center, url(input_areas/images/ui/active.png) repeat-x left bottom;
  border: none;
  float: right;
  width: 6rem;
  height: 3.7rem;
  padding: 0;
  font: 600 1.4rem/3.2rem "Open Sans", Sans-serif;
  color: #333;
}

form[role="search"] button[type="submit"]:active {
  background: #008caa;
  text-shadow: 1px 1px 0 rgba(255,255,255,.3);
}

form[role="search"] button[type="submit"][disabled] {
  background: url(input_areas/images/ui/separator.png) no-repeat left center;
  color: #adadad;
}

form p button[type="reset"]:focus,
form p button[type="reset"]::-moz-focus-inner {
  border: none;
  outline: none;
}
