/*

      Format
      -------------------
      selector1,
      selector2 {
        display
        content
        position, top, left, z-index
        width, height, padding, margin
        background, color, border
        font, text-align, line-height, text-transform, letter-spacing
        cursor, pointer-events
        box-shadow
        border-radius
        etc. }

                        */


/*

      Generic styles

                        */

html {
  background: #fff; }
body {
  width: 31.9em; margin: 0em auto; padding: 0em;
  color: #555;
  font-weight: bold; text-align: right; font-family: "Helvetica Neue", sans-serif; }
body * {
  -webkit-user-select: none; }
section {
  display: block; }
em {
  font-style: normal; }
h1,
h2 {
  margin: 0em; padding: 0em;
  font-size: 1em; }
button {
  padding: 0px;
  background: #fff; border: transparent; color: inherit;
  font-size: 0.9em; font-family: "Helvetica Neue", sans-serif; }
div#wrapper {
  display: none; overflow: hidden;
  position: relative;
  width: 31.9em; height: 48em; margin: 0em; }

/*

      The Converter

                        */

#converter {
  position: absolute;
  width: 100%; }

#network-status {
  position: absolute; left: 4px;
  padding: 1em 0em 1em; margin: 0.65em 0em 0em;
  color: #888;
  text-align: center; font-weight: normal; font-size: 0.9em; }
.online:before {
  /*  Unicode tick */
  content: '\2713\0020';
  color: green;
  font-weight: bold; }
.offline:before {
  /*  Unicode cross  */
  content: '\2715\0020';
  color: red;
  font-weight: bold; }

#rates {
  margin: 0.5em 0em;
  font-size: 1.8em; text-align: center; }
#rates em {
  margin: -0.1em 0.1em 0em;
  color: #aaa;
  font-size: 0.9em; }

#input,
#output {
  position: relative;
  margin: 0em; padding: 0.4em 0.5em 1em 0em;
  border-top: 1px solid #f3f3f3; background: transparent none 2% 47% no-repeat;
  cursor: pointer; }
#output {
  margin: 0em 0em 0.7em; }

#input.touched,
#output.touched {
  background-color: #cfc; }

#input h2,
#output h2 {
  padding: 0em 0.2em 0em;
  color: #999;
  font-size: 1.1em; line-height: 0.5; }
#input h1,
#output h1 {
  padding: 0em 0em 0.1em;
  font-size: 4.7em; letter-spacing: 0.02em; }
#input h2 em,
#output h2 em {
  left: -0.3em;
  color: #ccc; }

button {
  padding: 0.3em 0.5em;
  background: #999; color: #fff;
  font-size: 0.7em; font-weight: normal;
  border-radius: 3px; }
#save,
#flip {
  position: relative; top: -1em; left: -1em;
  padding: 1em;
  cursor: pointer; }
#flip {
  position: absolute; top: auto; z-index: 1;
  padding: 1.5em 1.3em; margin: -2.3em 0em 0em 0em; }
#flip button {
  text-transform: uppercase; letter-spacing: 0.1em; }
#save button {
  display: inline;
  position: relative; top: 0.25em;
  margin: 0.8em 0em 0em; padding: 0.3em 1.4em;
  color: #fff; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.2, #04D7a3), color-stop(0.5, #05CE99), color-stop(0.51, #04D7a3), color-stop(1, #04D7a3));
  font-size: 0.7em;
  border-radius: 0.4em; }

#flip.touched button {
  background: #555; }
#save.touched button {
  background: #3F9979 none; }

/*

      Input Pad

                        */

#input-pad {
  float: left;
  width: 105%; margin: 2% 0% 0% -1%; padding: 1.5% 0% 5% 5%;
  background: #f2f2f2 none top left repeat-x; }
#input-pad p {
  float: left;
  width: 22%; padding: 0.7em 0em; margin: 1.2% 0%;
  font-size: 2.7em; text-align: center;
  cursor: pointer; }
#input-pad #clear {
  padding-top: 2.45em;
  background: none 50% 30% no-repeat;
  font-size: 1.4em; }

/*

      Currency
      selection

                        */

#rate-selection {
  position: absolute; top: 0%; left: -105%; z-index: 1;
  overflow: hidden;
  width: 105%; height: 100%; margin: 0% 0% 0% -2%; padding: 0em;
  background: #f0f0f0;
  font-size: 1.5em; text-align: center; }
