/* roboto-300 - latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  src: local('Roboto Light'), local('Roboto-Light'),
       url('fonts/roboto-v18-latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
       url('fonts/roboto-v18-latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* roboto-regular - latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto'), local('Roboto-Regular'),
       url('fonts/roboto-v18-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
       url('fonts/roboto-v18-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* roboto-700 - latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto-Bold'),
       url('fonts/roboto-v18-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
       url('fonts/roboto-v18-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}


*:focus {
  outline: none;
}

html, head, body {
  margin: 0;
  height: 100%;
  background-color: #2196F3;

  color: #ffffff;
  font: 1.00em 'Roboto', sans-serif;
}

#container {
  width: 100%;
  min-height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

#container input {
  user-select: auto;
  -ms-user-select: auto;
  -moz-user-select: auto;
  -webkit-user-select: auto;
}

.converter {
  width: 25em;
  padding: 2em 1.5em 4em;
}

.converter h1, .converter p {
  font-size: 2.5em;
  font-weight: 300;
  margin: 0.3em 0;
  text-align: center;
}

.converter p {
  font-size: 1.15em;
}

.converter .boxes {
  display: flex;
  margin: 2.5em 0em;
  align-items: center;
}

.converter .boxes > .textbox {
  flex: 1;
  min-width: 10em;
  display: flex;
  background-color: #ffffff;
  border-radius: .3em;
}

.converter .boxes > .separator {
  font-size: 1.6em;
  line-height: 0.7;
  padding: 0.7em;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.converter .textbox form {
  flex-grow: 1;
  display: flex;
  align-items: stretch;
}

.converter .textbox input {
  width: 100%;
}

.converter .textbox input, .converter .textbox .unit {
  background-color: transparent;
  color: #000000;
  font: inherit;
  font-size: 1.35em;
  font-weight: 700;
  padding: 0.83em 0.7em;
  margin: 0;
  border: none;
}

.converter .textbox .unit {
  font-size: 1em;
  font-weight: 400;
  cursor: pointer;
  padding-left: 0;
}

.converter .textbox .unit.empty {
  display: none;
}
.converter .textbox .unit.guessed {
  color: #777;
}

.converter .plot {
  display: flex;
  align-items: center;
  justify-content: center;
}

.converter .plot svg {
  width: 100%;
}

.converter .textbox .unit.set {
  position:  relative;
}

.converter .textbox .unit.set:before {
  content: "▾";
  display: inline-block;
  position: absolute;
  bottom: 0;
  right: 50%;
  font-size: .85em;
}

.converter .boxes > .output {
  font-weight: 300;
  font-size: 1.25em;
  min-width: 9em;
  display: flex;
  justify-content: flex-end;
  text-align: right;
  overflow: hidden;

  user-select: text;
  -ms-user-select: text;
  -moz-user-select: text;
  -webkit-user-select: text;
}

.converter .boxes > .output > span {
  font-size: 1.35em;
}

.converter .boxes > .output .unit {
  font-size: .815em;
  padding-left: 0.15em;
}

@media (max-width: 26em) {
  .converter .boxes {
    flex-direction: column;
  }

  .converter .boxes > .output {
    text-align: center;
    justify-content: center;
  }

  .converter .boxes > .textbox {
    width: 11.5em;
    margin: 0.2em 0;
  }
}
