.er-language-switcher {
  position: relative;
  flex: 0 0 auto;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.2;
}

.er-language-trigger {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(69, 71, 66, 0.28);
  border-radius: 6px;
  padding: 9px 11px;
  color: #1c1b1b;
  background: #fffdf9;
  font: inherit;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.er-language-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.er-language-trigger[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

.er-language-trigger:hover,
.er-language-trigger:focus-visible {
  border-color: #006a6a;
  outline: 3px solid rgba(0, 106, 106, 0.16);
  outline-offset: 1px;
}

.er-language-mark {
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #006a6a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.er-language-dialog {
  position: fixed;
  z-index: 1500;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.er-language-dialog::backdrop {
  background: rgba(17, 17, 17, 0.42);
}

.er-language-dialog__panel {
  position: absolute;
  top: 82px;
  right: max(20px, calc((100vw - 1180px) / 2));
  width: min(560px, calc(100vw - 40px));
  max-height: min(620px, calc(100vh - 112px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e1da;
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 22px 60px rgba(28, 27, 27, 0.24);
}

.er-language-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e5e1da;
  padding: 18px 20px 14px;
}

.er-language-dialog__title {
  margin: 0;
  color: #1c1b1b;
  font-family: "Literata", Georgia, serif;
  font-size: 22px;
  line-height: 1.25;
}

.er-language-close {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  color: #1c1b1b;
  background: transparent;
  font: inherit;
  font-size: 24px;
  cursor: pointer;
}

.er-language-close:hover,
.er-language-close:focus-visible {
  color: #006a6a;
  background: #f4f1ec;
  outline: 3px solid rgba(0, 106, 106, 0.16);
}

.er-language-search-wrap {
  padding: 14px 20px 10px;
}

.er-language-search {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  border: 1px solid rgba(69, 71, 66, 0.32);
  border-radius: 5px;
  padding: 10px 12px;
  color: #1c1b1b;
  background: #fff;
  font: inherit;
  font-size: 15px;
}

.er-language-search:focus {
  border-color: #006a6a;
  outline: 3px solid rgba(0, 106, 106, 0.16);
}

.er-language-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  overflow-y: auto;
  padding: 6px 20px 20px;
  overscroll-behavior: contain;
}

.er-language-options a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 4px;
  padding: 8px 11px;
  color: #1c1b1b;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.er-language-options a:hover,
.er-language-options a:focus-visible {
  background: #f4f1ec;
  outline: 2px solid #006a6a;
  outline-offset: -2px;
}

.er-language-options a[aria-current="true"] {
  color: #006a6a;
  background: #eef7f6;
}

.er-language-options a[aria-current="true"]::after {
  content: "\2713";
  font-weight: 800;
}

.er-language-options a[hidden],
.er-language-empty[hidden] {
  display: none;
}

.er-language-empty {
  margin: 0;
  padding: 10px 20px 24px;
  color: #454742;
  font-size: 14px;
}

.er-language-switcher--mobile {
  display: none;
}

.er-language-suggestion {
  position: relative;
  z-index: 35;
  border-bottom: 1px solid #e5e1da;
  background: #f4f1ec;
  color: #1c1b1b;
}

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

.er-language-suggestion__inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 46px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 7px 0;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 13px;
}

.er-language-suggestion a,
.er-language-suggestion button {
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  padding: 6px 9px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.er-language-suggestion a {
  color: #fff;
  background: #006a6a;
  text-decoration: none;
}

.er-language-suggestion button {
  color: #454742;
  background: transparent;
}

.er-language-suggestion a:focus-visible,
.er-language-suggestion button:focus-visible {
  outline: 3px solid rgba(0, 106, 106, 0.2);
  outline-offset: 2px;
}

body.er-language-dialog-open {
  overflow: hidden;
}

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

  .er-language-switcher--mobile {
    display: block;
    width: 100%;
    margin-top: 6px;
    border-top: 1px solid rgba(69, 71, 66, 0.16);
    padding-top: 6px;
  }

  .er-language-switcher--mobile .er-language-trigger {
    width: 100%;
    justify-content: flex-start;
    border: 0;
    background: transparent;
    padding-inline: 8px;
  }

  .er-language-switcher--mobile .er-language-trigger::after {
    margin-left: auto;
    transform: rotate(-45deg);
  }

  .er-language-switcher--mobile .er-language-trigger[aria-expanded="true"]::after {
    transform: rotate(-45deg);
  }

  .er-language-dialog__panel {
    inset: auto 0 0;
    width: 100%;
    max-height: min(88vh, 760px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 10px 10px 0 0;
  }

  .er-language-dialog__header {
    padding: 15px 16px 11px;
  }

  .er-language-dialog__title {
    font-size: 20px;
  }

  .er-language-search-wrap {
    padding: 12px 16px 8px;
  }

  .er-language-options {
    grid-template-columns: 1fr;
    padding: 4px 16px 18px;
  }

  .er-language-options a {
    min-height: 48px;
  }

  .er-language-suggestion__inner {
    width: min(100% - 24px, 620px);
    min-height: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 9px;
    padding: 9px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .er-language-dialog,
  .er-language-dialog__panel {
    scroll-behavior: auto;
  }
}
