/* Google Translate widget + language picker */

.ir-translate-host,
#google_translate_element.ir-translate-host {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Keep platform typography stable after Google injects <font> wrappers */
body.ir-translated font,
body.ir-translated .goog-text-highlight {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.ir-translated h1,
body.ir-translated h2,
body.ir-translated h3,
body.ir-translated .ir-eyebrow,
body.ir-translated .spcx-nav-title,
body.ir-translated .agent-name,
body.ir-translated .intake-step,
body.ir-translated .support-hero h1 {
  font-family: var(--font-display, 'Barlow Condensed', Arial, sans-serif) !important;
}

body.ir-translated,
body.ir-translated p,
body.ir-translated li,
body.ir-translated button,
body.ir-translated input,
body.ir-translated select,
body.ir-translated textarea,
body.ir-translated .bubble,
body.ir-translated .chat-msg {
  font-family: var(--font-body, 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif) !important;
}

/* Live SSE / price nodes must never be re-wrapped by Google Translate */
.notranslate,
[translate="no"],
#spcx-ticker-bar .ticker-price,
#spcx-ticker-bar .ticker-change,
#spcx-ticker-bar .ticker-symbol,
#support-spcx-price,
#support-spcx-change,
#spcx-ir-price,
#spcx-ir-change,
#spcx-ir-meta,
#spcx-ir-afterhours,
[data-live] {
  font-family: var(--font-body, 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif) !important;
}

#ir-translate-panel {
  position: fixed;
  top: calc(var(--site-header-h, 96px) + 0.5rem);
  right: 1rem;
  z-index: 10050;
  width: min(320px, calc(100vw - 2rem));
  max-height: min(70vh, 520px);
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  display: flex;
  flex-direction: column;
}

#ir-translate-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ir-translate-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ir-translate-panel-head p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b4b4be;
  font-weight: 700;
}

.ir-translate-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}

.ir-translate-panel-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ir-translate-panel-list {
  overflow-y: auto;
  padding: 0.35rem;
}

.ir-translate-lang {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.85rem;
  border: none;
  background: transparent;
  color: #e8e8ec;
  font-size: 0.88rem;
  cursor: pointer;
  border-radius: 4px;
}

.ir-translate-lang:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ir-translate-status {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 100000;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.9rem;
  pointer-events: none;
}

/* Hide Google top banner */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame {
  display: none !important;
  visibility: hidden !important;
}

body {
  top: 0 !important;
}

#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

.skiptranslate {
  display: none !important;
}

/* Protect support chat structure from Google DOM moves */
.support-chat-panel .chat-stage,
.support-chat-panel .chat-conversation,
.support-chat-panel .support-intake {
  transform: translateZ(0);
}
