/* PB Language Switcher: the widget (.pb-lang) and the mobile menu row (.pb-lang-menu-item). */

.pb-lang,
.pb-lang-menu-item {
  /* The globe and chevron are the LangIcon and Chevron shapes from the Figma file (Pure Boats). */
  --pb-lang-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 17'%3E%3Cpath d='M15.9628 8.5C15.9626 4.37875 12.6213 1.03818 8.5 1.03818C4.37885 1.03835 1.03835 4.37885 1.03818 8.5C1.03818 12.6213 4.37875 15.9626 8.5 15.9628C12.6214 15.9628 15.9628 12.6214 15.9628 8.5ZM17 8.5C17 13.1944 13.1944 17 8.5 17C3.80572 16.9998 0 13.1943 0 8.5C0.000168378 3.80583 3.80583 0.000168374 8.5 0C13.1943 0 16.9998 3.80572 17 8.5Z'/%3E%3Cpath d='M16.4818 7.98122C16.7682 7.98139 17 8.21359 17 8.5C17 8.78641 16.7682 9.01923 16.4818 9.0194H0.519091C0.232577 9.0194 0 8.78651 0 8.5C0 8.21349 0.232577 7.98122 0.519091 7.98122H16.4818Z'/%3E%3Cpath d='M8.5 0C8.64574 0 8.78519 0.0616859 8.88347 0.169289C10.9646 2.44766 12.147 5.40462 12.2113 8.48971C12.2114 8.49685 12.2114 8.50409 12.2113 8.51122C12.147 11.5963 10.9646 14.5533 8.88347 16.8316C8.78519 16.9392 8.64571 17 8.5 17C8.35448 16.9999 8.21567 16.939 8.11746 16.8316C6.03635 14.5533 4.85303 11.5963 4.78873 8.51122C4.78858 8.50409 4.78859 8.49684 4.78873 8.48971C4.853 5.40458 6.03632 2.44768 8.11746 0.169289L8.1979 0.0972711C8.28522 0.0346701 8.39079 6.54602e-05 8.5 0ZM8.5 1.31035C6.82936 3.33371 5.8843 5.8656 5.82691 8.5C5.88416 11.1342 6.82971 13.6654 8.5 15.6887C10.1704 13.6653 11.1158 11.1344 11.1731 8.5C11.1157 5.86547 10.1708 3.33375 8.5 1.31035Z'/%3E%3C/svg%3E");
  --pb-lang-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M9.16523 0.156463C9.35608 -0.0521542 9.66602 -0.0521542 9.85686 0.156463C10.0477 0.365079 10.0477 0.703875 9.85686 0.912492L5.34582 5.84354C5.15497 6.05215 4.84503 6.05215 4.65418 5.84354L0.143136 0.912492C-0.047712 0.703875 -0.047712 0.365079 0.143136 0.156463C0.333984 -0.0521542 0.643923 -0.0521542 0.834771 0.156463L5 4.70949L9.16523 0.156463Z'/%3E%3C/svg%3E");
  --pb-lang-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* ## The widget
--------------------------------------------- */

.pb-lang {
  --pb-lang-color: #242a38;
  --pb-lang-border-width: 1px;
  --pb-lang-icon-size: 17px;
  --pb-lang-gap: 4px;
  --pb-lang-offset: 12px;
  --pb-lang-list-width: 156px;
  --pb-lang-list-radius: 8px;
  --pb-lang-list-bg: #fff;
  /* The shadow all header dropdowns share, so the list stands out on a white page too. */
  --pb-lang-list-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.12);
  --pb-lang-option-color: #242a38;
  --pb-lang-option-hover-bg: #242a38;
  --pb-lang-option-hover-color: #fff;
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  color: var(--pb-lang-color);
}

/*
 * The kit styles every <button> as a filled navy pill; this one is an outline in the text color.
 * Sizes follow the Figma Menu component: padding 4/8/4/5 including the 1 px outline, an 18 px row.
 */
