.language-switcher {
  position: relative;
  flex: 0 0 auto;
  z-index: 1000;
  font-family: Arial, Helvetica, sans-serif;
}

.language-switcher__button {
  min-width: 72px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(21, 42, 56, .16);
  border-radius: 10px;
  background: #fff;
  color: #152a38;
  padding: 0 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 5px 18px rgba(21, 42, 56, .08);
}

.language-switcher__flag {
  width: 23px;
  height: 15px;
  display: inline-block;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(21, 42, 56, .2);
  border-radius: 2px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(21, 42, 56, .12);
}

.language-switcher__flag--ro {
  background: linear-gradient(to right, #002b7f 0 33.333%, #fcd116 33.333% 66.666%, #ce1126 66.666% 100%);
}

.language-switcher__flag--fr {
  background: linear-gradient(to right, #0055a4 0 33.333%, #fff 33.333% 66.666%, #ef4135 66.666% 100%);
}

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

.language-switcher__flag--it {
  background: linear-gradient(to right, #009246 0 33.333%, #fff 33.333% 66.666%, #ce2b37 66.666% 100%);
}

.language-switcher__flag--nl {
  background: linear-gradient(to bottom, #ae1c28 0 33.333%, #fff 33.333% 66.666%, #21468b 66.666% 100%);
}

.language-switcher__flag--en {
  background:
    linear-gradient(33deg, transparent 42%, #fff 42% 47%, #c8102e 47% 53%, #fff 53% 58%, transparent 58%),
    linear-gradient(-33deg, transparent 42%, #fff 42% 47%, #c8102e 47% 53%, #fff 53% 58%, transparent 58%),
    linear-gradient(to bottom, transparent 37%, #fff 37% 43%, #c8102e 43% 57%, #fff 57% 63%, transparent 63%),
    linear-gradient(to right, transparent 34%, #fff 34% 42%, #c8102e 42% 58%, #fff 58% 66%, transparent 66%),
    #012169;
}

.language-switcher__chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.language-switcher.is-open .language-switcher__chevron {
  transform: rotate(225deg) translate(-2px, -1px);
}

.language-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 205px;
  margin: 0;
  padding: 7px;
  display: grid;
  gap: 3px;
  list-style: none;
  border: 1px solid rgba(21, 42, 56, .13);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(21, 42, 56, .2);
}

.language-switcher__menu[hidden] {
  display: none;
}

.language-switcher__option {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #152a38;
  padding: 7px 9px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
}

.language-switcher__option:hover,
.language-switcher__option:focus-visible {
  background: #f5f1ea;
  outline: none;
}

.language-switcher__option[aria-current="true"] {
  background: #fff0e8;
  color: #b94d1d;
  font-weight: 800;
}

.language-switcher__check {
  color: #2d9b67;
  font-weight: 900;
  opacity: 0;
}

.language-switcher__option[aria-current="true"] .language-switcher__check {
  opacity: 1;
}

.language-legal-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #d6c4a6;
  border-left: 4px solid #ed7137;
  border-radius: 8px;
  background: #fff9ee;
  color: #604d35;
  font: 600 13px/1.55 Arial, Helvetica, sans-serif;
}

.topbar .language-switcher {
  order: -2;
}

.topbar .logo {
  order: -1;
}

.legal-nav .language-switcher {
  order: -2;
}

body > .page > header .language-switcher__button,
.legal-header .language-switcher__button {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(10px);
}

@media (max-width: 1050px) {
  .topbar .language-switcher__button {
    min-width: 58px;
  }

  .topbar .language-switcher__code {
    display: none;
  }
}

@media (max-width: 700px) {
  .language-switcher__button {
    min-width: 58px;
    height: 38px;
  }

  .language-switcher__menu {
    position: fixed;
    top: 70px;
    left: 15px;
    right: 15px;
    width: auto;
    max-width: 340px;
  }

  .legal-nav {
    gap: 10px;
  }

  .topbar {
    gap: 12px;
  }

  .topbar .logo {
    margin-right: auto;
  }

  .topbar .header-actions {
    margin-left: 0;
  }
}
