.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  margin-left: 8px;
  border: 1px solid rgba(128, 128, 128, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  flex: 0 0 auto;
}

.language-switcher-host {
  position: relative;
}

.language-switcher-topline {
  position: absolute;
  right: 0;
  top: 50%;
  margin: 0;
  padding: 2px;
  gap: 2px;
  transform: translateY(-50%);
  border-color: rgba(255, 255, 255, .45);
  background: rgba(0, 0, 0, .15);
}

.language-switcher-topline button {
  width: 29px;
  height: 23px;
}

.language-switcher button {
  width: 34px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  filter: grayscale(.55);
  opacity: .7;
  transition: background-color .2s ease, filter .2s ease, opacity .2s ease, transform .2s ease;
}

.flag-icon {
  display: block;
  width: 22px;
  height: 14px;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3);
}

.flag-de {
  background: linear-gradient(
    to bottom,
    #151515 0 33.333%,
    #dd0000 33.333% 66.666%,
    #ffce00 66.666% 100%
  );
}

.flag-gb {
  background:
    linear-gradient(33deg, transparent 43%, #fff 43% 48%, #cf142b 48% 52%, #fff 52% 57%, transparent 57%),
    linear-gradient(-33deg, transparent 43%, #fff 43% 48%, #cf142b 48% 52%, #fff 52% 57%, transparent 57%),
    linear-gradient(to right, transparent 38%, #fff 38% 44%, #cf142b 44% 56%, #fff 56% 62%, transparent 62%),
    linear-gradient(to bottom, transparent 32%, #fff 32% 40%, #cf142b 40% 60%, #fff 60% 68%, transparent 68%),
    #00247d;
}

.language-switcher button:hover {
  opacity: 1;
  filter: none;
  transform: translateY(-1px);
}

.language-switcher button.language-active {
  background: #39B54A;
  opacity: 1;
  filter: none;
  box-shadow: 0 0 0 2px rgba(57, 181, 74, .2);
}

.language-switcher button:focus-visible {
  outline: 3px solid #39B54A;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .language-switcher {
    order: 2;
    margin-left: auto;
  }

  .language-switcher button {
    width: 31px;
    height: 27px;
  }

  .language-switcher-topline {
    position: absolute;
    right: 0;
    order: initial;
    margin: 0;
  }

  .language-switcher-topline button {
    width: 27px;
    height: 22px;
  }
}

@media (max-width: 1100px) {
  .language-switcher-host {
    padding-right: 68px;
  }
}
