/* =========================================================
   Language Switcher — Floating Bottom-Right
   ========================================================= */

/* Floating container — fixed to viewport bottom-right */
.ft-language-switcher.ft-floating.ft-floating-bottom-right {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

/* Toggle button */
.ft-language-switcher .ft-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  white-space: nowrap;
  transition: background 0.2s;
}

.ft-language-switcher .ft-dropdown-toggle:hover {
  background: #16213e;
}

.ft-language-switcher .ft-dropdown-arrow {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.2s;
  display: inline-block;
}

/* Rotate arrow when open */
.ft-language-switcher.ft-open .ft-dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown menu — HIDDEN by default */
.ft-language-switcher .ft-dropdown-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  max-height: 340px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.08);
}

/* SHOW menu when parent has ft-open class */
.ft-language-switcher.ft-open .ft-dropdown-menu {
  display: block;
}

/* Menu items */
.ft-language-switcher .ft-dropdown-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ft-language-switcher .ft-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: #222;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.ft-language-switcher .ft-dropdown-menu a:hover {
  background: #f3f4f6;
  color: #000;
}

/* Flag emoji sizing */
.ft-language-switcher .ft-flag {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

/* Language name */
.ft-language-switcher .ft-lang-name {
  font-size: 13px;
}

/* Scrollbar styling for the menu */
.ft-language-switcher .ft-dropdown-menu::-webkit-scrollbar {
  width: 4px;
}
.ft-language-switcher .ft-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}
.ft-language-switcher .ft-dropdown-menu::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}
