/* ═══════════════════════════════════════════════════════════════
   VividWalls — Language Switcher
   ═══════════════════════════════════════════════════════════════ */

.lang-switcher {
  position: relative;
}

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-trigger:hover {
  background: rgba(15,23,42,0.06);
  color: var(--color-dark);
}

.lang-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.lang-code {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  /* hidden by default, shown when dropdown is open */
  display: none;
}

.lang-chevron {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s ease;
  opacity: 0.5;
}

.lang-switcher.open .lang-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  max-height: 320px;
  overflow-y: auto;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.16), 0 4px 16px rgba(15,23,42,0.08);
  padding: 6px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* custom scrollbar */
.lang-dropdown::-webkit-scrollbar { width: 4px; }
.lang-dropdown::-webkit-scrollbar-track { background: transparent; }
.lang-dropdown::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.15); border-radius: 99px; }

.lang-switcher.open .lang-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-dark);
  transition: background 0.15s ease;
  white-space: nowrap;
}

.lang-option:hover {
  background: rgba(124,58,237,0.08);
}

.lang-option.is-active {
  background: rgba(124,58,237,0.1);
  color: #7c3aed;
  font-weight: 700;
}

.lang-option-flag {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.lang-option-name {
  flex: 1;
}

.lang-option-code {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}
