/* ═══════════════════════════════════════════
   THEME TOGGLE BUTTON
   ═══════════════════════════════════════════ */

.theme-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.theme-toggle:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

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

/* Icon container */
.theme-toggle-icon {
  position: relative;
  width: 24px;
  height: 24px;
}

/* Sun icon (visible in dark mode) */
.theme-toggle-sun {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: rotate(90deg) scale(0);
  transition: all 0.4s var(--ease);
}

[data-theme="dark"] .theme-toggle-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Moon icon (visible in light mode) */
.theme-toggle-moon {
  position: absolute;
  inset: 0;
  opacity: 1;
  transform: rotate(0deg) scale(1);
  transition: all 0.4s var(--ease);
}

[data-theme="dark"] .theme-toggle-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

/* SVG styling */
.theme-toggle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Tooltip */
.theme-toggle::after {
  content: attr(aria-label);
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  z-index: 1000;
}

.theme-toggle:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  .theme-toggle-icon {
    width: 20px;
    height: 20px;
  }

  .theme-toggle::after {
    display: none;
  }
}
