/* Theme Toggle Switch */
.theme-toggle-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.theme-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  cursor: pointer;
  z-index: 10;
  flex-shrink: 0;
}

.theme-toggle__input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-toggle__slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--button-bg);
  border-radius: 24px;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--surface-3);
  overflow: hidden;
}

.theme-toggle__icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-color: var(--text-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.theme-toggle__icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
  color: var(--surface-1);
}

.theme-toggle__icon--sun {
  left: 2px;
  opacity: 1;
}

.theme-toggle__icon--moon {
  right: 2px;
  opacity: 0;
}

.theme-toggle__input:checked + .theme-toggle__slider .theme-toggle__icon--sun {
  opacity: 0;
}

.theme-toggle__input:checked + .theme-toggle__slider .theme-toggle__icon--moon {
  opacity: 1;
}

.theme-toggle:hover .theme-toggle__slider {
  box-shadow: 0 0 0 2px var(--button-bg);
}