.footer-language {
  position: relative;
  display: inline-flex;
  min-width: 0;
  margin-left: auto;
  z-index: 40;
  color-scheme: dark;
}

.footer-language-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #292929;
  color: #f5f5f3;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 620;
}

.footer-language-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-language-toggle .footer-language-caret {
  width: 14px;
  height: 14px;
  margin-left: 2px;
  transition: transform 140ms ease;
}

.footer-language.is-open .footer-language-caret {
  transform: rotate(180deg);
}

.footer .footer-language-toggle span,
.site-footer .footer-language-toggle span,
.legal-footer .footer-language-toggle span {
  display: inline;
  margin: 0;
}

.footer-language-toggle:is(:hover, :focus-visible) {
  background: #353535;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.footer-language-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  box-sizing: border-box;
  width: 260px;
  min-width: 196px;
  max-width: min(280px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  background: #1d1d1d;
  color: #f5f5f3;
  padding: 6px 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}

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

.footer .footer-language-menu .footer-language-option,
.site-footer .footer-language-menu .footer-language-option,
.legal-footer .footer-language-menu .footer-language-option {
  box-sizing: border-box;
  width: calc(100% - 12px);
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 6px;
  padding: 0 10px 0 14px;
  border-radius: 7px;
  color: #f5f5f3;
  line-height: 1.25;
  text-decoration: none;
}

.footer .footer-language-menu .footer-language-option:is(:hover, :focus-visible),
.site-footer .footer-language-menu .footer-language-option:is(:hover, :focus-visible),
.legal-footer .footer-language-menu .footer-language-option:is(:hover, :focus-visible) {
  background: #303030;
  color: #ffffff;
  outline: none;
}

.footer .footer-language-option-labels,
.site-footer .footer-language-option-labels,
.legal-footer .footer-language-option-labels {
  display: grid;
  gap: 2px;
  margin: 0;
}

.footer .footer-language-option-labels strong,
.footer .footer-language-option-labels small,
.site-footer .footer-language-option-labels strong,
.site-footer .footer-language-option-labels small,
.legal-footer .footer-language-option-labels strong,
.legal-footer .footer-language-option-labels small {
  display: block;
  margin: 0;
  color: inherit;
}

.footer-language-option-labels strong {
  font-size: 15px;
  font-weight: 560;
}

.footer-language-option-labels small {
  font-size: 12px;
}

.footer .footer-language-check,
.site-footer .footer-language-check,
.legal-footer .footer-language-check {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 999px;
  background: #2a2a2a;
  font-size: 16px;
}

.footer .footer-language-check:empty,
.site-footer .footer-language-check:empty,
.legal-footer .footer-language-check:empty {
  background: transparent;
}

.footer-language-search {
  box-sizing: border-box;
  width: calc(100% - 12px);
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 6px 0;
  padding: 0 11px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #292929;
  color: #a8a8a8;
}

.footer-language-search:focus-within {
  border-color: #6a6a6a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .12);
}

.footer-language-search svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-language-search-input {
  min-width: 0;
  width: 100%;
  flex: 1;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f5f5f3;
  outline: none;
  font: inherit;
  font-size: 13px;
}

.footer-language-search-input::placeholder {
  color: #a8a8a8;
  opacity: 1;
}

@media (max-width: 640px) {
  .footer-language {
    width: 100%;
    margin: 16px 0 0;
  }

  .footer-language-toggle {
    width: 100%;
  }

  .footer-language-menu {
    right: 0;
    left: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-language-toggle .footer-language-caret {
    transition: none;
  }
}
