/* Seletor de idioma flutuante — canto superior direito */
#projtr-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: inherit;
}

#projtr-switcher button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

#projtr-switcher button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

#projtr-switcher button.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px #f36524;
}

#projtr-switcher button:focus-visible {
  outline: 2px solid #f36524;
  outline-offset: 2px;
}

#projtr-switcher svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Micro-indicador de carregamento enquanto traduz */
#projtr-switcher.is-loading::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid transparent;
  border-top-color: #f36524;
  animation: projtr-spin 0.7s linear infinite;
  pointer-events: none;
}

@keyframes projtr-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  #projtr-switcher { top: 10px; right: 10px; }
  #projtr-switcher button { width: 34px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  #projtr-switcher button,
  #projtr-switcher.is-loading::after { transition: none; animation: none; }
}
