html {
}

body {
  background: #e6eaf0;
  border: 0;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  margin: 0;
  padding: 0;
}

#void {
  left: -100vw;
  position: absolute;
  top: 0;
}

#key-error {
  background: rgba(0, 0, 0, 0.85);
  color: white;
  display: flex;
  height: 100vh;
  position: absolute;
  width: 100vw;
  z-index: 999;
}

#key-error h1 {
  align-content: center;
  align-items: center;
  display: inline-flex;
  justify-content: center;
  justify-items: center;
  text-align: center;
  width: 100%;
}

#grid {
  display: grid;
  grid-template-columns: 500px 1.3fr;
  grid-template-rows: 1fr;
  grid-template-areas: "input output";
}

form {
  grid-area: input;
  margin: 0 0 60px 0;
  padding: 40px 0 0;
  width: 500px;
}

fieldset {
  border: 0;
  box-shadow: 0px 0px 35px -10px rgba(0,0,0,0.64);
  margin: 0 30px;
  padding: 0;
  width: 440px;;
}

#advertiser, #site {
  border: 1px solid #a0a0a0;
  display: block;
  font-size: 18px;
  margin: 0;
  outline: none;
  padding: 15px;
  width: 408px;
}

fieldset:nth-child(2) { margin-top: 40px; }

#campaigns {
  border: 1px solid #a0a0a0;
  border-top: none;
  display: block;
  font-size: 13px;
  height: 200px;
  margin: 0;
  outline: none;
  width: 440px;
}

#campaigns-filter {
  border: 1px solid #a0a0a0;
  display: block;
  font-size: 14px;
  margin: 0;
  outline: none;
  padding: 15px;
  width: 408px;
}

fieldset:nth-child(3) { margin-top: 10px; }

#start-time,
#end-time {
  border: 1px solid #a0a0a0;
  display: inline-block;
  font-size: 16px;
  margin: 0;
  outline: none;
  padding: 15px;
  width: 171px;
}
#start-time { width: 176px; }

#date-locked {
  height: 20px;
  width: 20px;
}
#date-locked[data-value='0'] { opacity: 0.3; }

fieldset:nth-child(4) { margin-top: 10px; }

#date-group {
  display: block;
  font-size: 20px;
  margin: 0;
  outline: none;
  width: 440px;
}

fieldset:nth-child(5) { margin-top: 10px; }

#parameter-group {
  border: 1px solid #a0a0a0;
  border-top: none;
  display: block;
  font-size: 13px;
  height: 150px;
  margin: 0;
  outline: none;
  width: 440px;
}

fieldset:nth-child(6) { margin-top: 40px; }

#generate-report {
  background: #0089BD;
  border: 0;
  color: white;
  display: block;
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  outline: none;
  padding: 14px 0;
  text-align: center;
  text-transform: uppercase;
  width: 440px;
}
#generate-report:hover { background: #003A57; }
#generate-report.working { background: #BD0089 }

#switch-mode {
  background-color: #4CC713;
  bottom: 0;
  color: white;
  cursor: pointer;
  padding: 10px 20px 10px 20px;
  position: fixed;
  left: 0;
  z-index: 100;
}
#switch-mode a { color: inherit; text-decoration: none; }

#report {
  grid-area: output;
  position: relative;
}

#report-placeholder {
  display: flex;
  height: 100vh;
  position: absolute;
  width: 100%;
  z-index: 200;
}

#report-download {
  background-color: #4CC713;
  bottom: 0;
  color: white;
  cursor: pointer;
  display: none;
  padding: 10px 20px 10px 45px;
  position: fixed;
  right: 0;
  z-index: 100;
}

#report-copy {
  background-color: #4CC713;
  bottom: 0;
  color: white;
  cursor: pointer;
  display: none;
  padding: 10px 20px;
  position: fixed;
  right: 179px;
  z-index: 100;
}

#report-download:hover,
#report-copy:hover {
  background-color: #333;
  color: white;
}

#report-download:before, #report-download:after {
  content: ' ';
  display: block;
  position: absolute;
  left: 15px;
  top: 52%;
}

/* Download box shape  */
#report-download:before {
  width: 10px;
  height: 2px;
  border-style: solid;
  border-width: 0 2px 2px;
}

/* Download arrow shape */
#report-download:after {
  width: 0;
  height: 0;
  margin-left: 3px;
  margin-top: -7px;

  border-style: solid;
  border-width: 4px 4px 0 4px;
  border-color: transparent;
  border-top-color: inherit;

  animation: downloadArrow 2s linear infinite;
  animation-play-state: paused;
}

#report-download:hover:before {
  border-color: #4CC713;
}

#report-download:hover:after {
  border-top-color: #4CC713;
  animation-play-state: running;
}

/* keyframes for the download icon anim */
@keyframes downloadArrow {
  /* 0% and 0.001% keyframes used as a hackish way of having the button frozen on a nice looking frame by default */
  0% {
    margin-top: -7px;
    opacity: 1;
  }

  0.001% {
    margin-top: -15px;
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    margin-top: 0;
    opacity: 0;
  }
}

#report-placeholder h1 {
  align-content: center;
  align-items: center;
  color: #555;
  display: inline-flex;
  font-size: 20px;
  font-weight: normal;
  justify-content: center;
  justify-items: center;
  text-align: center;
  width: 100%;
}

#report-result {
  border-collapse: collapse;
  display: none;
  font-size: 12px;
  margin: 0 0 60px 0;
  padding: 30px 0 0;
  width: 100%;
}

#report-result th {
  cursor: default;
  text-align: left;
  user-select: none;
}

#report-result td {
  padding: 2px;
}

#report-result td.hi,
#report-result th.hi,
#report-result tfoot td:hover {
  background: #ddd;
  cursor: copy;
}

#report-result tfoot {
  border-top: 3px solid #1a1a1a;
}

#report-result tfoot td {
  padding-top: 8px;
}
