.formula-field {
  @extend %context;

  display: flex;
  flex-direction: column;
  width: 510px;
  border: solid 1px $color-neutral-400;
}

.formula-field__error {
  max-width: 228px;
  white-space: normal;
  word-break: break-word;
}

.formula-field__refresh-link {
  display: block;
  margin-top: 12px;
}

.formula-field__input {
  flex-shrink: 0;
  background-color: $color-neutral-100;
  border-bottom: solid 1px $color-neutral-200;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  padding: 14px;
}

.formula-field__input-error {
  width: 100%;
  flex-shrink: 0;
  padding: 14px;
  border-bottom: solid 1px $color-neutral-200;
  background-color: $color-error-100;
  white-space: normal;
  word-break: break-word;
  color: $color-error-500;
}

.formula-field__body {
  display: flex;
  max-height: 302px;
  min-height: 0;
}

.formula-field__items {
  flex: 0 0 154px;
  overflow-y: auto;
  border-right: solid 1px $color-neutral-200;
}

.formula-field__item-group {
  list-style: none;
  margin: 0;
  padding: 12px 0;

  &:not(:last-child) {
    border-bottom: solid 1px $color-neutral-200;
  }
}

.formula-field__item-group-title {
  font-size: 12px;
  color: $color-neutral-600;
  padding: 0 12px 6px;
}

.formula-field__item {
  &:not(:last-child) {
    margin-bottom: 4px;
  }
}

.formula-field__item-link {
  @extend %ellipsis;

  display: block;
  margin: 0 6px;
  padding: 0 6px;
  font-size: 13px;
  line-height: 24px;
  color: $color-neutral-900;

  @include rounded($rounded);
  @include flex-align-items(4px);

  &:hover {
    text-decoration: none;
    background-color: $color-neutral-100;
  }
}

.formula-field__item-icon {
  font-size: 14px;
  color: $color-neutral-600;
}

.formula-field__description {
  width: 100%;
  overflow-y: auto;
  padding: 16px;
  white-space: normal;
  word-break: break-word;
}

.formula-field__description-icon {
  font-size: 18px;
}

.formula-field__description-heading-1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;

  @include flex-align-items(6px);
}

.formula-field__description-heading-2 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.formula-field__description-text {
  font-size: 13px;
  margin-bottom: 16px;
}

.formula-field__description-example {
  font-family: monospace;
  background-color: $color-neutral-100;
  padding: 6px 10px;

  @include rounded($rounded);

  code {
    font-size: 13px;
    line-height: 180%;
    max-width: 100%;
    word-break: break-word;
    white-space: pre-wrap;
  }
}
