/* Halo theme toggle — design guide §10 + subscription spring motion */

.halo-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 28px;
  width: 52px;
  flex-shrink: 0;
  border-radius: 9999px;
  border: 1.5px solid #3f3f46;
  background: #27272a;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.halo-toggle:active {
  transform: scale(0.97);
}

.halo-toggle:focus-visible {
  box-shadow: var(--focus-ring);
}

.halo-toggle.is-light {
  border-color: rgba(99, 102, 241, 0.55);
  background: #4f46e5;
  box-shadow: 0 0 14px -2px rgba(99, 102, 241, 0.45);
}

[data-theme="light"] .halo-toggle {
  background: #cbd5e1;
  border-color: #94a3b8;
  box-shadow: none;
}

[data-theme="light"] .halo-toggle.is-light {
  background: #4f46e5;
  border-color: #4338ca;
  box-shadow: 0 3px 10px rgba(67, 56, 202, 0.28), 0 1px 2px rgba(15, 23, 42, 0.08);
}

.halo-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  left: 3px;
  top: 50%;
  margin-top: -10px;
  display: grid;
  place-items: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  color: #0f172a;
  font-size: 0.7rem;
  line-height: 1;
  pointer-events: none;
}

.halo-toggle.is-light .halo-thumb {
  transform: translateX(24px);
  color: #4f46e5;
}

.halo-toggle .halo-thumb i {
  font-size: 0.7rem;
  line-height: 1;
}

/* Keep toggle visible in header on mobile */
.header-actions .halo-toggle {
  display: inline-flex;
}
