/* ── Language Switcher Styles ── */
.lang-switcher {
  position: relative;
  margin-left: 0;
  flex-shrink: 0;
  z-index: 20;
}

.lang-switcher__btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.36rem 0.65rem;
  background: var(--surface, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-primary, var(--text));
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-switcher__btn:hover {
  border-color: var(--accent);
  background: rgba(20, 184, 166, 0.1);
}

.lang-switcher__current {
  display: flex;
  align-items: center;
  gap: 0;
  line-height: 1;
}

/* ── High-Contrast Frosted Glass Dropdown ── */
.lang-switcher__dropdown {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: 190px;
  padding: 6px;

  background: rgba(11, 16, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;

  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.72),
    0 6px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s ease;
  z-index: 10000;
  overflow: hidden;
}

/* Subtle top specular sheen */
.lang-switcher__dropdown::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 100%
  );
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}

.lang-switcher__dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: none;
  border: none;
  border-radius: 8px;
  color: #f1f0ed;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  position: relative;
  z-index: 1;
}

.lang-switcher__option:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.lang-switcher__option.active {
  background: rgba(20, 184, 166, 0.18);
  color: #2dd4bf;
  font-weight: 600;
}

.lang-switcher__option.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.lang-switcher__flag {
  font-size: 1.15rem;
}

.lang-switcher__name {
  flex: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .lang-switcher {
    margin-left: 0.25rem;
  }

  .lang-switcher__btn {
    padding: 0.3rem 0.45rem;
  }

  .lang-switcher__dropdown {
    right: 0;
    left: auto;
  }
}

:root[data-theme="light"] .lang-switcher__dropdown {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 1);
}

:root[data-theme="light"] .lang-switcher__option {
  color: #0f172a;
}

:root[data-theme="light"] .lang-switcher__option:hover {
  background: rgba(15, 23, 42, 0.07);
  color: #0f172a;
}

:root[data-theme="light"] .lang-switcher__option.active {
  background: rgba(20, 184, 166, 0.14);
  color: #0d9488;
}
