/* ================================================================
   Tool Dude — Multi-language switcher + invisible Google Translate
   Switcher styling:
   glass pill, glass dropdown, flag + name + native-name rows,
   active row highlighted orange with a check.
   ================================================================ */

/* ---------- Switcher (desktop header) ---------- */
.td-lang-wrap { position: relative; display: inline-flex; flex: none; }
.td-lang-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 46px;
  padding: 0 15px 0 12px; border-radius: 999px; cursor: pointer;
  font: inherit;
  background: linear-gradient(180deg, rgba(38,50,88,.85), rgba(20,28,56,.92));
  border: 1px solid rgba(130,165,255,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 8px 20px rgba(0,0,0,.35);
}
.td-lang-pill img { width: 26px; height: 19px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(255,255,255,.28); }
.td-lang-pill .code { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13.5px; letter-spacing: .6px; color: #E7ECFB; }
.td-lang-pill .chev { font-size: 10px; color: #8fa0c8; transition: transform .2s ease; }
.td-lang-wrap.open .td-lang-pill {
  border-color: rgba(255,138,0,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 8px 22px rgba(0,0,0,.35), 0 0 18px rgba(255,110,0,.18);
}
.td-lang-wrap.open .td-lang-pill .chev { transform: rotate(180deg); }

.td-lang-drop {
  position: absolute; top: 56px; right: 0; width: 308px; padding: 8px;
  border-radius: 17px; z-index: 300;
  background: linear-gradient(180deg, rgba(30,41,78,.97), rgba(13,19,40,.98));
  border: 1px solid rgba(130,165,255,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 30px 60px rgba(0,0,0,.62), 0 0 44px rgba(80,110,255,.10);
  max-height: min(70vh, 560px); overflow-y: auto;
}
.td-lang-drop[hidden] { display: none; }
.td-lang-row { display: flex; align-items: center; gap: 11px; padding: 9px 13px; border-radius: 11px; text-decoration: none; }
.td-lang-row:hover { background: rgba(255,255,255,.05); }
.td-lang-row img { width: 26px; height: 19px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(255,255,255,.26); flex: none; }
.td-lang-row .lname { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 14px; color: #E7ECFB; white-space: nowrap; }
.td-lang-row .lnative { margin-left: auto; font-size: 13px; color: #9AA7C7; white-space: nowrap; }
.td-lang-row .lcheck { width: 17px; flex: none; text-align: center; font-size: 13px; color: #FF8A00; }
.td-lang-row.on { background: linear-gradient(90deg, rgba(255,110,0,.17), rgba(255,110,0,.05)); box-shadow: inset 0 0 0 1px rgba(255,138,0,.35); }
.td-lang-row.on .lname { color: #fff; }

/* ---------- Switcher (mobile header — compact pill) ---------- */
.td-lang-pill-compact { height: 38px; padding: 0 11px 0 9px; gap: 6px; box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 8px 18px rgba(0,0,0,.35); }
.td-lang-pill-compact img { width: 22px; height: 16px; border-radius: 3px; }
.td-lang-pill-compact .code { font-size: 12.5px; letter-spacing: .5px; }
.td-lang-pill-compact .chev { font-size: 9px; }
.td-mobile-header .td-lang-wrap { position: static; }
.td-mobile-header .td-lang-drop {
  position: fixed; top: 64px; right: 12px; left: 12px; width: auto;
  max-height: 72vh;
}

/* ---------- Mobile off-canvas language rows ---------- */
.td-msb-flag { width: 26px; height: 19px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(255,255,255,.26); flex: none; }
.td-msb-lang-link.on { color: #fff; }

/* ================================================================
   Google Translate — hide ALL Google UI/branding.
   The widget runs invisibly; visitors only see our own switcher.
   ================================================================ */
/* The widget container must NOT be display:none — in some builds that
   prevents the widget from creating its .goog-te-combo select at all,
   and no translation ever happens. Park it off-screen instead: fully
   invisible to visitors, but alive in the layout so the widget works. */
#google_translate_element, .td-gt-element {
  position: absolute !important; left: -9999px !important; top: 0 !important;
  width: 1px !important; height: 1px !important; overflow: hidden !important;
}
.goog-te-banner-frame.skiptranslate, .goog-te-banner-frame,
#goog-gt-tt, .goog-te-balloon-frame, .goog-te-menu-frame {
  display: none !important; visibility: hidden !important;
}
body { top: 0 !important; }
.goog-tooltip, .goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background-color: transparent !important; box-shadow: none !important; }
.goog-te-gadget-icon, img.goog-te-gadget-icon { display: none !important; }
.goog-te-gadget { font-size: 0 !important; color: transparent !important; }
.goog-te-gadget a, .goog-te-gadget span { display: none !important; }
iframe.goog-te-banner-frame { display: none !important; }
/* Newer widget builds render the top banner as an iframe carrying
   an obfuscated class instead of .goog-te-banner-frame. */
iframe[class*="VIpgJd-ZVi9od-ORHb-OEVmcd"] { display: none !important; visibility: hidden !important; }
.goog-te-spinner, .goog-te-banner-frame.skiptranslate { display: none !important; }

/* Fonts: translated pages keep the site's own typefaces. The widget
   wraps translated runs in <font> elements and tries to impose its
   own font on gadget text — inherit the page font everywhere. */
body font, .goog-te-gadget, .goog-te-gadget *,
.goog-te-menu-value, .goog-te-menu-value span {
  font-family: inherit !important;
}
html.translated-ltr body, html.translated-rtl body { font-family: 'Inter', sans-serif; }
html.translated-ltr h1, html.translated-rtl h1,
html.translated-ltr h2, html.translated-rtl h2,
html.translated-ltr h3, html.translated-rtl h3 { font-family: 'Poppins', sans-serif; }

/* ================================================================
   RTL (Urdu / Arabic) — scoped adjustments.
   Base layout is flex-based and mirrors automatically in most
   places; only true positional elements are pinned here.
   ================================================================ */
[dir="rtl"] .td-lang-drop { right: auto; left: 0; }
[dir="rtl"] .td-lang-row .lnative { margin-left: 0; margin-right: auto; }
[dir="rtl"] .td-mobile-header .td-lang-drop { right: 12px; left: 12px; }
