/* ------------ VARIABLES ------------ */
:root{
  /* COLORS */
  --color: #9176FF;
  --dark-color: #2b2b2b;
  --dark-icon-color: #fff;
  --light-color: #f7f7f7;
  --light-icon-color: #FFDE59;
}

/* -------------- BUTTON -------------- */
.theme_switch{
  background-color: #fff;
  width: 54px;
  height: 27px;
  border-radius: 33px;
  padding: 0 1px;
  top: 20px;
  right: 20px;
  transform: translateX(-27px);

  box-shadow: inset 0 8px 60px rgba(0,0,0, .1),
              inset 0 8px 8px rgba(0,0,0, .1),
              inset 0 -4px 4px rgba(0,0,0, .1);

  position: absolute;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.theme_switch__indicator{
  background-color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;

  position: absolute;

  box-shadow: 0 8px 40px rgba(0,0,0, .2);

  transition: transform .3s ease;
}

.theme_switch__icon-container{
  width: 100%;
  height: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
}

.theme_switch__icon{
  color: var(--light-icon-color);
  font-size: 11px;
}

/* -------------- ANIMATION ------------ */
.theme_switch__icon.animated{
  animation: spin 0.5s;
}

@keyframes spin{
  to {
    transform: rotate(360deg);
  }
}

/* -------------- DARKMODE -------------- */
body.dark-theme{
  background-color: var(--dark-color);
}

.dark-theme .theme_switch{
  box-shadow: inset 0 8px 60px rgba(0,0,0, .3),
              inset 8px 0 8px rgba(0,0,0, .3),
              inset 0 -4px 4px rgba(0,0,0, .3);
}

.dark-theme .theme_switch__indicator{
  transform: translateX(24px);
  background-color: var(--dark-color);
  box-shadow: 0 8px 40px rgba(0,0,0, .3);
}

.dark-theme .theme_switch__icon{
  color: var(--dark-icon-color);
}

