$shade-0: #fff !default;
$shade-1: #d7dcdf !default;
$shade-10: #2c3e50 !default;
$teal: #1abc9c !default;

html,
body {
  margin: 0;
  padding: 0;

  background: #1b1b1b;
  color: whitesmoke;
  font-family: "Roboto", sans-serif;
  height: 100%;
  overflow: hidden;
}

.title {
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke-width: 3px;
  -webkit-text-stroke-color: whitesmoke;

  position: absolute;
  margin: 0.2em 0 0 0;
  width: 100%;

  text-align: center;
  font-size: 4em;
  text-transform: full-width;
}

.simulation-window {
  height: 100%;
  width: 100%;
}

.panel {
  position: absolute;
  bottom: 0;
  margin: 0 5em;
  padding: 5em 0 1em 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  opacity: 20%;
  transition: 500ms ease-in-out;

  &:hover {
    opacity: unset;
  }

  &__buttons {
    margin-top: 1em;

    & > * {
      min-width: 10em;

      &:not(:first-child) {
        margin-left: 1em;
      }
    }
  }
}

button {
  color: $shade-0;
  background: $shade-10;
  padding: 0.5em 2em;

  border: none;
  border-radius: 1em;

  transition: 250ms;

  &:hover {
    background: $teal;
  }

  &:active {
    transform: scale(0.9);
  }
}

.settings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  & > * {
    flex-basis: 30%;
  }
}

$slider-handle-color: $shade-10 !default;
$slider-handle-color-hover: $teal !default;
$slider-handle-size: 20px !default;

$slider-track-color: $shade-1 !default;
$slider-track-height: 10px !default;

$slider-label-color: $shade-10 !default;
$slider-label-width: 60px !default;

.slider {
  width: 20em;

  &__label {
    display: block;
  }

  &__input {
    -webkit-appearance: none;
    width: calc(100% - (#{$slider-label-width + 13px}));
    height: $slider-track-height;
    border-radius: 5px;
    background: $slider-track-color;
    outline: none;
    padding: 0;
    margin: 0;

    // Range Handle
    &::-webkit-slider-thumb {
      appearance: none;
      width: $slider-handle-size;
      height: $slider-handle-size;
      border-radius: 50%;
      background: $slider-handle-color;
      cursor: pointer;
      transition: background 0.15s ease-in-out;

      &:hover {
        background: $slider-handle-color-hover;
      }
    }

    &:active::-webkit-slider-thumb {
      background: $slider-handle-color-hover;
    }

    &::-moz-range-thumb {
      width: $slider-handle-size;
      height: $slider-handle-size;
      border: 0;
      border-radius: 50%;
      background: $slider-handle-color;
      cursor: pointer;
      transition: background 0.15s ease-in-out;

      &:hover {
        background: $slider-handle-color-hover;
      }
    }

    &:active::-moz-range-thumb {
      background: $slider-handle-color-hover;
    }

    // Focus state
    &:focus {
      &::-webkit-slider-thumb {
        box-shadow: 0 0 0 3px $shade-0, 0 0 0 6px $teal;
      }
    }
  }

  &__value {
    display: inline-block;
    box-sizing: border-box;
    position: relative;
    width: $slider-label-width;
    color: $shade-0;
    line-height: 20px;
    text-align: center;
    border-radius: 3px;
    background: $slider-label-color;
    padding: 5px 10px;
    margin-left: 8px;

    &:after {
      position: absolute;
      top: 8px;
      left: -7px;
      width: 0;
      height: 0;
      border-top: 7px solid transparent;
      border-right: 7px solid $slider-label-color;
      border-bottom: 7px solid transparent;
      content: "";
    }
  }
}

// Firefox Overrides
::-moz-range-track {
  background: $slider-track-color;
  border: 0;
}

input::-moz-focus-inner,
input::-moz-focus-outer {
  border: 0;
}
