$dark1: #2e3440;
$dark2: #3b4252;
$dark3: #434c5e;
$dark4: #4c566a;

$light1: #d8dee9;
$light2: #e5e9f0;
$light3: #eceff4;

$frost1: #88c0d0;
$frost2: #81a1c1;
$frost3: #5e81ac;
html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body.light-mode {
  background-color: $light1;
  color: #434c5e;
  transition: background-color 0.3s ease;
}

body.dark-mode {
  background-color: $dark1;
  color: $light1;

  .dark-mode-toggle > button {
    color: $dark1;
    &:last-child {
      color: $light1;
    }
  }
}

.skewed {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: #81a1c1;
  z-index: 0;
  transform: skewY(5deg);
  transform-origin: top right;
}
a {
  text-decoration: none;
  color: inherit;
}

a:visited {
  color: inherit;
}

.container {
  margin: 0 auto;
  max-width: 860px;
  min-height: 100vh;
  overflow: hidden;
  display: block;
  position: relative;
}

.content {
  padding: 1rem;
  margin-top: 2rem;
  margin-bottom: 5rem;
  font-size: 1em;
  line-height: 1.5em;

  h1 {
    font-size: 2rem;
  }

  img {
    width: 100%;
  }

  input {
    background-color: $light3;
  }

  button {
    background-color: $light3;
  }

  Link {
    color: $dark3;
  }
}

body.dark-mode Link {
  color: $light3;
}

body.dark-mode .content button {
  color: #bf616a;
}

body.dark-mode .skewed {
  background-color: $dark2;
}

.dark-mode-toggle {
  margin-right: 3rem;
  display: flex;
  & > button {
    font-size: 1.2em;
    background: none;
    border: none;
    color: #ebcb8b;
    cursor: pointer;
    transition: color 0.3s ease;
    &:last-child {
      color: $dark1;
    }

    &:focus {
      outline: none;
    }
  }
}

.toggle-control {
  position: relative;
  padding: 0 4px;
  display: flex;
  align-items: center;
}

input[type='checkbox'].dmcheck {
  width: 40px;
  height: 10px;
  background: #555;
  position: relative;
  border-radius: 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  vertical-align: 2px;
  outline: none;

  &:checked + label {
    left: 30px;
  }

  &:focus-visible {
    outline: solid 2px white;
  }

  & + label {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    position: absolute;
    left: 2px;
    background: #fff;
    opacity: 0.9;
    background-color: #f6f6f6;
  }
}

.Toastify__toast {
  font-size: 1rem;
  font-weight: bold;
  color: $dark1;
  padding-left: 1rem;
  background-color: #81a1c1;
}

body.dark-mode .Toastify__toast {
  background-color: $dark2;
  color: $light2;
}

.Toastify__close-button {
  background-color: none;
}
