/* TGA V29 R12 — navigation only: Sound Room arrows + connected language dropdown. */

/* --------------------------------------------------------------------------
   Shared language selector — one active language at rest, connected vertical
   menu when opened. The visual treatment is inherited from the Sound Room.
   -------------------------------------------------------------------------- */
.hero__topbar .language-switcher,
.soundroom-app .language-switch {
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 16px !important;
  background: rgba(22,15,12,.30) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.16) !important;
  -webkit-backdrop-filter: blur(14px) saturate(130%) !important;
  backdrop-filter: blur(14px) saturate(130%) !important;
  overflow: hidden !important;
  isolation: isolate;
}

.hero__topbar .language-switcher {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  top: max(16px, env(safe-area-inset-top)) !important;
  right: max(16px, env(safe-area-inset-right)) !important;
  z-index: 10000 !important;
  width: 46px !important;
  min-width: 46px !important;
  padding: 0 !important;
  pointer-events: auto !important;
}

.hero__topbar .language-switcher > summary,
.hero__topbar .language-switcher__trigger {
  display: none !important;
}

.hero__topbar .language-switcher__menu,
.hero__topbar .language-switcher__menu.language-switcher__menu--always {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  position: static !important;
  inset: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  box-shadow: none !important;
  white-space: normal !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: hidden !important;
}

.soundroom-app .language-switch {
  justify-self: end !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  width: 46px !important;
  min-width: 46px !important;
}

.hero__topbar .language-switcher__option,
.hero__topbar .language-switcher__menu a,
.soundroom-app .language-switch button {
  position: relative !important;
  order: 0;
  display: none !important;
  place-items: center !important;
  width: 46px !important;
  min-width: 46px !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(255,255,255,.11) !important;
  border-radius: 0 !important;
  color: rgba(255,255,255,.68) !important;
  text-decoration: none !important;
  font: 600 9px/1 "DM Sans", Inter, system-ui, sans-serif !important;
  letter-spacing: .10em !important;
  background: rgba(255,255,255,.025) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  cursor: pointer !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: color .18s ease, background .18s ease !important;
}

.hero__topbar .language-switcher__option.is-active,
.hero__topbar .language-switcher__menu a[aria-current="page"],
.soundroom-app .language-switch button.active {
  order: -1;
  display: grid !important;
  border-top: 0 !important;
  color: #fff !important;
  background: linear-gradient(145deg, rgba(199,141,89,.88), rgba(164,101,49,.82)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22) !important;
}

.hero__topbar .language-switcher__option.is-active::after,
.hero__topbar .language-switcher__menu a[aria-current="page"]::after,
.soundroom-app .language-switch button.active::after {
  content: "⌄";
  position: absolute;
  right: 5px;
  top: 50%;
  font-size: 8px;
  line-height: 1;
  opacity: .72;
  transform: translateY(-55%);
  transform-origin: 50% 52%;
  transition: transform .2s ease;
}

.hero__topbar .language-switcher.is-open .language-switcher__option,
.hero__topbar .language-switcher.is-open .language-switcher__menu a,
.soundroom-app .language-switch.is-open button {
  display: grid !important;
}

.hero__topbar .language-switcher.is-open .language-switcher__option.is-active::after,
.hero__topbar .language-switcher.is-open .language-switcher__menu a[aria-current="page"]::after,
.soundroom-app .language-switch.is-open button.active::after {
  transform: translateY(-42%) rotate(180deg);
}

.hero__topbar .language-switcher.is-open .language-switcher__option:hover,
.hero__topbar .language-switcher.is-open .language-switcher__option:focus-visible,
.hero__topbar .language-switcher.is-open .language-switcher__menu a:hover,
.hero__topbar .language-switcher.is-open .language-switcher__menu a:focus-visible,
.soundroom-app .language-switch.is-open button:hover,
.soundroom-app .language-switch.is-open button:focus-visible {
  outline: 0 !important;
  color: #fff !important;
  background: rgba(255,255,255,.09) !important;
}

/* --------------------------------------------------------------------------
   Main application back arrows — exact Sound Room pill language and arrow.
   -------------------------------------------------------------------------- */
.hero__topbar .back-button {
  justify-self: start !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 14px 0 11px !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 999px !important;
  background: rgba(22,15,12,.27) !important;
  color: #f3e8da !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  font: 550 9px/1 "DM Sans", Inter, system-ui, sans-serif !important;
  letter-spacing: .08em !important;
  cursor: pointer !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.hero__topbar .back-button:hover,
.hero__topbar .back-button:focus-visible {
  background: rgba(22,15,12,.46) !important;
}

.hero__topbar .back-button svg {
  display: none !important;
}

.hero__topbar .back-button::before {
  content: "←";
  flex: none;
  font-size: 17px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
}

.hero__topbar .back-button .sr-only {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 0 !important;
}

/* Standalone legal pages use the same circular Sound Room arrow treatment. */
.legal-page .back-button.legal-back {
  display: inline-grid !important;
  place-items: center !important;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 50% !important;
  background: rgba(22,15,12,.88) !important;
  color: transparent !important;
  font-size: 0 !important;
  text-decoration: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 22px rgba(0,0,0,.16) !important;
}

.legal-page .back-button.legal-back::before {
  content: "←";
  color: #f3e8da;
  font: 400 17px/1 "DM Sans", Inter, system-ui, sans-serif;
}

@media (max-width: 650px) {
  .hero__topbar .language-switcher,
  .soundroom-app .language-switch {
    width: 42px !important;
    min-width: 42px !important;
    border-radius: 14px !important;
  }

  .hero__topbar .language-switcher__option,
  .hero__topbar .language-switcher__menu a,
  .soundroom-app .language-switch button {
    width: 42px !important;
    min-width: 42px !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 8px !important;
  }

  .hero__topbar .back-button {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }

  .hero__topbar .back-button .sr-only {
    display: none !important;
  }
}
