@font-face {
  font-family: 'Gotham Pro'; 
  src: url('fonts/GothamProRegular.woff2') format('woff2');   
  font-weight: 400; 
  font-style: normal; 
}

@font-face {
  font-family: 'Gotham Pro'; 
  src: url('fonts/GothamProMedium.woff2') format('woff2');   
  font-weight: 500; 
  font-style: normal; 
}

@font-face {
  font-family: 'Gotham Pro'; 
  src: url('fonts/GothamProBold.woff2') format('woff2');   
  font-weight: 600; 
  font-style: normal; 
}

* {
  margin:0;
  padding:0;
  border:0;
  list-style: none;
  cursor: default;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  width: 100%;
}

body {
  font: 500 1rem/1.25 Gotham Pro, Futura, sans-serif;
  color: #fffef8;
  background: #262626;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  overflow: hidden;
  display: flex;
}

a {
  color: #0083b1;
  cursor: pointer;
  text-decoration: none;
}

h1, h2, h3 {
  font-weight: 600;
}

button {
  appearance: none;
  background: unset;
  font: inherit;
}

.button.join,
.button.secondary,
a.button.secondary {
  background: #111;
  color: #999;
}
.button.secondary {
  color: #fff;
}
.button.tertiary {
  color: #999;
  background: transparent;
}
.button, .button.active, .button[data-state=active],
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  font-family: inherit;
  font-weight: bold;
  text-transform: uppercase;
  color: #232323;
  background: #fff;
  cursor: pointer;
}

kbd {
  padding: 2px 5px;
  word-spacing: -0.3em;
  font-family: monaco, monospace;
  color: #fff;
  background: #000;
}

/* Logo */
#logo {
  position: fixed;
  bottom: -0.5em;
  left: 2rem;
  font-size: 4.5rem;
  color: #fff;
}
#logo .text {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

#clipboard_handler {
  padding: 5px;
}
.color-code {
  position: absolute;
  bottom: 100%;
  left: 100%;
  white-space: nowrap;
  font-size: .4em;
  margin-bottom: -1.5em;
}
#format_status {
  padding: 0.5rem 0.75rem;
  background: #232323;
  color: #fff;
  cursor: pointer;
  position: relative;
  top: -1rem;
}
#format_status:hover, #format_status.active {
  background: #fff !important;
  color: #232323 !important;
}
#format_status:hover #settingsIcon, #format_status.active #settingsIcon {
  fill: #232323;
}
#current_color_code,
svg {
  pointer-events: none;
}
.format-settings {
  position: absolute;
  opacity: 0;
  bottom: 0;
  pointer-events: none;
  left: 0;
  margin-bottom: 5px;
  padding: 10px;
  background: #232323;
  color: #fff;
  font-size: 14px;
  font-weight: lighter;
  -webkit-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}
.format-settings.active {
  bottom: 100%;
  opacity: 1;
  pointer-events: auto;
}
.format-settings::after {
  content: '';
  position: absolute;
  top: 100%;
  border: 10px solid transparent;
  border-top-color: #232323;
  border-bottom: none;
}
.format-settings p + p {
  margin-top: 10px;
}

/* Layout */
#panels, #palette {
  transition: all .3s ease;
}
#colors {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  padding-bottom: 8.333333%;
}
#colors .item {
  width: 8.333333%;
  padding-bottom: 8.333333%;
}

/* — Conditions */
.active-panels #panels {
  width: 420px;
  opacity: 1;
}

/* Colors */
.color {
  cursor: pointer;
  position: relative;
}
.color .name {
  display: none;
}
.empty-color {
  border: dashed #333;
  border-width: 0 1px 1px 0;
}

#inspector .color:not(button) {
  cursor: default;
}

#panels {
  position: relative;
  width: 0;
  z-index: 2;
  opacity: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}
