[role='menu'] {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  min-width: 10rem;
  overflow: hidden auto;

  [role='separator'] {
    background: var(--text-color-muted);
    height: 1px;
    margin: 0.5rem 1rem;
  }

  [role='group'] {
    margin: 0;
    padding: 0;
  }
}

[role^='menuitem'] {
  display: flex;
  justify-content: stretch;
  align-items: center;
  min-height: 1.5rem;
  border-radius: 0.25rem;
  padding: 0 0.5rem;
  white-space: nowrap;

  &[aria-expanded='true'],
  &:hover {
    color: var(--text-color-strong);
    background: var(--hover-color);
  }
  &:focus {
    color: var(--text-color-strong);
    background: var(--hover-color);
  }

  &[aria-disabled='true'] {
    color: var(--text-color-muted) !important;
    cursor: not-allowed;
  }
}

a[role='menuitem'] {
  color: var(--text-color);
  text-decoration: none;
}

[role='menuitemradio'][aria-checked='true'] {
  color: var(--text-color-strong);
  background: var(--accent-color);
}

[role='menuitemcheckbox'] {
  &[aria-checked='false'] .item-icon {
    background: var(--text-color-muted);
    mask-image: url(~resources/icons/select-all.svg);
    -webkit-mask-image: url(~resources/icons/select-all.svg);
  }

  &[aria-checked='true'] .item-icon {
    background: var(--text-color);
    mask-image: url(~resources/icons/select-all-checked.svg);
    -webkit-mask-image: url(~resources/icons/select-all-checked.svg);
  }
}

[role='menu'] [role='separator'] {
  background: var(--text-color-muted);
  height: 1px;
  margin: 0.5rem 1rem;
  list-style: none;
}

.item-icon,
.item-accelerator {
  display: flex;
  pointer-events: none;
  align-items: center;
  min-height: 1em;
  min-width: 1em;
  fill: var(--text-color);

  .custom-icon {
    margin: 0;
    height: 1em;
    width: 1em;
  }
}

.item-icon {
  margin-right: 0.5rem;
}

.item-label {
  flex: 1 0 auto;
}

.item-accelerator {
  margin-left: 0.5rem;
  justify-content: flex-end;
}

[role='menuitemslider'] {
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;

  > div {
    width: 100%;
    > input {
      width: 100%;
      border-radius: 2px;  
      &:focus {
        &::-webkit-slider-thumb {
          filter: brightness(1.1);
        }
      }

      &::-webkit-slider-thumb {
        background: var(--accent-color);
        cursor: pointer;
      }
    }
  }
  datalist {
    display: flex;
    justify-content: space-evenly;
    font-size: smaller;
    color: var(--text-color-muted);
    option {
      padding: 0;
    }
  }
  label {
    font-size: small;
  }
}
