/* Theme toggle docked at bottom of .ai-nav-section */
.wm-nav-flex-spacer {
  flex: 1 1 auto;
  min-height: var(--wm-space-2, 8px);
  width: 100%;
  pointer-events: none;
}

.wm-theme-toggle-host {
  padding-top: var(--wm-space-2, 8px);
  padding-bottom: var(--wm-space-1, 4px);
  display: flex;
  justify-content: center;
  width: 100%;
}

.wm-theme-toggle {
  position: relative;
  width: 44px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--wm-radius-pill, 999px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition:
    background var(--wm-duration-med, 0.25s) var(--wm-ease-out, ease),
    box-shadow var(--wm-duration-med, 0.25s) var(--wm-ease-out, ease);
}

.wm-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 3px var(--wm-color-focus-ring, rgba(99, 102, 241, 0.25));
}

.wm-theme-toggle:focus-visible {
  outline: 2px solid var(--wm-color-accent, #136df4);
  outline-offset: 2px;
}

.wm-theme-toggle__track {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.wm-theme-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95),
    rgba(200, 210, 255, 0.85)
  );
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition:
    transform var(--wm-duration-med, 0.25s) var(--wm-ease-out, ease),
    background var(--wm-duration-med, 0.25s) var(--wm-ease-out, ease);
}

/* aria-pressed="true" => dark mode active (thumb left / moon emphasis) */
.wm-theme-toggle[aria-pressed="true"] .wm-theme-toggle__thumb {
  transform: translateX(0);
}

.wm-theme-toggle[aria-pressed="false"] .wm-theme-toggle__thumb {
  transform: translateX(14px);
  background: linear-gradient(
    145deg,
    rgba(253, 224, 71, 0.95),
    rgba(251, 191, 36, 0.9)
  );
}

[data-wm-theme="light"] .wm-theme-toggle {
  background: rgba(15, 23, 42, 0.06);
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.08);
}

[data-wm-theme="light"] .wm-theme-toggle:hover {
  background: rgba(37, 99, 235, 0.08);
}
