.lang-switcher {
  position: relative;
}

.lang-switcher-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #f4f4f5;
  font: inherit;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lang-switcher-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.lang-switcher.is-open .lang-switcher-trigger {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.lang-switcher-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
}

.lang-switcher-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lang-switcher-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: center;
  align-items: start;
  overflow-y: auto;
  padding: 88px 24px 24px;
}

.lang-switcher-modal[hidden] {
  display: none;
}

.lang-switcher-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
}

.lang-switcher-dialog {
  position: relative;
  z-index: 1;
  direction: ltr;
  width: min(100%, 430px);
  max-height: min(calc(100vh - 112px), 620px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(24, 24, 28, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(24px);
}

.lang-switcher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.lang-switcher-option {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 96px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  color: #f4f4f5;
  font: inherit;
  padding: 14px 10px 12px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lang-switcher-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.lang-switcher-option.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.lang-switcher-option-label {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
  align-items: center;
}

.lang-switcher-option-name {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: 0;
}

.lang-switcher-option .lang-switcher-flag {
  width: 36px;
  height: 26px;
  border-radius: 6px;
}

.lang-switcher-option-code {
  display: none;
}
