.theme-toggle,
button.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-weight: normal;
  text-align: center;
}

.theme-toggle:hover {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.theme-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.theme-icon-sun {
  display: none;
}

[data-theme='dark'] .theme-toggle .theme-icon-sun {
  display: block;
}

[data-theme='dark'] .theme-toggle .theme-icon-moon {
  display: none;
}

.theme-toggle-floating {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  box-shadow: var(--shadow, 0 4px 12px rgba(15, 23, 42, 0.12));
  background: var(--color-surface, #fff);
}
