/* Feel free to add any useful code */
/* This will help you scroll just the content of your app. Eg:
  <header class="fixed">
  ...
  <article class="scrollable header">
*/

html {
  height: 100%;
  font-size: 62.5%; /* Setting base font to 10px and define all your units in rem. 1rem = 10px */
}

body {
  margin: 0;
  height: 100%;
  display: block;
  overflow: hidden;
  font-family: sans-serif;
}

.hidden {
  visibility: hidden;
}

section[role="region"] {
  height: 100%;
  background: #fafafa;
}

section[role="region"] > header.fixed:first-child {
  position: absolute;
  width: 100%;
}

.scrollable {
  overflow: auto;
  height: 100%;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  position: relative;
}

.scrollable.header {
  height: calc(100% - 9rem);
  top: 5rem;
}

/* Setting proper paddings and margins */
.content {
  padding: 1.5rem;
}

section[role="region"] .content header {
  margin: 1.5rem -1.5rem;
}

section[role="region"] .content header:first-child {
  margin-top: -1.5rem;
}

.content [data-type="list"] {
  margin: -1.5rem;
}

.center {
  text-align: center;
}

[data-type="list"] {
  padding: 0;
}

[data-type="list"] ul {
  padding: 0 1.5rem;
  overflow: auto;
}

section[role="region"] .content [data-type="list"] header {
  margin: 0 1.5rem;
}

[data-type="list"] li p,
[data-type="list"] li p:first-of-type {
  padding-left: 1.5rem;
}


/* Fonts */
h1 { /* Main header */
  font-size: 2.5rem;
  font-weight: normal;
}

h2 { /* Subheader, Dialog title */
  font-size: 1.6rem;
  font-weight: normal;
}

p {
  font-size: 1.9rem;
  font-weight: normal;
  line-height: 2.5rem;
}

p.large { /* Dialog body */
  font-size: 2.3rem;
  font-weight: 300;
  line-height: 3rem;
}

p.alt { /* Body medium, Buttons */
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 2.2rem;
}

p.small { /* Status bar */
  font-size: 1.5rem;
  line-height: 2rem;
}

p.mini { /* Fine print */
  font-size: 1.4rem;
  line-height: 1.9rem;
}

p.micro { /* App icon label */
  font-size: 1.3rem;
  line-height: 1.8rem;
}

ul, ol, li {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1.9rem;
  font-weight: normal;
  line-height: 2.5rem;
}

/* Themes */
.skin-dark { background: #222; }
.skin-organic { background: #f4f4f4; }

#loading {
  background-color: rgba(32,32,32,0.9);
}

#loading.shown {
  opacity: 1;
  z-index: 120;
}

#loading.fadeOut {
  animation: fadeOutLoading 0.5s forwards;
  z-index: 120;
}

[data-mode="bar"] #loading-bar {
  border: 1px solid rgb(0, 142, 171);
  border-radius: 2rem;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  height: 1.6rem;
  margin: auto;
  max-width: 30rem;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  width: 60%;
}

[data-mode="bar"] #loading-progress {
  height: 100%;
}

[data-mode="bar"] #loading-message {
  display: none;
}

#loading-bar.fade-in {
  animation: fadeIn 0.5s forwards;
}

#loading-container {
  margin-top: -8rem;
  position: relative;
  text-align: center;
  top: 50%;
}

#loading-container > img {
  height: auto;
  margin-bottom: 1.5rem;
  width: 100px;
}

[data-loading="true"] section[role="region"] section:not(.devices) + .preloader {
  display: block;
}

[data-loading="true"] section[role="region"] > article > section:not(.devices) > ul > li {
  display: none;
}

[data-loading="true"] section[role="region"] > article > .devices > ul > li {
  pointer-events: none;
}

section[role="region"] .preloader {
  display: none;
  margin-top: -1.5rem;
  position: relative;
  text-align: center;
  top: 50%;
}

[role="toolbar"] .toolbar-text {
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 400;
  line-height: 4.5rem;
  padding-left: 2rem;
}

@keyframes fadeOutLoading {
  0%   { opacity: 1; }
  50%  { opacity: 1; }
  100% { opacity: 0; }
}
