.language-switcher {
  position: fixed;
  top: var(--language-switcher-top, 56px);
  left: 22px;
  z-index: 1400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  flex: 0 0 auto;
  transition: top 160ms ease;
}

.language-switcher::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -86px;
  bottom: -54px;
  left: -10px;
  z-index: -1;
}

.language-switcher a {
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.language-switcher .lang-option {
  display: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.language-switcher .lang-option.is-active {
  display: inline-flex;
  width: 36px;
  height: 26px;
  border-radius: 7px;
  overflow: hidden;
  font-size: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 22px rgba(0, 0, 0, 0.18);
}

.language-switcher .lang-option::before {
  content: "";
  display: block;
  width: 24px;
  height: 16px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.language-switcher .lang-de::before {
  background: linear-gradient(to bottom, #111111 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%);
}

.language-switcher .lang-en::before {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229.5%22/%3E%3Cpath%20d%3D%22M3%2012h18%22/%3E%3Cpath%20d%3D%22M12%202.5c2.35%202.58%203.65%205.83%203.65%209.5S14.35%2018.92%2012%2021.5%22/%3E%3Cpath%20d%3D%22M12%202.5C9.65%205.08%208.35%208.33%208.35%2012S9.65%2018.92%2012%2021.5%22/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229.5%22/%3E%3Cpath%20d%3D%22M3%2012h18%22/%3E%3Cpath%20d%3D%22M12%202.5c2.35%202.58%203.65%205.83%203.65%209.5S14.35%2018.92%2012%2021.5%22/%3E%3Cpath%20d%3D%22M12%202.5C9.65%205.08%208.35%208.33%208.35%2012S9.65%2018.92%2012%2021.5%22/%3E%3C/svg%3E") center / contain no-repeat;
}

.language-switcher:hover .lang-option:not(.is-active),
.language-switcher:focus-within .lang-option:not(.is-active) {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  display: inline-flex;
  min-width: 96px;
  height: 36px;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(7, 20, 38, 0.94);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.language-switcher .lang-de:not(.is-active)::after {
  content: "Deutsch";
}

.language-switcher .lang-en:not(.is-active)::after {
  content: "English";
}

.legal-header .language-switcher .lang-option.is-active,
.login-card .language-switcher .lang-option.is-active {
  box-shadow: 0 0 0 1px rgba(7, 20, 38, 0.18), 0 8px 20px rgba(7, 20, 38, 0.16);
}

.login-card .language-switcher {
  margin: 0;
}

@media (max-width: 760px) {
  .language-switcher {
    top: var(--language-switcher-top, 56px);
    left: 16px;
    width: 34px;
    height: 28px;
  }

  .language-switcher .lang-option.is-active {
    width: 32px;
    height: 24px;
  }
}