#palettes {
  border-top: 2px solid #444;
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
  overflow: auto;
  position: relative;
}
#palettes > header {
  display: flex;
  align-items: center;
  padding-bottom: 0.5rem;
  padding-right: 0.5rem;
  padding-left: 1.25rem;
}
#palettes > header h1 {
  text-transform: uppercase;
  color: #999;
  font-size: 0.875rem;
}
#palettes > article h1 {
  margin-top: 0.25rem
}
#palettes > header button {
  padding: 0;
  font-weight: 400;
  line-height: 0.5;
  width: 30px;
  height: 30px;
  font-size: 2rem;
}

#color-tools {
  display: flex;
  padding: 0.5rem 0.5rem 0.5rem 20px;
}

.color-tool {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: #fff;
  flex: 1;
  padding: 0.5rem 0;
}

.color-tool[disabled] {
  opacity: 0.5;
}

.color-tool.active {
  background: #444;
}


#palette, 
#palette_header::before, 
#app_controls::before {
  background: #323232;
}
#palette {
  width: 360px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 4;
}
#palette_colors {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding-left: 20px;
  padding-top: 20px;
}
#app_controls {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  padding: 18px 20px 16px;
  gap: 1rem;
}

#app_controls::before {
  content: '';
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 5px;
  opacity: 0.3;
}
#palette_header {
  position: relative;
  z-index: 4;
  padding: 20px;
  padding-bottom: 0;
}
#palette_header::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 0;
  left: 0;
  height: 5px;
  margin-bottom: -1px;
  opacity: 0.3;
}
#palette h1 {
  font-size: 24px;
  line-height: 1;
}
#palette .active-palette {
  margin-right: 5px;
}
#palette_header h2 {
  margin-bottom: -0.375em;
  line-height: 1;
  font-size: 3rem;
  color: #fff;
}
#palette_controls {
  display: flex;
  justify-content: space-between;
  position: relative;
}
#palette_menu_trigger {
  font-size: 1.5rem;
  padding: 0;
  margin-top: -2em;
  width: 30px;
}
#palette_menu {
  background: #fff;
  opacity: 0;
  width: 180px;
  display: flex;
  flex-direction: column;
}
#palette_menu button {
  display: flex;
  width: 100%;
  justify-content: end;
  height: 2.5rem;
}
#palette_delete_button {
  border-bottom: 2px solid #eee;
  color: #f14d52;
}
#palette_controls :popover-open {
  position: absolute;
  inset: unset;

  right: 0;
  bottom: 64px;
  opacity: 1;
  transition: all 0.3s ease;
}

#palette_colors .color {
  display: block;
  float: none;
  height: 85px;
  margin-bottom: 20px;
  /* animation: 0.25s scalemation; */
  transition: all 0.2s ease;
}
#palette_colors .color.deleted {
  height: 0;
  opacity: 0;
  -webkit-transform: scale(0.5);
  -moz-transform: scale(0.5);
  -ms-transform: scale(0.5);
  -o-transform: scale(0.5);
  transform: scale(0.5);
}
#palette_colors .name {
  display: block;
  position: absolute;
  top: -.75em;
  left: 0.4em;
  font-size: 24px;
  font-style: normal;
  font-weight: bold;
  color: #fff;
  pointer-events: none;
  white-space: nowrap;
  text-shadow: 0 0 0.25em rgba(0, 0, 0, 30%);
}
.mix-mark {
  color: #ccc;
}
.project-info {
  border-top: 2px solid #444;
  margin-top: 20px;
  padding: 10px 20px 85px 0;
  color: #999;
}
.project-info p + p {
  margin-top: 0.75em;
}
.project-info a {
  color: #fff;
  background: #232323;
}

*:focus {
  outline: none;
}

.color-preview {
  position: relative;
  display: flex;
  flex: 1;
}
.color-preview .close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 99999;
}
.color-preview .color {
  width: 100%;
  padding-bottom: 50%;
}
#inspector {
  margin-top: 1.25rem;
  margin-left: 1.25rem;
}

