/* ==========================================================================
   PROJETO CEAA — WIDGET FLUTUANTE DE TRADUÇÃO MULTILÍNGUE (LATERAL DIREITA)
   ========================================================================== */

.ceaa-lang-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  user-select: none;
  -webkit-user-select: none;
}

/* Botão Flutuante Principal */
.ceaa-lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  color: #0F172A;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ceaa-lang-toggle-btn:hover {
  background: #7A1733;
  color: #FFFFFF;
  border-color: #7A1733;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(122, 23, 51, 0.25);
}

.ceaa-lang-toggle-btn.is-active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
}

.ceaa-lang-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.ceaa-lang-toggle-code {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.ceaa-lang-toggle-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.ceaa-lang-toggle-btn.is-active .ceaa-lang-toggle-arrow {
  transform: rotate(180deg);
}

/* Menu Dropdown Flutuante */
.ceaa-lang-menu {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 240px;
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  box-shadow: 0 12px 36px -4px rgba(15, 23, 42, 0.2), 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 0.65rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.96);
  transform-origin: bottom right;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.ceaa-lang-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ceaa-lang-menu-header {
  padding: 0.4rem 0.6rem 0.5rem;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 0.35rem;
}

.ceaa-lang-menu-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94A3B8;
}

.ceaa-lang-options {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ceaa-lang-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  box-sizing: border-box;
}

.ceaa-lang-item:hover {
  background: #F8FAFC;
  transform: translateX(2px);
}

.ceaa-lang-item.is-active {
  background: #FFF1F3;
}

.ceaa-lang-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.ceaa-lang-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ceaa-lang-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0F172A;
}

.ceaa-lang-item.is-active .ceaa-lang-name {
  color: #7A1733;
}

.ceaa-lang-region {
  font-size: 0.7rem;
  color: #64748B;
}

.ceaa-lang-check {
  display: none;
  color: #7A1733;
  margin-left: auto;
}

.ceaa-lang-item.is-active .ceaa-lang-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ocultação completa de barras do Google Translate nativas */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  border: none !important;
}

body {
  top: 0px !important;
  position: static !important;
}

.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Responsividade Mobile */
@media (max-width: 640px) {
  .ceaa-lang-widget {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  .ceaa-lang-toggle-btn {
    height: 40px;
    padding: 0 0.85rem;
    font-size: 0.78rem;
  }

  .ceaa-lang-menu {
    width: 220px;
    bottom: calc(100% + 0.65rem);
  }
}
