/*! HTML5 Boilerplate v5.3.0 | MIT License | https://html5boilerplate.com/ */

/*
 * 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 {
    color: #222;
    font-size: 1em;
    line-height: 1.4;
}

* {
	box-sizing: border-box;
}

*:focus {
	outline: none;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    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 {
  font-family: 'Muli', Arial, 'Helvetica Neue', Helvetica, sans-serif;
}

.background-view {
  color: #ddd;
  padding-top: 90vh;
  padding-bottom: 10vh;
  text-align: center;
}

body::after {
  background: transparent url('/backgrounds/default.jpg') no-repeat center center;
  background-size: cover;
  content: '';
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: -1;
}

#mobile-controls {
  display: flex;
  box-shadow: 10px 0 20px 5px rgba(0, 0, 0, 0.15);
  bottom: 0;
  position: fixed;
  z-index: 100;
}

#mobile-controls > span {
  background-color: rgba(255, 255, 255, 0.85);
  display: block;
  font-size: 0.8em;
  margin-right: 1px;
  padding: 10px 15px;
  text-align: center;
  transition: all 0.2s ease;
  width: 33.3vw;
}


#mobile-controls > span:hover {
  background-color: #f5ffee;
}

@media only screen and (min-width: 600px) {
  #mobile-controls {
    display: none;
  }
}

.intro-wrap {
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 20px 5px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
  padding: 20px 20px;
  width: 100%;
}

h1 {
  margin: 0;
  padding-bottom: 20px;
}

h2 {
  margin: 0;
  padding-bottom: 20px;
  padding-left: 1.6em;
}

.intro-wrap li {
  padding-bottom: 0.5em;
}

.start {
  position: relative;
  margin-bottom: 20px;
}

.start button {
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.06);
  color: #000;
  display: inline-block;
  padding: 5px 10px;
  margin: 0 5px 5px 0;
  transition: all 0.2s ease;
}

.start button:hover {
  background-color: #ddd;
  box-shadow: 0 8px 2px 0 rgba(0, 0, 0, 0.06);
  transform: translateY(-5px);
}

.start button.current,
.start button.current:hover {
  background: linear-gradient(to bottom, #f5ffee 0%,#ebffdd 100%);
  border: 1px solid #cdf1b5;
  box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.06);
  cursor: default;
  transform: translateY(0);
}

/* Calendar */
.calendar-wrap {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0 0.5vw;
}

.tile {
  background-color: rgba(255, 255, 255, 0.90);
  box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid #ddd;
  border-radius: 3px;
  flex: 1 1 12vw;
  min-width: 200px;
  margin: 0 0.5vw 20px 0.5vw;
  padding: 0 20px 10px;
  position: relative;
  top: 0;
  text-align: center;
  transition: all 0.2s ease;
}

.tile:hover {
  top: -5px;
  box-shadow: 0 8px 2px 0 rgba(0, 0, 0, 0.06);
}

.tile.spacer {
  border: 0;
  height: 0;
  padding: 0;
}

.tile h3 {
  background: linear-gradient(to bottom, #f5ffee 0%,#ebffdd 100%);
  border-radius: 3px;
  box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.06);
  cursor: pointer;
  margin: 0 -23px;
  padding: 20px 0 15px 0;
  text-transform: uppercase;
}

.tile .weekday {
  background-color: #f5ffee;
  border-top: 1px solid #cdf1b5;
  border-radius: 3px;
  box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.06);
  margin: 0 -23px;
  font-size: 0.6em;
  padding: 5px 0;
}

.tile ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  list-style: none;
  padding: 0;
}

.tile li {
  background-color: #fafef8;
  border: 1px solid #cdf1b5;
  border-radius: 50%;
  cursor: pointer;
  flex: 0 0 45%;
  font-weight: 200;
  font-size: 18vw;
  margin-bottom: 10px;
  padding: 45% 0 0 0;
  position: relative;
  text-align: center;
  transition: all 0.2s ease;
}

.tile li > span {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.tile li .half {
  display: none;
  background-color: #fafef8;
  border: 1px solid #cdf1b5;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.5em;
  height: 45%;
  margin-bottom: 10px;
  margin: 0 2.5%;
  padding-top: 5%;
  position: absolute;
  top: 100%;
  transition: all 0.2s ease;
  width: 45%;
  left: 0;
}

.tile li .half:last-of-type {
  left: initial;
  right: 0;
}

.tile li label {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.06);
  font-we0.t: regular;
  margin: 2px 2px -1px 2px;
  padding: 5px 0;
  display: block;
  font-size: 0.22em;  
}

/* -- Previous day tile */
.tile.passed {
  opacity: 0.5;
}

.tile.passed:hover {
  opacity: 0.75;
}

.tile.passed::after {
  content: "✅";
  font-size: 2.5em;
  left: -8px;
  opacity: 0.5;
  position: absolute;
  top: -15px;
}

/* -- Done li*/

.tile .done {
  background-color: #44a600;
  color: #fff;
  position: relative;
}

.tile .done .half {
  opacity: 0.5;
}

.tile .half.done {
  background-color: #44a600;
  color: #fff;
}

.tile .done .half.done {
  background-color: #fafef8;
}

.tile .half.done::after {
  right: 4%;
  top: 4%;
}

.tile .done label {
  color: #000;
}

.tile .done::after {
  content: "✅";
  font-size: 0.4em;
  opacity: 0.75;
  position: absolute;
  right: -8px;
  top: -8px;
}

/* -- Focused */
.tile.focused {
  background-color: #fff;
  position: fixed;
  top: 1vh;
  left: 1vh;
  max-width: initial;
  width: 98vw;
  height: 98vh;
  z-index: 999;
}

.tile.passed.focused {
  opacity: 1;
}

.tile.focused ul {
  align-items: center;
  height: 80vh;
  margin: 0;
}

.tile.focused li {
  flex: 0 0 48%;
  font-size: 18vw;
  padding: 48% 0 0 0;
}

.tile.focused .done::after {
  font-size: 0.2em;
}

.tile.focused li .half {
  display: inline-block;
}


/* -- Media -- */
@media only screen and (min-width: 400px) {
  .tile li {
    font-size: 6vw;
  }
}

@media only screen and (min-width: 600px) {
  .intro-wrap {
    display: flex;
  }
  
  .intro-wrap .title {
    width: 30%;  
  }
  
  .tile li {
    font-size: 4vw;
  }

  .tile.focused li {
    flex: 0 0 22%;
    font-size: 10vw;
    padding: 22% 0 0 0;
    top: -10vh;
  }
}

@media only screen and (min-width: 1000px) {
  .tile li {
    font-size: 2vw;
  }
}