.pb-lang .pb-lang__toggle,
.pb-lang .pb-lang__toggle:hover,
.pb-lang .pb-lang__toggle:focus {
  display: inline-flex;
  align-items: center;
  gap: var(--pb-lang-gap);
  margin: 0;
  padding: 3px 7px 3px 4px;
  border: var(--pb-lang-border-width) solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -0.45px;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.pb-lang .pb-lang__toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.pb-lang__icon {
  display: block;
  flex: none;
  width: var(--pb-lang-icon-size);
  height: var(--pb-lang-icon-size);
  background-color: currentColor;
  -webkit-mask: var(--pb-lang-globe) center / contain no-repeat;
  mask: var(--pb-lang-globe) center / contain no-repeat;
}

/* 10 × 6, sitting 1.5 px below the row's centre as in Figma. */
.pb-lang__icon--chevron {
  width: 10px;
  height: 6px;
  margin-top: 3px;
  -webkit-mask-image: var(--pb-lang-chevron);
  mask-image: var(--pb-lang-chevron);
  transition: transform 0.15s ease;
}

.pb-lang.is-open .pb-lang__icon--chevron {
  transform: rotate(180deg);
}

.pb-lang__icon--check {
  -webkit-mask-image: var(--pb-lang-check);
  mask-image: var(--pb-lang-check);
}

.pb-lang__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ## The list, styled like the header menu's dropdowns
--------------------------------------------- */

.pb-lang .pb-lang__list {
  position: absolute;
  z-index: 100;
  top: calc(100% + var(--pb-lang-offset));
  left: 0;
  min-width: var(--pb-lang-list-width);
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--pb-lang-list-radius);
  background: var(--pb-lang-list-bg);
  box-shadow: var(--pb-lang-list-shadow);
  /* Out of the layout while closed: a hidden list near the edge would still widen the page. */
  display: none;
}

/* Fills the gap to the button, so the pointer can cross it without the list closing. */
.pb-lang__list::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: var(--pb-lang-offset);
}

.pb-lang--up .pb-lang__list {
  top: auto;
  bottom: calc(100% + var(--pb-lang-offset));
}

.pb-lang--up .pb-lang__list::before {
  top: 100%;
  bottom: auto;
}

/* Open: set by the script, or on hover and focus until the script has run. */
.pb-lang.is-open .pb-lang__list,
.pb-lang:not(.pb-lang--ready):hover .pb-lang__list,
.pb-lang:not(.pb-lang--ready):focus-within .pb-lang__list {
  display: block;
}

.pb-lang .pb-lang__item {
  margin: 0;
  padding: 0;
}

.pb-lang .pb-lang__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 10px;
  color: var(--pb-lang-option-color);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.6px;
  text-decoration: none;
  white-space: nowrap;
}

.pb-lang .pb-lang__item:first-child .pb-lang__option {
  border-top-left-radius: var(--pb-lang-list-radius);
  border-top-right-radius: var(--pb-lang-list-radius);
}

.pb-lang .pb-lang__item:last-child .pb-lang__option {
  border-bottom-left-radius: var(--pb-lang-list-radius);
  border-bottom-right-radius: var(--pb-lang-list-radius);
}

.pb-lang .pb-lang__option:hover,
.pb-lang .pb-lang__option:focus-visible {
  outline: none;
  background: var(--pb-lang-option-hover-bg);
  color: var(--pb-lang-option-hover-color);
  text-decoration: none;
}

/* ## The row in the mobile menu
--------------------------------------------- */

.pb-lang-menu-item__icon {
  display: inline-block;
  flex: none;
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.4em;
  background-color: currentColor;
  -webkit-mask: var(--pb-lang-globe) center / contain no-repeat;
  mask: var(--pb-lang-globe) center / contain no-repeat;
}

.pb-lang-menu-item__icon--check {
  margin-right: 0;
  margin-left: 0.5em;
  -webkit-mask-image: var(--pb-lang-check);
  mask-image: var(--pb-lang-check);
}

@media (prefers-reduced-motion: reduce) {
  .pb-lang__icon--chevron {
    transition: none;
  }
}
