/* Language switcher — inside header (no overlap) */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  margin-left: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

/* Fallback only on pages without main header (login, link-na-bio, etc.) */
.lang-switcher.lang-switcher--fixed {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99999;
  margin-left: 0;
}

.main-header .outer-box .lang-switcher {
  order: 50;
}

.lang-switcher button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 0;
}

.lang-switcher button:hover {
  transform: scale(1.08);
}

.lang-switcher button.is-active {
  border-color: #820ad1;
  box-shadow: 0 0 0 2px rgba(130, 10, 209, 0.2);
}

.lang-switcher button img,
.lang-switcher button .lang-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.lang-switcher button .lang-flag {
  font-size: 18px;
  line-height: 22px;
  text-align: center;
}

.lang-switcher button:focus-visible {
  outline: 2px solid #820ad1;
  outline-offset: 2px;
}

@media (max-width: 991px) {
  .lang-switcher {
    margin-left: 6px;
    padding: 3px 5px;
  }

  .lang-switcher button {
    width: 28px;
    height: 28px;
  }

  .lang-switcher button img,
  .lang-switcher button .lang-flag {
    width: 18px;
    height: 18px;
    font-size: 15px;
    line-height: 18px;
  }
}

@media (max-width: 767px) {
  .lang-switcher.lang-switcher--fixed {
    top: 8px;
    right: 8px;
  }
}
