/* ===== ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ (круглый слайдер) ===== */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 8px;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 28px;
}

.theme-switch__input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  transition: 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.theme-switch__slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  z-index: 1;
}

/* Иконки внутри слайдера */
.theme-switch__icon {
  font-size: 12px;
  z-index: 0;
  transition: opacity 0.2s;
}

.theme-switch__icon--light {
  color: #f59e0b;
  opacity: 1;
}

.theme-switch__icon--dark {
  color: #6366f1;
  opacity: 0.4;
}

/* Активное состояние (тёмная тема) */
.theme-switch__input:checked + .theme-switch__slider {
  background-color: #374151;
  border-color: #4b5563;
}

.theme-switch__input:checked + .theme-switch__slider::before {
  transform: translateX(28px);
}

.theme-switch__input:checked + .theme-switch__slider .theme-switch__icon--light {
  opacity: 0.4;
}

.theme-switch__input:checked + .theme-switch__slider .theme-switch__icon--dark {
  opacity: 1;
}