.language-switcher-shell {
  position: relative;
  flex: 0 0 auto;
  z-index: 20;
}

.language-switcher {
  position: relative;
  font-family: var(--body-font, 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

.language-switcher__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 1.75rem;
  height: 2.25rem;
  padding: 0 0.125rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.language-switcher__button:hover,
.language-switcher__button[aria-expanded="true"] {
  opacity: 0.86;
  transform: translateY(-1px);
}

.language-switcher__button:active {
  transform: translateY(0);
}

.language-switcher__button:focus-visible,
.language-switcher__option:focus-visible {
  outline: 3px solid var(--primary, #4f46e5);
  outline-offset: 2px;
}

.language-switcher__menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: max-content;
  max-height: min(calc(100vh - 5.5rem), 42rem);
  overflow-y: auto;
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  border-radius: 0.85rem;
  border: 1px solid var(--outline, rgba(0, 0, 0, 0.12));
  background: var(--surface, #fff);
  color: var(--surface-text, #111827);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.16);
}

.language-switcher__option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 12rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.language-switcher__option:hover,
.language-switcher__option.is-active {
  background: var(--primary-container, #eef2ff);
  color: var(--primary-container-text, inherit);
}

@media (max-width: 640px) {
  .language-switcher__menu {
    max-width: calc(100vw - 1.5rem);
    max-height: min(calc(100vh - 5rem), 28rem);
  }

  .language-switcher__option {
    min-width: 11rem;
  }
}
