.theme-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  /* Keep below Bootstrap modal (default 1055) to avoid intercepting clicks */
  z-index: 1040;
}

.theme-toggle .dropdown-menu {
  min-width: 12rem;
}

.theme-toggle .dropdown-item[data-code-theme-value],
.theme-toggle-inline .dropdown-item[data-code-theme-value] {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-code-preview {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.theme-code-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.dropdown-item[data-code-theme-value="one-dark"] .theme-code-dot.keyword {
  background-color: #ff9bcf;
}

.dropdown-item[data-code-theme-value="one-dark"] .theme-code-dot.string {
  background-color: #8de0ff;
}

.dropdown-item[data-code-theme-value="one-dark"] .theme-code-dot.number {
  background-color: #ffd98c;
}

.dropdown-item[data-code-theme-value="one-dark"] .theme-code-dot.comment {
  background-color: #a7bddf;
}

.dropdown-item[data-code-theme-value="dracula"] .theme-code-dot.keyword {
  background-color: #ff79c6;
}

.dropdown-item[data-code-theme-value="dracula"] .theme-code-dot.string {
  background-color: #8be9fd;
}

.dropdown-item[data-code-theme-value="dracula"] .theme-code-dot.number {
  background-color: #f1fa8c;
}

.dropdown-item[data-code-theme-value="dracula"] .theme-code-dot.comment {
  background-color: #9aa3b5;
}

.dropdown-item[data-code-theme-value="nord"] .theme-code-dot.keyword {
  background-color: #b48ead;
}

.dropdown-item[data-code-theme-value="nord"] .theme-code-dot.string {
  background-color: #88c0d0;
}

.dropdown-item[data-code-theme-value="nord"] .theme-code-dot.number {
  background-color: #ebcb8b;
}

.dropdown-item[data-code-theme-value="nord"] .theme-code-dot.comment {
  background-color: #9aa7bc;
}

.theme-toggle .theme-section-label,
.theme-toggle-inline .theme-section-label {
  display: block;
  padding: 0.3rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  font-weight: 600;
}

.theme-toggle .dropdown-item.active,
.theme-toggle .dropdown-item:active {
  background-color: var(--bs-primary);
  color: #fff;
}

.theme-toggle-inline {
  position: relative;
}

.theme-toggle-inline .dropdown-menu {
  min-width: 12rem;
}

@media (max-width: 767.98px) {
  .theme-toggle {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}
