/* =========================================================
   lang-switcher.css — Custom language selector
   Hides all Google Translate UI; shows only our own dropdown.
   ========================================================= */

/* ── Suppress every Google Translate UI element ─────────── */
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
.VIpgJd-ZVi9od-aZ2wEe,
.goog-te-gadget,
.goog-te-bubble-message,
iframe.goog-te-menu-frame { display: none !important; }
body > .skiptranslate          { display: none !important; }
body                           { top: 0 !important; }
#google_translate_element      { display: none !important; visibility: hidden !important; }

/* ── Wrapper ─────────────────────────────────────────────── */
.ls-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── Trigger button — DARK variant (for dark headers) ────── */
.ls-wrap.ls-dark .ls-btn {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
}
.ls-wrap.ls-dark .ls-btn:hover {
  background: rgba(255, 255, 255, .18);
}

/* ── Trigger button — LIGHT variant (white navs/panels) ──── */
.ls-wrap.ls-light .ls-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
}
.ls-wrap.ls-light .ls-btn:hover {
  background: #e2e8f0;
}

/* ── Button base ─────────────────────────────────────────── */
.ls-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.ls-flag  { font-size: 14px; line-height: 1; }
.ls-label { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
.ls-caret {
  width: 12px; height: 12px; opacity: .7;
  transition: transform .2s;
  flex-shrink: 0;
}
.ls-wrap.ls-open .ls-caret { transform: rotate(180deg); }

/* ── Dropdown panel ──────────────────────────────────────── */
.ls-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
  z-index: 99999;
  opacity: 0;
  transform: translateY(-8px) scale(.97);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  overflow: hidden;
}
.ls-wrap.ls-open .ls-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Flip left when near right edge (set via JS if needed) */
.ls-dropdown.ls-flip { right: auto; left: 0; }

/* ── Search ──────────────────────────────────────────────── */
.ls-search-wrap {
  padding: 10px 10px 8px;
  border-bottom: 1px solid #f1f5f9;
}
.ls-search {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.ls-search:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.ls-search::placeholder { color: #94a3b8; }

/* ── Language list ───────────────────────────────────────── */
.ls-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 6px 0;
  overscroll-behavior: contain;
}
.ls-list::-webkit-scrollbar { width: 4px; }
.ls-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.ls-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #1e293b;
  transition: background .1s;
}
.ls-item:hover    { background: #f8fafc; }
.ls-item.ls-active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.ls-item-flag  { font-size: 18px; flex-shrink: 0; line-height: 1; }
.ls-item-label { flex: 1; }
.ls-item-check { font-size: 12px; color: #2563eb; flex-shrink: 0; }

/* ── Empty state ─────────────────────────────────────────── */
.ls-empty {
  padding: 20px 14px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

/* ── RTL safety: switcher itself always reads left-to-right ── */
.ls-wrap,
.ls-dropdown,
.ls-btn,
.ls-item {
  direction: ltr;
  text-align: left;
}