#placeholder {
  display: flex;
  flex-direction: column;
  background: #444;
  height: 332px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #fff;
}
#preview {
  position: relative;
  height: 200px;
  display: flex;
}
#subjects {
  display: flex;
  flex: 1;
}
.color-name {
  position: absolute;
  font-size: 2.5rem;
  top: -.75em;
  left: 0.4em;
  color: #fff;
  white-space: nowrap;
  flex: 1;
  display: flex;
  text-shadow: 0 0 0.25em rgba(0, 0, 0, 30%);
}
#subjects[data-subjects="2"] .color-name {
  font-size: 24px;
  top: -.75em;
}

#mixButton, #mixControls {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -15px;
}
#mixButton, #mixBalance {
  z-index: 4;
}
#mixButton {
  padding: 0;
  text-align: center;
  width: 50px;
  height: 30px;
  margin-left: -25px;
  transition: all 0.2s;
  animation: opacity .2s;
}
#mixButton.active {
  outline: 0;
  width: 30px;
  margin-left: -15px;
  color: #fff;
  pointer-events: none;
  transform: rotate(45deg);
}

#activePalette input {
  appearance: none;
  font: inherit;
  color: inherit;
  background: transparent;
}

#mixControls {
  margin-left: -65px;
  background-color: #232323;
}
input[type=range] {
  -webkit-appearance: none;
  background: no-repeat transparent center;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background-color: #fff;
  width: 30px;
  height: 30px;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
#mixBalance {
  position: relative;
  width: 130px;
  height: 30px;
  background-size: 120px 100%;
}
#mixBalance::-webkit-slider-thumb {
}

#colorHueRange {
  background-image: -moz-linear-gradient(left, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  background-image: -ms-linear-gradient(left, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  background-image: -o-linear-gradient(left, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  background-image: -webkit-linear-gradient(left, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  background-image: linear-gradient(left, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
}

#mixResult {
  position: absolute;
  width: 100%;
  top: 50%;
  bottom: 0;
  z-index: 3;
  margin-top: 15px;
  padding: 0.5rem;
  display: flex;
  animation: opacity .2s;
  align-items: end;
  justify-content: end;
}

#mixWeightA, #mixWeightB {
  position: absolute;
  bottom: 100%;
  font-weight: bold;
  color: #232323;
  font-size: 21px;
}

#mixWeightA {
  right: 50%;
  margin-right: 75px;
}
#mixWeightB {
  left: 50%;
  margin-left: 75px;
}


.color-preview .color .mix-mark {
  display: none;
}

#subjects[data-subjects="2"] .color-preview:last-child .color-name {
  left: 20px;
}
.log {
  position: relative;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}
.subtitle {
  color: #999;
}
.dropzone {
  position: relative;
  height: 100%;
  text-align: center;
  margin: 0 20px;
  border: 2px dashed #666;
  animation: opacity 0.2s ease-in-out;
}
.dropzone p {
  color: #fff;
  line-height: 1.3;
  font-size: 0.875rem;
}
.dropzone hr {
  margin: 10px auto;
  border-bottom: 2px solid #444;
  width: 33.333%;
}
.dropzone i.drop {
  margin-bottom: 0.5rem;
  display: inline-block;
}
.dropzone a {
  color: #fff;
  text-decoration: none;
}
.dropzone .content {
  position: absolute;
  width: 100%;
  top: 50%;
  margin-top: -70px;
}

.mode-dialog {
  height: 0;
  padding: 0;
  background: #fff;
  transition: padding 0.3s ease, height 0.3s ease;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.active-compare-mode #compareModeDialog,
.active-mix-mode #mixModeDialog {
  height: 45px;
}
.mode-dialog button {
  position: absolute;
  right: 8px;
}

.color-editor {
  width: 300px;
  position: absolute;
  right: 100%;
  top: 20px;
  margin-right: -100px;
  background: #fff;
  color: #999;
  z-index: 999;
  opacity: 0;
  -webkit-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}
