/* ============================================================
   Lang Switcher — METTA Офис
   ============================================================ */

.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-switcher__btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.10);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--tr);
  white-space: nowrap;
}
.lang-switcher__btn:hover { background: rgba(255,255,255,.17); }

.lang-switcher__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25);
}
.lang-switcher__flag svg { width: 100%; height: 100%; display: block; }
.lang-switcher__label { font-size: 12px; font-weight: 700; letter-spacing: .4px; }

.lang-switcher__arrow {
  opacity: .7;
  transition: transform .18s ease;
}
.lang-switcher__btn[aria-expanded="true"] .lang-switcher__arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.lang-switcher__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #1C1C2E;
  border: 1px solid #2E2E48;
  border-radius: var(--r);
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
  overflow: hidden;
  z-index: 200;
  animation: langDropIn .14s ease;
}

@keyframes langDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: background var(--tr), color var(--tr);
}
.lang-switcher__option:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.lang-switcher__option.is-active {
  background: rgba(0,119,255,.18);
  color: #fff;
  font-weight: 600;
}
.lang-switcher__option.is-active::after {
  content: '✓';
  margin-left: auto;
  color: var(--blue);
  font-size: 12px;
}

.lang-switcher__opt-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15);
  flex-shrink: 0;
}
.lang-switcher__opt-flag svg { width: 100%; height: 100%; display: block; }
.lang-switcher__opt-full { flex: 1; }
.lang-switcher__opt-code {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  color: rgba(255,255,255,.35);
}

/* Mobile ≤480px — compact button, no label */
@media (max-width: 480px) {
  .lang-switcher__label { display: none; }
  .lang-switcher__btn   { padding: 0 8px; gap: 3px; }
  .lang-switcher__dropdown { right: 0; }
}

/* Topbar order — switcher sits between phone and cart */
.lang-switcher { order: 3; }
