/* ===== Language Switcher ===== */
/* Used by i18n.js - mounted in nav */
.lang-switcher {
  position: relative;
  font-family: "Inter", "Space Grotesk", sans-serif;
}

.lang-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  cursor: pointer;
  font-size: 11px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(10, 10, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  min-width: 110px;
  z-index: 9999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-switcher.open .lang-dropdown {
  display: block;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 8px 14px;
  color: #aaa;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

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

.lang-option.active {
  color: #ffe100;
}

/* Fallback: fixed position when no mount point */
body > .lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
}

body > .lang-switcher .lang-btn {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  font-size: 13px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body > .lang-switcher .lang-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

body > .lang-switcher .lang-dropdown {
  top: 100%;
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.92);
  min-width: 120px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body > .lang-switcher .lang-option {
  padding: 8px 16px;
  font-size: 13px;
}

@media (max-width: 768px) {
  body > .lang-switcher {
    top: 12px;
    right: 12px;
  }

  body > .lang-switcher .lang-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
}