.color-editor.active {
  opacity: 1;
  margin-right: 25px;
}
.color-editor::after {
  position: absolute;
  content: '';
  top: 0.6125rem;
  left: 100%;
  border: 0.6125rem solid transparent;
  border-left-color: #eee;
  border-right: none;
}
.color-editor section,
.color-editor footer {
  margin: 0;
  padding: 0 1rem;
  height: 2.5rem;
}
.color-editor section {
  display: flex;
  border-bottom: 2px solid #eee;
}
.color-editor section:first-of-type {
  border-bottom: none;
}
.color-editor section:last-of-type {
  border-bottom: none;
  box-sizing: content-box;
  padding-bottom: 0.5rem;
}
.color-editor footer {
  padding-bottom: 10px;
}
.color-editor .top {
  background: #eee linear-gradient(to bottom, #eee 0%, #eee 80%, #e9e9e9 100%);
}
.color-editor header {
  width: 5rem;
  gap: 0.5rem;
}
.color-editor header,
.color-editor div {
  display: flex;
  align-items: center;
  justify-content: start;
}
.color-editor div input[type=text] {
  display: block;
  width: 160px;
}

.color-editor label {
  font-weight: bold;
  font-size: 1rem;
}
.color-editor input[type=text] {
  font-weight: bold;
  font-size: 1.25rem;
}
.color-editor label {
  text-transform: uppercase;
}
.color-editor input[type=text],
.color-editor input[type=number] {
  font-family: inherit;
  background: transparent;
}
.color-editor header input {
  width: 70px;
}
.color-editor input[type=range] {
  width: 200px;
  height: 25px;
  margin: 0 -10px;
  background-size: 180px 100%;
}
.color-editor input[type=range]::-webkit-slider-thumb {
  width: 25px;
  height: 25px;
}

/* Animations */
@-webkit-keyframes scalemation {
  0%   { height: 0px; }
  50%  { height: 100px; }
  100% { height: 85px; }
}
@-moz-keyframes scalemation {
  0%   { height: 0px; }
  50%  { height: 100px; }
  100% { height: 85px; }
}
@keyframes scalemation {
  0%   { height: 0px; }
  50%  { height: 100px; }
  100% { height: 85px; }
}

