﻿@import url("https://fonts.googleapis.com/css?family=Work+Sans:300");
:root {
  --fg: #fff;
  --bg: #1a1a1a;
}

.tools {
  -webkit-box-flex: 1;
          flex: 1;
  padding: 2em;
  color: #fff;
}
.tools .color--tool {
  position: relative;
}
.tools .color--tool div {
  display: -webkit-box;
  display: flex;
  position: relative;
}
.tools .color--tool--steps {
  padding: .5em 0;
}
.tools .color--tool .vertical-range {
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
  width: 5em;
  height: 5em;
  -webkit-transform: rotate(-90deg);
          transform: rotate(-90deg);
}
.tools .color--tool .steps {
  position: absolute;
  top: 50%;
  left: 4em;
  -webkit-transform: translate(0, -50%);
          transform: translate(0, -50%);
  padding: 0;
  margin: 0;
}
.tools .color--tool button {
  margin: 0;
  font-size: 1.25em;
  background: none;
  position: absolute;
  left: 6.15em;
  top: 50%;
  -webkit-transform: translate(-25%, -50%);
          transform: translate(-25%, -50%);
}

.colors {
  -webkit-box-flex: 2;
          flex: 2;
  display: -webkit-box;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
          flex-direction: column;
  font-size: .85em;
}
.colors .color {
  -webkit-box-flex: 1;
          flex: 1;
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
  padding: 0 1em;
  -webkit-transition: 300ms linear;
  transition: 300ms linear;
}

button {
  margin: .5em 1em;
  cursor: pointer;
  background: none;
  color: #fff;
  outline: none;
  border: none;
  display: -webkit-inline-box;
  display: inline-flex;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: center;
          justify-content: center;
  border-radius: 1em;
  width: 1em;
  height: 1em;
  line-height: 0;
  font-size: 1.65em;
}

input {
  margin: 0;
  padding: 0 .5em;
  font-size: inherit;
  font-family: inherit;
  border: none;
  width: 7em;
  outline: none;
  border-radius: 0 1em 1em 0;
}
input[type=color] {
  padding: 0;
  width: 2em;
  height: 2em;
  border-radius: 1em 0 0 1em;
}
input[type=color]::-moz-color-swatch {
  border: none;
  border-radius: 1em;
  transform: scale(0.75);
}
input[type=color]::-webkit-color-swatch {
  border: none;
  border-radius: 1em;
}
input[type=color]::-webkit-color-swatch-wrapper {
  padding: .25em;
  border-radius: 1em;
}
input[type=range] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  outline: none;
  display: inline-block;
  padding: 0;
  margin: 0;
  border: 0;
  width: 100%;
  height: .25em;
  border-radius: 1em;
  cursor: pointer;
  font-size: inherit;
  background: var(--fg);
}
input[type=range]::-moz-range-track {
  -moz-appearance: none;
       appearance: none;
  background: var(--fg);
  outline: none;
}
input[type=range]::-moz-focus-outer {
  border: 0;
}
input[type=range]::-moz-range-thumb {
  -moz-appearance: none;
       appearance: none;
  width: 1em;
  height: 1em;
  border: none;
  border-radius: 1em;
  box-shadow: 0 0 0 0.3em var(--bg);
  background: var(--fg);
  transform: scale(1);
  -moz-transition: transform .3s ease-out;
  transition: transform .3s ease-out;
}
input[type=range]::-moz-range-thumb:focus, input[type=range]::-moz-range-thumb:active {
  -moz-appearance: none;
       appearance: none;
  transform: scale(0.85);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
          appearance: none;
  width: 1em;
  height: 1em;
  border: none;
  border-radius: 1em;
  box-shadow: 0 0 0 0.3em var(--bg);
  background: var(--fg);
  -webkit-transform: scale(1);
          transform: scale(1);
  -webkit-transition: -webkit-transform .3s ease-out;
  transition: -webkit-transform .3s ease-out;
  transition: transform .3s ease-out;
  transition: transform .3s ease-out, -webkit-transform .3s ease-out;
}
input[type=range]::-webkit-slider-thumb:focus, input[type=range]::-webkit-slider-thumb:active {
  -webkit-appearance: none;
          appearance: none;
  -webkit-transform: scale(0.85);
          transform: scale(0.85);
}

.glyph {
  width: 1em;
  height: 1em;
  stroke: #fff;
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.glyph .solid {
  fill: #fff;
  stroke: none;
  stroke-width: 0;
}
.glyph.svg-x {
  stroke: #999;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: -webkit-box;
  display: flex;
  background: #1a1a1a;
  font-family: 'Work Sans', sans-serif;
}

main {
  -webkit-box-flex: 1;
          flex: 1;
  display: -webkit-box;
  display: flex;
  font-size: calc(1em + 1vw);
}

@supports (-webkit-backdrop-filter: blur(2em)) {
  input[type=color] {
    display: none;
  }

  input {
    border-radius: 1em;
    padding: .25em .5em;
    width: 9em;
  }
}