/* Leodent Language Switcher
 * Floating button (bottom-right on mobile, header-corner on desktop) with
 * dropdown of available languages. Auto-hides when only TR exists yet. */

/* Hide WPML inline language switcher in header — replaced by floating widget */
.wpml-ls-item,
.wpml-ls-slot-2,
li.menu-item[id*="wpml-ls-"] {
  display: none !important;
}

/* Desktop: shift header menu left so it doesn't overlap with the floating
 * language switcher button at top-right (~90px wide pill). */
@media (min-width: 1025px) {
  nav.avada-main-menu {
    margin-right: 96px !important;
  }
}
html[dir="rtl"] nav.avada-main-menu {
  margin-right: 0 !important;
}
@media (min-width: 1025px) {
  html[dir="rtl"] nav.avada-main-menu {
    margin-left: 96px !important;
  }
}

.leo-lang-switcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999998;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

@media (min-width: 1025px) {
  .leo-lang-switcher {
    bottom: auto;
    right: 28px;
    top: 18px;
    z-index: 999999;
  }
}

.leo-lang-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.leo-lang-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08), 0 14px 32px rgba(15, 23, 42, 0.10);
}
.leo-lang-button svg.leo-lang-globe {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.leo-lang-button svg.leo-lang-caret {
  width: 10px;
  height: 10px;
  opacity: 0.5;
  transition: transform 0.2s ease;
}
.leo-lang-switcher.open .leo-lang-button svg.leo-lang-caret {
  transform: rotate(180deg);
}

.leo-lang-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10), 0 24px 64px rgba(15, 23, 42, 0.12);
  display: none;
  flex-direction: column;
  gap: 2px;
}
@media (min-width: 1025px) {
  .leo-lang-menu {
    bottom: auto;
    top: calc(100% + 8px);
  }
}
.leo-lang-switcher.open .leo-lang-menu {
  display: flex;
}

.leo-lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #0f172a;
  text-decoration: none;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.leo-lang-item:hover {
  background: #f1f5f9;
}
.leo-lang-item.leo-lang-active {
  background: #f8f7f4;
  color: #6f2b20;
  font-weight: 500;
}
.leo-lang-flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.leo-lang-native {
  font-weight: 500;
}
.leo-lang-en {
  font-size: 11.5px;
  color: #64748b;
  margin-left: auto;
}

/* RTL adjustments */
html[dir="rtl"] .leo-lang-switcher {
  right: auto;
  left: 24px;
}
@media (min-width: 1025px) {
  html[dir="rtl"] .leo-lang-switcher {
    right: auto;
    left: 28px;
  }
}
html[dir="rtl"] .leo-lang-menu {
  right: auto;
  left: 0;
}
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}
