/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

body {
    font-size: 1em;
    line-height: 1.4;
}

a {
    color: #00e;
}

a:visited {
    color: #551a8b;
}

a:hover {
    color: #06e;
}

/*
 * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
 */

img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
html {
  height:100%;
}
body {
  background-color: #76777B;
  height:100%;
  position:relative;
}
div {
  max-width: 100%;
}
#wrap {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  overflow:hidden;
}
@media (min-width: 360px) {
  #wrap {
    top:50%;
    left:50%;
    width:360px;
    height:640px;
    margin: -320px 0 0 -180px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.6);
  }
}
#done {
  background:url('../img/done-bg.jpg') no-repeat top center;
  background-size:cover;
  height:100%;
}
#face {
  background: url("../img/glitterbug-face.png") no-repeat scroll 50% 5px rgba(0, 0, 0, 0);
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
#shop {
  background: url("../img/shop-now.png") no-repeat scroll center center rgba(0, 0, 0, 0);
  background-size: contain;
  border: 0 none;
  cursor: pointer;
  height: 106px;
  max-height:20%;
  position: absolute;
  bottom: 25%;
  width: 100%;
}
#logo {
  background: url("../img/glitterbug-and-logo.png") no-repeat scroll center;
  background-size: contain;
  height: 119px;
  max-height:20%;
  left: 0;
  position: absolute;
  bottom: 10px;
  width: 100%;
}
#refresh {
  background: url("../img/refresh.png") no-repeat scroll center center rgba(0, 0, 0, 0);
  border: 0;
  color: #ffffff;
  cursor: pointer;
  right:10px;
  margin-left:-50px;
  position: absolute;
  bottom: 10px;
  width: 16px;
  height:17px;
  text-indent:200px;
  display:none;
}

#germs {
  background:url('../img/germs.jpg') no-repeat top center;
  background-size:cover;
  height:100%;
  position:absolute;
  top:0;
  left:0;
  width:100%;
}
#suds {
  background:url('../img/suds.png') no-repeat;
  background-size:cover;
  height:1280px;
  width:100%;
  position:absolute;
  top:640px;
  left:0;
  opacity:1;
}
#suds.annimate {
  -webkit-transition:top 14s linear, opacity 2.5s;
  transition:top 14s linear, opacity 2.5s;
}
#suds.show {
  top: -360px;
}
#suds.fadeOut {
  opacity: 0;
}

#rinse {
  background:url('../img/rinse.png') no-repeat;
  background-size:cover;
  height:1078px;
  width:100%;
  position:absolute;
  top:-1078px;
  left:0;
  visibility:hidden;
}
#rinse.fast {
  -webkit-transition:top 1.5s linear;
  transition:top 1.5s linear;
}
#rinse.slow {
  -webkit-transition:top 4s linear;
  transition:top 4s linear;
}
#rinse.show {
  visibility:visible;
  top: 640px;
}

#play, #timer {
  border:0;
  position:absolute;
  top:50%;
  left:50%;
  width:154px;
  height:154px;
  margin:-77px 0 0 -77px;
}
#play {
  background:transparent url('../img/play-btn.png') no-repeat;
  border:0;
  outline:0;
  display:none;
}
#timer {
  display: none;
  left:0;
  width:100%;
  margin-left: 0;
}
#time {
  color:#FFF;
  font-size:68px;
  line-height:154px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

#ticks {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 154px;
  height: 154px;
  display: none;
  margin-top: -4px;
  margin-left: -12px;
}
.tick {
  background-color:#FFF200;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  height:8px;
  width:24px;
  position:absolute;
}
.tick.done {
  visibility:hidden;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/* Prevent callout */

.nocallout {
    -webkit-touch-callout: none;
}

.pressed {
    background-color: rgba(0, 0, 0, 0.7);
}

/* A hack for HTML5 contenteditable attribute on mobile */

textarea[contenteditable] {
    -webkit-appearance: none;
}

/* A workaround for S60 3.x and 5.0 devices which do not animated gif images if
   they have been set as display: none */

.gifhidden {
    position: absolute;
    left: -100%;
}

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    background-repeat: no-repeat;
    border: 0;
    direction: ltr;
    display: block;
    overflow: hidden;
    text-align: left;
    text-indent: -999em;
}

.ir br {
    display: none;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/**
 * Clearfix helper
 * Used to contain floats: h5bp.com/q
 */

.clearfix:before,
.clearfix:after {
    content: "";
    display: table;
}

.clearfix:after {
    clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   Theses examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (max-height: 420px) {
  #bd {
    border-radius:20px;
    width:80%;
    left:10%;
    margin-left:0;
    height:auto;
    top:65px;
    margin-top:0;
  }
  .wrap {
    padding:10px;
  }
}
@media only screen and (min-height: 700px) {
  #bd {
    font-size:2.4em;
    line-height:1em;
    width:600px;
    height:600px;
    margin:-300px 0 0 -300px;
  }
  #timer, #germs {
    font-size:4em;
    line-height:1.2em;
  }
  .wrap {
    padding-top:84px;
  }
}

