/* ==========================================
   THEME SWITCH
   Стилі для перемикача теми світла/темна
   ========================================== */

/* ==========================================
   WRAPPER
   ========================================== */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

/* ==========================================
   SWITCH CONTAINER
   ========================================== */
.theme-switch {
  position: relative;
  width: 60px;
  height: 30px;
}

/* ==========================================
   SWITCH UI
   ========================================== */
.switch-ui {
  position: absolute;
  inset: 0;
  background: var(--secondary);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
}

/* ==========================================
   SWITCH INNER (icons container)
   ========================================== */
.switch-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 5px;
}

.switch-inner i {
  color: var(--color-white);
  font-size: 14px;
  z-index: 2;
}

/* ==========================================
   SWITCH BACKDROP (moving circle)
   ========================================== */
.switch-backdrop {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 24px;
  height: 24px;
  background: var(--color-white);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 0 5px rgba(var(--rgb-black), 0.2);
}

/* ==========================================
   CHECKED STATE
   ========================================== */
input:checked + .switch-ui {
  background: var(--color-neutral-700);
}

input:checked + .switch-ui .switch-backdrop {
  transform: translateX(-30px);
}

/* ==========================================
   FOCUS STATE
   ========================================== */
.theme-switch:focus-within .switch-ui {
  box-shadow: 0 0 0 2px rgba(var(--rgb-green-500), 0.25);
}