@-webkit-keyframes opacity {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@-moz-keyframes opacity {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes opacity {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* Icons */
.close {
  /* Use with '&times;' */
  width: 30px;
  height: 30px;
  font-size: 28px;
  line-height: 1rem;
  color: #fff;
  background: #232323;
  background: rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.close span {
  pointer-events: none;
}
.close:hover {
  background: #111;
  background: rgba(0,0,0,.5);
}

i.compare-icon,
i.mix-icon,
i.edit-icon,
i.add-to-palette-icon,
i.remove-icon {
  cursor: pointer;
  display: inline-block;
  width: 76px;
  height: 38px;
  background: center no-repeat;
  background-size: auto 38px;
}
i.compare-icon {
  background-image: url('./images/icons/compare.png');
}
i.mix-icon {
  background-image: url('./images/icons/mix.png');
}
i.edit-icon {
  background-image: url('./images/icons/edit.png');
}
i.add-to-palette-icon {
  background-image: url('./images/icons/add-to-palette.png');
}
i.remove-icon {
  background-image: url('./images/icons/remove.png');
}

.contrast {
  position: absolute;
  right: calc(0.5rem + 5px);
  width: 20px;
  height: 20px;
  top: 50%;
  margin-top: -10px;
  text-indent: -999em;
  cursor: help;
  background: no-repeat;
  background-size: cover;
}
i.drop {
  display: inline-block;
  width: 32px;
  height: 32px;
  background-image: url('./images/icons/drop.png');
  background-size: cover;
}
.good.contrast {
  background-image: url('./images/icons/check.png');
}
.bad.contrast {
  background-image: url('./images/icons/warning.png');
}

i.menu-exit,
i.menu-lock,
i.menu-palettes,
i.menu-panel,
i.menu-plus,
i.menu-settings,
i.menu-user,
i.menu-schemer,
i.undo,
i.redo {
  display: inline-block;
  cursor: pointer;
  background: no-repeat center;
  background-size: cover;
}
i.menu-exit {
  width: 28px;
  height: 28px;
  background-image: url('./images/icons/menu-exit.png');
}
i.menu-lock {
  width: 22px;
  height: 26px;
  background-image: url('./images/icons/menu-lock.png');
}
i.menu-palettes {
  width: 31px;
  height: 23px;
  background-image: url('./images/icons/menu-palettes.png');
}
i.menu-panel {
  width: 31px;
  height: 23px;
  background-image: url('./images/icons/menu-panel.png');
}
i.menu-plus {
  width: 24px;
  height: 24px;
  background-image: url('./images/icons/menu-plus.png');
}
i.menu-settings {
  width: 28px;
  height: 28px;
  background-image: url('./images/icons/menu-settings.png');
}
i.menu-user {
  width: 26px;
  height: 26px;
  background-image: url('./images/icons/menu-user.png');
}
i.menu-schemer {
  width: 31px;
  height: 23px;
  background-image: url('./images/icons/menu-schemer.png');
}
i.redo, i.undo {
  width: 32px;
  height: 32px;
}
i.redo {
  background-image: url('./images/icons/redo@2x.png');
}
i.undo {
  background-image: url('./images/icons/undo@2x.png');
}
#undo, #redo {
  padding: 0;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  i.drop {
    background-image: url('./images/icons/drop@2x.png');
  }
  .good.contrast {
    background-image: url('./images/icons/check@2x.png');
  }
  .bad.contrast {
    background-image: url('./images/icons/warning@2x.png');
  }

  i.compare-icon {
    background-image: url('./images/icons/compare@2x.png');
  }
  i.mix-icon {
    background-image: url('./images/icons/mix@2x.png');
  }
  i.edit-icon {
    background-image: url('./images/icons/edit@2x.png');
  }
  i.add-to-palette-icon {
    background-image: url('./images/icons/add-to-palette@2x.png');
  }
  i.remove-icon {
    background-image: url('./images/icons/remove@2x.png');
  }
  i.menu-exit {
    background-image: url('./images/icons/menu-exit@2x.png');
  }
  i.menu-lock {
    background-image: url('./images/icons/menu-lock@2x.png');
  }
  i.menu-palettes {
    background-image: url('./images/icons/menu-palettes@2x.png');
  }
  i.menu-panel {
    background-image: url('./images/icons/menu-panel@2x.png');
  }
  i.menu-plus {
    background-image: url('./images/icons/menu-plus@2x.png');
  }
  i.menu-settings {
    background-image: url('./images/icons/menu-settings@2x.png');
  }
  i.menu-user {
    background-image: url('./images/icons/menu-user@2x.png');
  }
  i.menu-schemer {
    background-image: url('./images/icons/menu-schemer@2x.png');
  }
}

/* Share functionality */
.palette-buttons {
  overflow: hidden;
}
.palette-buttons .button {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
}

/* Share view */
.palette-page {
  height: 100%;
  margin-left: -110px;
  overflow: scroll;
}
.active-palette {
  width: 75%;
  margin: 50px auto 100px;
}
.active-palette .color {
  width: 100%;
  height: 200px;
  margin-bottom: 50px;
  float: none;
  cursor: default;
}
.active-palette .color-info {
  width: 25%;
  height: 200px;
  padding: 20px 30px;
  float: right;
  background: #333;
}
.active-palette h1 {
  margin-top: -60px;
  font-size: 48px;
  color: #fff;
}
.active-palette h1 {
  position: absolute;
  margin-top: -40px;
  margin-left: 20px;
}
.active-palette p {
  margin-bottom: 20px;
  line-height: 1.5;
  color: #ccc;
}
