@font-face {
  font-family: 'Poppins';
  font-weight: 500;
  font-style: normal;
  src: url('/fonts/Poppins-Medium.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-weight: 600;
  font-style: normal;
  src: url('/fonts/Poppins-SemiBold.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-weight: 700;
  font-style: normal;
  src: url('/fonts/Poppins-Bold.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-weight: 800;
  font-style: normal;
  src: url('/fonts/Poppins-ExtraBold.ttf');
}

@font-face {
  font-family: 'Poppins';
  font-weight: 900;
  font-style: italic;
  src: url('/fonts/Poppins-BlackItalic.ttf');
}

:root {
  --switch-size: 50px;
  --switch-size-offset: 51px;
  --switch-gap: 4px;
  --swatch-size: 25px;
  --swatch-gap: 2px;
}

* {
  padding: 0;
  margin: 0;
}

html {
  height: 100vh;
}

body {
  font-family: 'Poppins', sans-serif;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .25s;
}

.color-mixer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: white;
  padding: 15px;
  border-radius: 10px;
  max-width: 430px;
}

.colors {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: var(--switch-gap);
  -webkit-user-select: none;
  user-select: none;
}

.color {
  display: flex;
  gap: var(--switch-gap);
  flex-wrap: wrap;
}

.switch {
  width: var(--switch-size);
  height: var(--switch-size);
  background-color: var(--color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;

  &:first-child,
  &:last-child {
    width: var(--switch-size-offset);
  }
  
  &[data-active="Y"] {
    color: var(--color);
  }

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

}

.output-wrap {
  position: relative;
}

.output {
  font-size: 40px;
  text-align: center;
  line-height: 1;
  font-family: monospace;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

button {
  cursor: pointer;
  border: 0;
  background-color: black;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: inherit;
  font-weight: 600;
  color: white;
  overflow: hidden;
  opacity: 0.65;
  transition: opacity 0.125s;
  
  &:hover,
  &:active {
    opacity: 1;
  }

}

button.copy {
  padding: 12px 15px;
  position: relative;

  .default {
    position: absolute;
    background-color: black;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &[data-state="copied"] {

    .default {
      display: none;
    }

  }

}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--swatch-gap);

  .swatch,
  .fave {
    cursor: pointer;
    width: var(--swatch-size);
    height: var(--swatch-size);
  }

  .swatch {
    &:hover {
      transform: scale(0.9);
    }
  }

  .fave {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    line-height: 1;
    padding-top: 4px;
    box-sizing: border-box;
  }

}
