.root {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.optionsFieldset {
  margin-inline: 0;
  display: grid;
  grid-template-columns: 3rem 8rem 1.5rem;
  gap: 0.5rem 0;
  border-radius: var(--style-radius-m);
  border: 1px solid var(--theme-border-color);
  padding-inline: 0.5rem;
  padding-right: 0;
}

.input {
  outline: none;
}

.input:focus {
  outline: none;
}

.inputSpan2 {
  grid-column: span 2;
  outline: none;
}

.inputSpan2:focus {
  outline: none;
}

.removeButton {
  margin-left: auto;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  padding: 0;
}

.removeButton:hover {
  color: var(--theme-error-400);
}

.controlsGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.offsetLabel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: 0.5rem;
}

.offsetInput {
  width: 2rem;
  text-align: center;
}

.popoverContent {
  z-index: 50;
  max-height: var(--available-height);
  min-width: 8rem;
  transform-origin: var(--transform-origin);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--style-radius-m);
  border: 1px solid var(--theme-border-color);
  background-color: var(--theme-elevation-50);
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.popoverContent[data-open] {
  animation: popoverIn 150ms ease-out;
}

.popoverContent[data-closed] {
  animation: popoverOut 150ms ease-in;
}

@keyframes popoverIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes popoverOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

.optionsList {
  display: flex;
  flex-direction: column;
}

.optionItem {
  cursor: pointer;
  border: none;
  background-color: transparent;
  padding-inline: 0.25rem;
}

.optionItem:hover {
  background-color: var(--theme-elevation-250);
}

.customInputGroup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--theme-border-color);
  padding: 0.5rem;
}

.customInput {
  width: 2rem;
  border-radius: var(--style-radius-s);
  border-color: transparent;
  text-align: center;
}

.customInput:focus {
  border-color: var(--theme-border-color);
  outline: none;
}
