/* LanguagePicker (built here, for the invitation page's top right): a button with the language in use in its own name,
   which opens the app's languages: a popover under it on a computer, a bottom sheet on a phone (SheetComponent, the
   choices at a finger's height). Tokens only. */
.wi-language-picker {
  display: inline-flex;
}

.wi-language-picker__button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--size-button-md);
  padding: 0 var(--space-3);
  border: var(--border-1) solid var(--border-default);
  border-radius: var(--radius-full);
  background-color: var(--background-surface);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-sm);
  line-height: var(--font-line-height-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
}
.wi-language-picker__button[data-hovered],
.wi-language-picker__button[data-open] {
  background-color: var(--background-sunken);
}
.wi-language-picker__button[data-focus-visible] {
  outline: none;
  box-shadow: var(--focus-ring);
}

.wi-language-picker__icon {
  flex: none;
  width: var(--size-icon-sm);
  height: var(--size-icon-sm);
}
.wi-language-picker__chevron {
  color: var(--text-tertiary);
}

/* The popover's list scrolls past the room it has (`--wi-popover-room`, which popover_controller.js sets when it places the
   popover itself). */
.wi-language-picker__popover {
  max-height: min(24rem, 70vh, var(--wi-popover-room, 100vh));
  overflow: auto;
}

/* In the phone's sheet: the rows at a finger's height, their text at the body's size. */
.wi-language-picker__choices {
  --wi-popover-font-size: var(--font-size-base);
  --wi-popover-line-height: var(--font-line-height-base);
}
.wi-language-picker__choices .wi-menu-choice {
  min-height: var(--size-control-lg);
}
