.site-language-toggle {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  z-index: 1;
  pointer-events: auto;
}

.site-language-toggle__button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid #3133f5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #3133f5;
  font-family: Roboto, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-width: 0;
  min-height: 34px;
  padding: 0;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.site-language-toggle__button::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  border-radius: 999px;
  background: #3133f5;
  transform: translateX(0);
  transition: transform 220ms ease;
}

body[data-language='fr'] .site-language-toggle__button::before {
  transform: translateX(100%);
}

.site-language-toggle__lang {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  line-height: 1;
  box-sizing: border-box;
}

.site-language-toggle__lang {
  text-decoration: none;
  min-width: 3.1em;
  padding: 0;
  color: #ffffff;
}

.site-language-toggle__lang:not(.is-active) {
  color: #3133f5;
}

.site-language-toggle__button:hover,
.site-language-toggle__button:focus-visible {
  box-shadow: 0 8px 20px rgba(8, 0, 161, 0.14);
  transform: translateY(-1px);
  outline: none;
}

.site-language-toggle__button:hover .site-language-toggle__lang:not(.is-active),
.site-language-toggle__button:focus-visible .site-language-toggle__lang:not(.is-active) {
  color: #3133f5;
}

body[data-page='VR.html'] .site-language-toggle__button {
  font-size: clamp(12px, 1.15vmin, 14px);
  letter-spacing: 0.14em;
}

body[data-page='AR.html'] .site-language-toggle__button {
  font-size: clamp(12px, 1.15vmin, 14px);
  letter-spacing: 0.14em;
}

@media (max-width: 900px) {
  .site-language-toggle__button {
    font-size: 11px;
  }

  body[data-page='VR.html'] .site-language-toggle__button {
    font-size: 12px;
  }

  body[data-page='AR.html'] .site-language-toggle__button {
    font-size: 12px;
  }
}

@media (max-width: 620px) {
  .site-language-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    left: auto;
    z-index: 60;
  }

  .site-language-toggle__button {
    min-height: 32px;
  }

  body[data-page='VR.html'] .site-language-toggle__button {
    font-size: 12px;
  }

  body[data-page='AR.html'] .site-language-toggle__button {
    font-size: 12px;
  }

  body[data-page='VR.html'] .site-language-toggle__lang {
    min-width: 2.8em;
    min-height: 32px;
  }

  body[data-page='AR.html'] .site-language-toggle__lang {
    min-width: 2.8em;
    min-height: 32px;
  }
}
