/* Custom Theme Toggle - ctt-style.css */

/* Theme colors (from user) */
body.light-mode {
  background: #F7F5F2;
}

body.dark-mode {
  background: #020256;
  color: #F7F5F2;
}

body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Toggle base (inline / header style) */
.ctt-toggle {
  display: inline-block;
  vertical-align: middle;
  font-family: sans-serif;
}

/* inline vs fixed */
.ctt-inline { }
.ctt-fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

/* Track */
.ctt-track {
  position: relative;
  width: 110px;
  height: 44px;
  border-radius: 30px;
  padding: 6px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  overflow: visible;
}

/* Light / dark track colors */
body.light-mode .ctt-track {
  background: #F2E4CE;
  border: 1px solid #00000029;
}
body.dark-mode .ctt-track {
  background: rgba(255,255,255,0.06);
  box-shadow: 0 2px 0 rgba(255,255,255,0.02) inset;
}

/* Icons container */
.ctt-icons {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 6px;
  pointer-events: none;
  left: 5px;
  position: relative;
  z-index: 999;
}
/* ❌ Removed extra closing brace here */
.ctt-icons.right { order: 3; }

.ctt-icons .icon {
  width: 22px;
  height: 22px;
  display: block;
  opacity: 0.6;
  transition: opacity 0.25s ease, transform 0.25s ease;
  left: 5px;
  position: relative;
}
/* ❌ Removed another extra brace that was breaking the block */

/* Knob */
.ctt-knob {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 44px;
  height: 32px;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 6px 18px rgba(2,2,86,0.08);
  transition: left 0.28s cubic-bezier(.2,.9,.2,1), background 0.28s ease, box-shadow 0.28s ease;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Active/inactive icon visibility */
body.light-mode .moon-active { opacity: 0; transform: scale(0.9); }
body.light-mode .moon-inactive { opacity: 1; transform: scale(1); }

body.light-mode .sun-active { opacity: 1; transform: scale(1); }
body.light-mode .sun-inactive { opacity: 0; transform: scale(0.9); }

body.dark-mode .moon-active { opacity: 1; transform: scale(1); }
body.dark-mode .moon-inactive { opacity: 0; transform: scale(0.9); }

body.dark-mode .sun-active { opacity: 0; transform: scale(0.9); }
body.dark-mode .sun-inactive { opacity: 1; transform: scale(1); }

/* Move knob to right in dark mode */
body.dark-mode .ctt-knob {
  left: calc(100% - 50px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* Focus state */
.ctt-toggle:focus { outline: 2px solid rgba(0,0,0,0.12); outline-offset: 3px; }

/* Responsive tweak */
@media (max-width: 480px) {
  .ctt-track { width: 90px; height: 38px; }
  .ctt-knob { width: 38px; height: 30px; top: 4px; }
}
