/* Copied from https://github.com/eten-tech-foundation/scripture-editors/blob/platform_v0.8.0/libs/shared/src/styles/nodes-menu.css */

/* Floating Menu Styles */
.floating-box:has(> .autocomplete-menu-container) {
  background: #f1f1f1;
  border: 1px solid #ccc;
}

.floating-box .autocomplete-menu-options {
  display: block;
  text-align: left;
  width: fit-content;
  overflow-x: clip;
  text-overflow: ellipsis;
  overflow-y: auto;
  max-height: 200px;
}

.autocomplete-menu-options button {
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: min-content minmax(0, 90vw);
  align-items: baseline;
  max-width: 400px;
  gap: 1rem;
  width: 100%;
  white-space: nowrap;
  font-size: 0.9rem;
  border-radius: 0;
  border: 0;
}

/* stylelint-disable-next-line selector-no-qualifying-type */
.autocomplete-menu-options button[aria-selected="true"] {
  background: rgb(0 0 0 / 5%);
}

/* stylelint-disable-next-line selector-no-qualifying-type */
.autocomplete-menu-options button.active {
  background: rgb(189, 232, 255);
}

.autocomplete-menu-options button .description {
  overflow: hidden;
  text-overflow: ellipsis;
  text-wrap: nowrap;
  white-space: nowrap;
  text-align: right;
  align-items: baseline;
  font-size: 0.7rem;
  opacity: 0.8;
}

/* stylelint-disable-next-line selector-no-qualifying-type */
.autocomplete-menu-container input[type="text"] {
  width: auto;
  padding: 0.5rem;
  box-sizing: border-box;
  background: #e9e9e9;
  border: 0;
  outline: none;
  color: #222;
  font-size: 1rem;
  margin: 0.4rem;
  border-radius: 0.2rem;
  font-family: inherit;
}

.autocomplete-menu-container {
  display: flex;
  flex-direction: column;
}

.autocomplete-menu-container.inverse {
  flex-direction: column-reverse;
}