#rate-selection ul {
  list-style: none;
  display: block; clear: both;
  position: relative; left: -3%;
  margin: 0.5em 3% 0em 7.5%; padding: 0em; }
#rate-selection li {
  display: block;
  position: relative; top: -0.1em;
  padding: 0.7em 0em;
  border-top: 0.1em solid #ddd; }
#rate-selection li:first-child {
  border: 0em; }
#rate-selection li a.touched {
  background-color: rgba(0, 255, 0, 0.2); }
#rate-selection a {
  opacity: 0;
  position: absolute; top: 0.75em; left: 0em; right: 0em;
  padding: 0.75em 0em; margin: -0.75em 0em 0em;
  text-decoration: none; }
#rate-selection em {
  color: #bbb; }

#rate-selection li.selected {
  background-color: #69f; }
#rate-selection a.selected {
  background-repeat: no-repeat; background-position: 5% 50%; }

/*

      Animation

                        */

#converter,
#rate-selection {
  -webkit-transition: left 370ms; }
body[class*="edit-rates-"] #rate-selection {
  left: 0%; }
body[class*="edit-rates-"] #converter {
  left: 105%; }

#rate-selection a {
  -webkit-transition: opacity 370ms; }
.edit-rates-from #rate-selection a[id*="from-"] {
  opacity: 1;
  display: block; }
.edit-rates-from #rate-selection a[id*="to-"] {
  display: none; }
.edit-rates-to #rate-selection a[id*="to-"] {
  opacity: 1;
  display: block; }
.edit-rates-to #rate-selection a[id*="from-"] {
  display: none; }

#wrapper {
  -webkit-perspective: 1000; }
#flippable {
  -webkit-transition-duration: 300ms; -webkit-backface-visibility: hidden; }
.flip #flippable {
  -webkit-transform: rotateX(180deg); }

/*

     Credits page

                        */

#credits {
  display: none;
  position: absolute; top: 0em; right: 0em; bottom: 0em; left: 0em; z-index: 3;
  background: #fff none 50% 50% no-repeat; }
#credits a {
  display: block;
  width: 100%; height: 100%; }
.credits #credits {
  display: block; }

/*

     Installation page

                        */

#install {
  display: none;
  position: absolute; top: 0em; left: 0em; right: 0em; bottom: 0em;
  background: #f7f7f7; color: #002;
  text-align: center; line-height: 1.3; }

#install h1 {
  overflow: hidden;
  width: 16em; height: 10.5em; margin: 0.5em auto;
  background: url('/images/logo.png') 50% 0% no-repeat; background-size: 100px 100px;
  text-indent: -8em; text-align: left; }
#install h2 {
  width: 16em; margin: 0.4em auto;
  font-size: 1.9em; }
#install > p {
  width: 16em; margin: 0em auto;
  color: #445;
  font-size: 1.4em; font-weight: normal; }

#install-wrapper {
  position: absolute; bottom: 0.8em; left: 50%;
  width: 12em; margin-left: -7em; padding: 0.8em 1em 0.2em;
  font-size: 1.6em; text-align: center; line-height: 1.3;
  background: #222;
  border-radius: 0.3em; -webkit-border-radius: 0.3em;
  box-shadow: 0em 0em 0.8em rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0em 0em 0.8em rgba(0, 0, 0, 0.2); }
#install-wrapper:after {
  content: ' ';
  position: absolute; left: 5.8em; bottom: -0.4em;
  width: 0em; height: 0em;
  border: 1.2em solid #222; border-bottom: none; border-left: 1.2em solid transparent; border-right: 1.2em solid transparent; }
#install-wrapper p {
  margin: 0em 0em 0.8em;
  color: #bbb; }
#install-wrapper em {
  color: #fff;
  white-space: nowrap; }
#add-button {
  display: inline-block;
  width: 24px; height: 22px;
  background: transparent none 50% 50% no-repeat; }

/*

     iPhone-specific

                        */

@media only screen and (max-device-width: 480px) {
  body {
    font-size: 62.5%; }
  p span {
    font-size: 1.3em;
    margin: 0em -0.15em 0em 0em; }
  #input h1,
  #output h1 {
    letter-spacing: 0.02em; }
  #add-button {
    position: relative; top: 0.15em; }
}