/* Theme Toggle button — sits inside the sidebar / top nav bar */
.iv-theme-toggle {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--iv-accent-rgb), 0.22), rgba(var(--iv-accent-rgb), 0.06));
  border: 1px solid rgba(var(--iv-accent-rgb), 0.36);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0;
  outline: none;
  margin-top: 16px;
}

.iv-theme-toggle:hover {
  transform: scale(1.1) rotate(10deg);
  background: linear-gradient(135deg, rgba(var(--iv-accent-rgb), 0.38), rgba(var(--iv-accent-rgb), 0.12));
  box-shadow: 0 6px 20px rgba(var(--iv-accent-rgb), 0.3);
}

.iv-theme-toggle:active {
  transform: scale(0.95);
}

.iv-theme-icon {
  font-size: 20px;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
  transition: transform 0.3s ease;
}

/* Desktop top nav bar (≥980px): push toggle to the far right */
@media (min-width: 980px) {
  .iv-theme-toggle {
    margin-top: 0;
    margin-left: auto;
  }
}

/* Mobile sidebar: button at the bottom of the drawer */
@media (max-width: 979px) {
  .iv-theme-toggle {
    margin-top: auto;
    align-self: center;
  }
}
