/* Google Translate chrome — hide default UI */
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-te-spinner-pos,
.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
}
body {
  top: 0 !important;
}
/* Legacy Google Website Translator chrome (unused, keep hidden if present) */
#google_translate_element,
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
body > .skiptranslate,
.goog-te-gadget {
  display: none !important;
}
font {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Language switcher — positioned under Log In via JS */
.lang-wrap {
  position: fixed;
  top: 64px;
  right: 24px;
  z-index: 2147483000;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.2;
  visibility: hidden;
}
.lang-wrap.is-placed {
  visibility: visible;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(55, 55, 55, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #2a2a2a;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}
.lang-btn:hover {
  background: #fff;
  border-color: rgba(55, 55, 55, 0.55);
}
.lang-btn .flag,
.lang-menu .flag {
  font-size: 15px;
  line-height: 1;
}
.lang-btn .lang-name {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.lang-btn .caret {
  opacity: 0.65;
  font-size: 10px;
}
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(260px, calc(100vw - 24px));
  max-height: min(380px, calc(100vh - 96px));
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}
.lang-wrap.open .lang-menu {
  display: block;
}
.lang-wrap.is-busy .lang-btn {
  opacity: 0.65;
  pointer-events: none;
}
.lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #222;
  text-align: left;
  cursor: pointer;
}
.lang-menu button:hover,
.lang-menu button.active {
  background: rgba(0, 0, 0, 0.06);
}
.lang-menu button.active {
  font-weight: 600;
}

@media (max-width: 640px) {
  .lang-btn .lang-name {
    display: none;
  }
}
