.container {
  position: relative;
}

.select {
  border: 1px solid var(--Base-Border-Normal);
  border-radius: var(--Corner-radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--Spacing-x-half);
}

.select[data-focused="true"] {
  border: 1px solid var(--Border-Interactive-Focus);
  outline: none;
}

.select[data-focused="true"].discreet {
  border: 1px solid transparent;
  outline: none;
}
.select[data-focus-visible="true"].discreet {
  border: 1px solid var(--Border-Interactive-Focus);
}

.select.discreet {
  border: 1px solid transparent;
}

.select.discreet .input {
  background-color: unset;
  color: var(--Base-Text-High-contrast);
  gap: var(--Spacing-x1);
}

.select[data-disabled],
.select[data-disabled] .input {
  background-color: var(--UI-Input-Controls-Surface-Disabled);
  border: none;
  pointer-events: none;
}

.iconLabel {
  display: flex;
  gap: var(--Spacing-x-half);
}

.input {
  align-items: center;
  background-color: var(--UI-Opacity-White-100);
  border: none;
  border-radius: var(--Corner-radius-md);
  color: var(--UI-Text-High-contrast);
  display: flex;
  gap: var(--Spacing-x-half);
  height: 60px;
  outline: none;
  padding: var(--Spacing-x-one-and-half) var(--Spacing-x2);
  text-align: left;
  justify-content: space-between;
}

.input :global(.react-aria-SelectValue) {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  flex: 1 0 0;
}

.select.discreet :global(.react-aria-SelectValue) {
  align-items: center;
  justify-content: flex-end;
  flex-direction: row;
  font-weight: 500;
  gap: var(--Spacing-x-half);
}

.popover {
  background-color: var(--Main-Grey-White);
  border-radius: var(--Corner-radius-md);
  box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  flex-direction: column;
  gap: var(--Spacing-x1);
  overflow: auto;
  width: 100%;
}

.listBox {
  display: flex;
  flex-direction: column;
  gap: var(--Spacing-x1);
  padding: var(--Spacing-x2);
}

.listBoxItem {
  padding: var(--Spacing-x1);
}

.listBoxItem[data-focused="true"],
.listBoxItem[data-selected="true"] {
  background: var(--UI-Input-Controls-Surface-Hover);
  border-radius: var(--Corner-radius-md);
  outline: none;
}

.listBoxItem.showRadioButton {
  display: flex;
  align-items: center;
}

.listBoxItem.showRadioButton:before {
  flex-shrink: 0;
  content: "";
  margin-right: var(--Spacing-x-one-and-half);
  background-color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--Base-Border-Normal);
}

.listBoxItem[data-selected="true"].showRadioButton:before {
  box-shadow: inset 0 0 0 8px var(--UI-Input-Controls-Fill-Selected);
}

/* Use global react aria classnames here since setting a css modules classname overrides
   the class set by react aria.We use that class to style the child label component. */
.select:not(.discreet) :global(.react-aria-SelectValue) {
  display: grid;
  transition: height 200ms ease;
}

.input :global(.react-aria-SelectValue) {
  height: 18px;
  overflow: hidden;
}

.input :global(.react-aria-SelectValue):has(:nth-child(2)) {
  height: 38px;
  overflow: visible;
}
