.language-switch {
  position: relative;
  text-align: left;
}

.language-switch summary {
  display: flex;
  align-items: center;
  gap: .5em;
  padding: .5em .75em;
  border: 1px solid currentColor;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.language-switch summary::-webkit-details-marker {
  display: none;
}

.language-switch summary::after {
  content: "";
  width: .4em;
  height: .4em;
  border-right: 1px solid;
  border-bottom: 1px solid;
  transform: translateY(-.1em) rotate(45deg);
}

.language-switch[open] summary::after {
  transform: translateY(.1em) rotate(225deg);
}

.language-switch .language-options {
  position: absolute;
  z-index: 1;
  top: calc(100% + .35em);
  right: 0;
  min-width: max-content;
  margin: 0;
  padding: .25em;
  list-style: none;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #dcdcdc;
  border-radius: .65em;
  box-shadow: 0 .3em 1em #0002;
}

.language-switch .language-options li {
  margin: 0;
}

.language-switch .language-options a {
  display: block;
  padding: .5em .8em;
  border-radius: .4em;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
  transform: none;
}

.language-switch .language-options a:hover,
.language-switch .language-options a:focus-visible,
.language-switch .language-options a[aria-current="true"] {
  background: #fff4d2;
  transform: none;
}
