.tm-language-switcher {
  position: relative;
  z-index: 10020;
  color: #eef4ff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tm-language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 54px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 999px;
  background: rgba(8, 16, 28, .78);
  color: #dce9fa;
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.tm-language-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.tm-language-toggle:hover,
.tm-language-toggle:focus-visible,
.tm-language-toggle[aria-expanded="true"] {
  border-color: #42c9f4;
  background: rgba(66, 201, 244, .10);
  color: #42c9f4;
  outline: none;
}

.tm-language-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 205px;
  max-height: min(68vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px;
  border: 1px solid rgba(66, 201, 244, .30);
  border-radius: 14px;
  background: #0b1421;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.tm-language-loading {
  margin: 4px;
  padding: 10px;
  color: #7f91a8;
  font: 600 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
  text-transform: uppercase;
}

.tm-language-menu[hidden] {
  display: none !important;
}

.tm-language-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #c6d1df;
  font: 600 13px/1.2 Inter, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.tm-language-menu button:hover,
.tm-language-menu button:focus-visible,
.tm-language-menu button.is-active {
  background: rgba(66, 201, 244, .10);
  color: #fff;
  outline: none;
}

.tm-language-menu button.is-active::after {
  content: "✓";
  color: #42c9f4;
  font-weight: 800;
}

.tm-language-menu small {
  margin-left: auto;
  color: #7f91a8;
  font-size: 9px;
  text-transform: uppercase;
}

.tm-language-menu button.is-active small {
  display: none;
}

.tm-language-status,
#tm-google-translate-element {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.tm-language-switcher.is-floating-fallback {
  position: fixed;
  top: 14px;
  right: 14px;
}

/* Prevent the external translator banner from shifting the TransferMoves UI. */
html.translated-ltr body,
html.translated-rtl body,
body {
  top: 0 !important;
}

.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
iframe.VIpgJd-ZVi9od-ORHb-OEVmcd,
body > .skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

html,
html.translated-ltr,
html.translated-rtl {
  margin-top: 0 !important;
}

@media (max-width: 720px) {
  .tm-language-toggle {
    min-width: 36px;
    width: 36px;
    height: 32px;
    padding: 0;
  }

  .tm-language-toggle svg {
    width: 16px;
    height: 16px;
  }

  .tm-language-current {
    position: absolute;
    right: -3px;
    bottom: -3px;
    min-width: 17px;
    padding: 2px 3px;
    border-radius: 6px;
    background: #42c9f4;
    color: #07101b;
    font-size: 7px;
    text-align: center;
  }

  .tm-language-menu {
    position: fixed;
    top: 62px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 86px);
    padding: 9px;
    border-radius: 16px;
  }

  .tm-language-menu button {
    min-height: 46px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm-language-toggle {
    transition: none;
  }
}
