/* ===================== LANGUAGE SWITCHER (shared across all pages) =====================
   Self-contained: values are hardcoded rather than reading each page's own CSS
   variables, so the switcher renders identically on every page regardless of
   which stylesheet loaded alongside it. */

.lang-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  margin-top: 20px;
  background: rgba(14, 10, 36, 0.7);
  border: 1px solid rgba(106, 48, 184, 0.4);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 0 rgba(139, 70, 255, 0.08);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, background 0.2s;
  z-index: 400;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.lang-dropdown:hover,
.lang-dropdown.open {
  border-color: rgba(139, 70, 255, 0.7);
  background: rgba(30, 20, 66, 0.85);
}

.lang-flag {
  flex-shrink: 0;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.lang-label {
  color: #d7d6e3;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.lang-arrow {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background: url(../images/ui/icon-caret.svg) no-repeat center;
  background-size: contain;
  transition: transform 0.2s;
}

.lang-dropdown.open .lang-arrow {
  transform: rotate(180deg);
}

/* Panel opens upward since the switcher lives in the footer */
.lang-panel {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  max-width: calc(100vw - 24px);
  background: #14103a;
  border: 1px solid rgba(139, 70, 255, 0.45);
  border-radius: 12px;
  box-shadow: 0 -18px 40px -12px rgba(0, 0, 0, 0.85);
  z-index: 9999;
  overflow: hidden;
  box-sizing: border-box;
}

.lang-panel.open {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.lang-option:hover {
  background: rgba(139, 70, 255, 0.18);
}

.lang-option.selected {
  background: rgba(139, 70, 255, 0.28);
}

.lang-opt-flag {
  flex-shrink: 0;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.lang-opt-name {
  font-size: 13px;
  font-weight: 600;
  color: #f5f5f7;
}
