﻿/* favicon 512x512 font: 448pt Ravie */
/* header font: 48pt Ravie */
/* award font: 48pt Ravie */

/*
    icon generation process in Paint.NET
    convert
    1. use Magic Wand to select all of image and create a new document with a 10 pixel border (add 20 to width and height)
    2. select white background and delete, paste image, select whole image (ctrl-A), align object to middle center (Effects add-in)
    2a. Adjustments / Invert Colors to make all white (if needed)
    3. Image / Resize to 512 x 512 pixels
    4. Effects / Stylize / Outline with 10 thickness and 50 intensity
    5. save as PNG with Auto-detect Bit Depth, then use Visual Studio add-in to Lossless Optimize Image
    my icon
    - rectangle brush width of 40
    - outline thickness of 10 and intensity 50 (outline is for contrast on light colors)
*/

/* general */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
  margin: 0;
  text-align: center;
  font-family: Papyrus, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.42857143; /*Bootstrap's value*/
  color: #fff;
  background-color: #000;
  cursor: default;
  /*vendor-prefixed user-select required for Firefox*/
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.prevent-scroll {
  overflow: hidden;
}

.prevent-pull-to-refresh {
  /*
        use on body to prevent pull-to-refresh
        https://docs.google.com/document/d/12Ay4s3NWake8Qd6xQeGiYimGJ_gCe0UMDZKwP9Ni4m8/mobilebasic
    */
  overflow-y: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.link-ext:after {
  content: '\27a6';
  vertical-align: top;
  font-size: .75em;
}

.section-resources {
  display: none;
}

.hidden {
  visibility: hidden;
}

.display-none {
  display: none !important;
}

.display-block {
  display: block;
}

.display-inline {
  display: inline;
}

.display-inline-block {
  display: inline-block;
}

.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.position-fixed {
  position: fixed;
}

.full-width {
  width: 100%;
}

.float-left {
  float: left;
}

.float-right {
  float: right;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-img {
  position: relative;
  top: 2px;
  width: 14px;
  height: 14px;
  filter: brightness(2);
}

.text-size-14 {
  font-size: 14px;
}

.text-size-16 {
  font-size: 16px;
}

.text-size-18 {
  font-size: 18px;
}

.text-size-20 {
  font-size: 20px;
}

.no-wrap {
  white-space: nowrap;
}

.cursor-pointer {
  cursor: pointer;
}

.responsive-image {
  max-width: 100%;
  height: auto;
}

.color-log {
  background: #222;
  border: 2px solid #444;
}

.color-info {
  background: #024;
  border: 2px solid #048;
}

.color-warn {
  background: #420;
  border: 2px solid #840;
}

.color-error {
  background: #400;
  border: 2px solid #800;
}

/* banner notices */

.banner-notice {
  position: fixed;
  z-index: 10001;
  width: 100%;
  top: 0;
  padding: 6px;
  text-align: center;
}

.banner-notice-limited-support {
  background: #420;
  border: 2px solid #840;
}

/* loading - from https://codepen.io/vkjgr/pen/gbPaVx */

.loading-notice {
  position: fixed;
  width: 100%;
  top: 20px;
  text-align: center;
  font-size: 32px;
}

  .loading-notice:after {
    content: ' .';
    animation: loading-dots 1.5s steps(5, end) infinite;
  }

@keyframes loading-dots {
  0%, 20% {
    color: rgba(0,0,0,0);
    text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
  }

  40% {
    color: #fff;
    text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
  }

  60% {
    text-shadow: .25em 0 0 #fff, .5em 0 0 rgba(0,0,0,0);
  }

  80%, 100% {
    text-shadow: .25em 0 0 #fff, .5em 0 0 #fff;
  }
}

/* input */

input,
button,
select,
textarea,
.input {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

input,
select,
textarea,
.input {
  height: 32px;
  padding: 2px 4px;
  border: 1px solid #aaa;
  box-shadow: 0 0 4px #000 inset;
  border-radius: 2px;
  filter: drop-shadow(0 0 2px #000) brightness(.9);
  transition-property: border, box-shadow, filter;
  transition-duration: .2s;
}

textarea {
  vertical-align: middle; /*better when inside label*/
}

select,
input[type='range'],
input[type='file'] {
  cursor: pointer;
}

  select[size],
  textarea[rows] {
    height: auto;
  }

  input:focus,
  select:focus,
  textarea:focus,
  .input:focus {
    outline: 1px solid #fff;
    border: 1px solid #fff;
    box-shadow: 0 0 2px #000 inset;
    filter: drop-shadow(0 0 2px #fff) brightness(1);
  }

input[type='radio'] {
  position: relative;
  top: 6px;
  width: 20px;
  height: 20px;
}

  input[type='radio']:focus {
    outline: 0;
  }

a,
.button {
  padding: 0;
  color: inherit;
  background-color: transparent;
  border: 0;
  cursor: pointer;
  filter: drop-shadow(0 0 1px #008) brightness(.8);
  transition: filter .1s;
}

  a:disabled,
  .button:disabled {
    filter: drop-shadow(0 0 1px #008) brightness(.5);
    cursor: default;
  }

  a:focus,
  .button:focus {
    outline: 0;
  }

a {
  color: #bbd;
}

@media (hover: hover), /*prevent mobile sticky hover*/
(min--moz-device-pixel-ratio: 0) { /*Firefox does not support hover*/
  a:not(.active):focus,
  .button:not(.active):focus {
    filter: drop-shadow(0 0 1px #fff) brightness(.7) sepia(.6) hue-rotate(190deg) saturate(4) contrast(1.2);
  }

  a:not(.active):not(:disabled):hover,
  .button:not(.active):not(:disabled):hover {
    filter: drop-shadow(0 0 1px #fff) brightness(.7) sepia(.6) hue-rotate(190deg) saturate(4) contrast(1.2);
  }
}

.button-on {
  filter: drop-shadow(0 0 1px #fff) brightness(1.2);
}

.text-button {
  display: inline-block;
  height: 32px;
  line-height: 30px; /*vertical centering*/
  padding: 0 10px;
  border: 1px solid #fff;
  border-radius: 4px;
}

.image-button {
  padding: 5px;
}

  .image-button img {
    width: 32px;
    height: 32px;
    vertical-align: middle;
  }

  .image-button.small {
    font-size: 12px;
  }

    .image-button.small img {
      width: 24px;
      height: 24px;
    }

.horizontal-radio-list > label {
  margin-right: 5px;
}

label.file-input-container {
  /*must be label for display none to work, which allows cursor to work*/
  position: relative;
}

  label.file-input-container input[type='file'] {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
  }

/* input container */

.input-container .input-row {
  margin: 10px 0;
}

  .input-container .input-row > label {
    display: inline-block;
    text-align: right;
  }

    .input-container .input-row > label + input,
    .input-container .input-row > label + select {
      margin-left: 5px;
    }

    .input-container .input-row > label > .input {
      /*keeps empty span in correct position*/
      display: inline-block;
      vertical-align: middle;
      /*keeps span with content aligned correct*/
      padding-top: 4px;
    }

  .input-container .input-row.button-row {
    margin-top: 20px;
  }

    .input-container .input-row.button-row > .button,
    .input-container .input-row.button-row > a,
    .input-container .input-row.button-row > div {
      margin-left: 10px;
      margin-right: 10px;
    }

@media (max-width: 499px) { /*width chosen based on dialog width*/
  .input-container .input-row.button-row > .button,
  .input-container .input-row.button-row > a,
  .input-container .input-row.button-row > div {
    display: block;
    margin: 10px auto;
  }
}

/* table */

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

  table thead td {
    vertical-align: bottom;
  }

  table td {
    padding: 8px;
    text-align: left;
    vertical-align: top;
  }

    table td input,
    table td button,
    table td select,
    table td textarea,
    table td .input {
      text-align: left;
    }

.grid thead {
  font-variant: small-caps;
  background: linear-gradient(to bottom, rgba(64,64,64,.9), rgba(32,32,32,.9));
  box-shadow: 0 5px 15px rgba(0,0,0,.5);
  border: 1px solid #444;
}

.grid tbody {
  border: 1px solid #222;
}

  .grid tbody tr:nth-child(even) {
    background: #111;
  }

.grid .paging-row {
  padding-bottom: 0;
  text-align: center;
}

  .grid .paging-row .button {
    height: 24px;
    line-height: normal;
    margin: 0 2px;
    padding: 0 4px;
  }

.grid .paging-text {
  float: left;
}

.grid .paging-records {
  float: right;
}

.grid .col-header {
  min-width: 50px;
  padding: 8px;
}

  .grid .col-header > span:nth-child(1) {
    display: inline-block;
    max-width: calc(100% - 24px); /*depends on 2nd column*/
    vertical-align: bottom;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .grid .col-header > span:nth-child(2) {
    width: 24px; /*affects 1st column*/
  }

/* fading */

.fade {
  transition: opacity .5s, visibility 0s;
}

  .fade.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s, visibility 0s .5s;
  }

/* tabs */

.tab-bar {
  border-bottom: 1px solid rgba(255,255,255,.4);
}

  .tab-bar > .tab-button {
    display: inline-block;
    height: 32px;
    line-height: 32px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    transition-property: background-color, border-color;
    transition-duration: .2s;
  }

    .tab-bar > .tab-button:not(:disabled) {
      cursor: pointer;
    }

    .tab-bar > .tab-button.active {
      background-color: rgba(255,255,255,.1);
      border-color: rgba(255,255,255,.6);
      border-bottom: 0;
      cursor: default;
    }

/* hover text */

.hover-text {
  position: fixed;
  z-index: 1002;
  padding: 2px 10px;
  background-color: rgba(20,20,20,.9);
  box-shadow: 0 5px 15px rgba(0,0,0,.5);
  border: 1px solid #fff;
  border-radius: 4px;
}

@media (hover: hover), /*prevent mobile sticky hover*/
(min--moz-device-pixel-ratio: 0) { /*Firefox does not support hover*/
  .fade-hover-text {
    transition: opacity .5s 1s, visibility 0s;
  }
}

/* dialog */

.dialog-bg {
  position: fixed;
  z-index: 1000;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(0,0,0,.5);
}

.dialog {
  display: inline-block;
  width: 90vw;
  min-width: 300px;
  max-width: 500px;
  max-height: 80vh;
  margin-top: 10vh;
  background-color: rgba(20,20,20,.9);
  border: 1px solid #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,.5);
  border-radius: 4px;
}

  .dialog .dialog-header {
    position: relative;
    height: 32px;
  }

    .dialog .dialog-header .close {
      position: absolute;
      top: 0;
      right: 5px;
      font-size: 32px;
      line-height: 1;
      color: #fff;
      background-color: rgba(0,0,0,0);
      border: 0;
      outline: 0;
    }

  .dialog .dialog-body {
    max-height: calc(80vh - 32px); /*room for header, force scrollable*/
    height: 100%;
    padding: 0 20px 20px 20px;
    overflow-y: auto;
  }

/* window */

.window-bg {
  position: fixed;
  top: 10vh;
  left: 10vw;
}

.window {
  display: inline-block;
  max-width: 80vw;
  max-height: 80vh;
  background-color: rgba(20,20,20,.9);
  border: 1px solid #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,.5);
  border-radius: 4px;
}

  .window .window-header {
    position: relative;
    height: 32px;
    cursor: move;
  }

    .window .window-header .header-text {
      padding-top: 5px;
    }

    .window .window-header .close {
      position: absolute;
      top: 0;
      right: 5px;
      font-size: 32px;
      line-height: 1;
      color: #fff;
      background-color: rgba(0,0,0,0);
      border: 0;
      outline: 0;
    }

  .window .window-body {
    max-height: calc(80vh - 32px); /*room for header, force scrollable*/
    height: 100%;
    padding: 0;
    overflow-y: auto;
  }

/* tool bar */

.tool-bar {
  display: inline-block;
  width: auto;
  height: 42px;
  vertical-align: top;
  overflow: hidden;
  white-space: nowrap;
}

  .tool-bar.vertical {
    width: 42px;
    height: auto;
    white-space: normal;
  }

.tool-bar-button img {
  width: 32px;
  height: 32px;
  margin: 5px;
}

/* main menu button */

.main-menu-button {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 1;
  opacity: .5;
  transition: opacity .2s;
}

  .main-menu-button:not(:disabled):hover {
    opacity: 1;
  }

/* credits */

.credits-container a {
  display: block;
  margin: 0 0 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.distraction-brand {
  font-family: Ravie, serif;
  font-size: .8em;
}

.jason-hayes-brand {
  font-family: 'Lucida Handwriting', serif;
  font-size: .8em;
}

/* awards */

.award {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  padding: 10px;
  border: 5px dashed #fff;
  border-radius: 50px;
  filter: brightness(.5);
}

  .award.awarded {
    border-style: solid;
    filter: brightness(1);
  }

    .award.awarded.award-anim {
      animation: 2s award-anim;
    }

@keyframes award-anim {
  0% {
    transform: scale(0);
    filter: brightness(0);
  }

  50% {
    transform: scale(1.2);
    filter: brightness(1.2);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.award-description {
  margin: 20px 0;
}

.award-list {
  margin-bottom: 20px;
}

  .award-list .award {
    display: inline-block;
    width: 100px;
    height: 100px;
    margin: 10px;
    border-radius: 30px;
  }
