.ata-language-switcher {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 4px;
  border: 1px solid rgba(20, 82, 60, .18);
  border-radius: 999px;
  background: #f3f5f1;
  font: 700 12px/1 Arial, sans-serif;
}

.ata-language-switcher a {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  color: #174f3b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.ata-language-switcher a:hover {
  border: 0;
  background: rgba(20, 82, 60, .1);
}

.ata-language-switcher a:focus-visible {
  border: 0;
  outline: 3px solid rgba(37, 150, 105, .35);
  outline-offset: 2px;
}

.ata-language-switcher a[aria-current="page"] {
  border: 0;
  color: #fff;
  background: #174f3b;
  box-shadow: 0 2px 8px rgba(18, 66, 49, .22);
}

.header .buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.header .buttons .ata-language-switcher {
  margin-right: 6px;
}

.mobile-language-area {
  display: none;
}

[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

.i18n-error {
  max-width: 680px;
  margin: 12vh auto;
  padding: 32px;
  text-align: center;
}

@media (max-width: 900px) {
  .ata-language-switcher--desktop {
    display: none;
  }

  #menu-btn {
    display: inline-grid;
  }

  .header .navbar {
    position: fixed;
    top: calc(88px + env(safe-area-inset-top));
    right: 0;
    bottom: 0;
    left: auto;
    display: flex;
    width: min(320px, 86vw);
    height: auto;
    min-height: 0;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 0 max(20px, env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: -5px 8px 20px rgba(0, 0, 0, .2);
    transform: translateX(105%);
    transition: transform .3s ease;
    z-index: 9999;
  }

  .header .navbar.active {
    transform: translateX(0);
  }

  [dir="rtl"] .header .navbar {
    right: auto;
    left: 0;
    box-shadow: 5px 8px 20px rgba(0, 0, 0, .2);
    transform: translateX(-105%);
  }

  [dir="rtl"] .header .navbar.active {
    transform: translateX(0);
  }

  .header .navbar > a {
    display: block;
    flex: 0 0 auto;
    margin: 8px 20px;
    padding: 8px 0;
    font-size: 18px;
  }

  .mobile-language-area {
    display: block;
    flex: 0 0 auto;
    margin-top: 12px;
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(20, 82, 60, .14);
  }

  .mobile-language-label {
    display: block;
    margin-bottom: 12px;
    color: #53665d;
    font: 700 12px/1.3 Arial, sans-serif;
    letter-spacing: .04em;
  }

  .header .navbar .mobile-language-area .ata-language-switcher {
    position: static;
    display: inline-flex;
    width: max-content;
    margin: 0;
  }

  .header .navbar .mobile-language-area .ata-language-switcher a {
    display: grid;
    min-width: 38px;
    height: 38px;
    margin: 0;
    padding: 0 9px;
    border: 0;
    font-size: 13px;
  }
}

@media (min-width: 901px) {
  .ata-language-switcher--desktop {
    display: inline-flex;
  }
}
