.root {
  display: flex;
  align-items: center;
}

.selectorLabel {
  color: var(
    --h5w-selector-label--color,
    var(--h5w-toolbar-label--color, royalblue)
  );
  margin-left: 0.25rem;
}

.wrapper {
  position: relative;
  display: flex;
}

.btn {
  composes: btn from '../../Toolbar.module.css';
}

.btnLike {
  composes: btnLike from '../../Toolbar.module.css';
  padding: 0 0.375rem 0 0.5625rem !important; /* FIX style ordering issue with Vite */
}

.icon {
  composes: icon from '../../Toolbar.module.css';
}

.label {
  composes: label from '../../Toolbar.module.css';
}

.arrowIcon {
  align-self: center;
  margin-top: 1px;
  margin-left: 1px;
  color: var(--h5w-selector-arrowIcon--color, dimgray);
  font-size: 1.25em;
}

.btn[aria-expanded='true'] .arrowIcon {
  transform: rotate(180deg);
}

.menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%); /* center menu with button */
  z-index: 1; /* above overflow menu */
  min-width: 100%;
  padding-top: 0.25rem;
  background-color: var(--h5w-selector-menu--bgColor, white);
  overflow: hidden scroll;
  scrollbar-width: thin;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 0px 1px,
    rgba(0, 0, 0, 0.1) 0px 4px 11px;
}

.list {
  display: flex;
  flex-direction: column;
  margin: 0 0 0.25rem;
  padding-left: 0;
  list-style-type: none;
}

.groupLabel {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  padding-left: 0.75rem;
  color: var(--h5w-selector-groupLabel--color, gray);
  text-transform: uppercase;
  font-size: 0.75em;
  font-weight: 600;
}

.selectedOption {
  flex: 1 1 0%;
}

.option {
  flex: 1 1 0%;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.linkOption {
  composes: btn from '../../Toolbar.module.css';
  composes: option;
  padding: 0.5rem 0.75rem !important; /* FIX style ordering issue with Vite */
}

.option:hover,
.option:focus {
  background-color: var(--h5w-selector-option-hover--bgColor, whitesmoke);
}

.option:focus {
  outline: 1px solid var(--h5w-selector-option-focus--outlineColor, gray);
  outline-offset: -1px;
}

.option[data-selected] {
  background-color: var(--h5w-selector-option-selected--bgColor, #eee);
}
