/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

rich-select {
  display: inline-block;
  position: relative;
}

/* Focusing on the underlying select element outlines the outer
rich-select wrapper making it appear like rich-select is focused. */
rich-select:focus-within {
  outline: 1px dotted;
}

/*
 * The HTML select element is hidden and placed on the rich-option
 * element to make it look like clicking on the rich-option element
 * in the closed state opens the HTML select dropdown. */
rich-select > select {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.rich-option {
  display: grid;
  background: #fff; /* TODO: system colors */
  padding: 8px;
}
