.field-group {
  textarea {
    min-height: 120px;
    max-height: 300px;
    field-sizing: content;
  }
}

.field-group-name {
  margin-bottom: 6px;
  display: inline-block;
  font-weight: 500;
}

.field-group-error {
  color: var(--danger-color);
  font-size: 0.875rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  will-change: opacity;
  transition: max-height 0.3s ease, opacity 0.1s ease, margin-top 0.3s ease;
}

.field-error+.field-group-error {
  display: block;
  max-height: 80px;
  opacity: 1;
  margin-top: 4px;
}

.field {
  width: 100%;
  color: var(--neutral-800);
  border: 1px solid;
  border-color: var(--neutral-300);
  border-radius: var(--border-radius-sm);
  padding-inline: 14px;
  box-shadow: 0 0 0 0px transparent;
  outline: none;
  transition: box-shadow 0.3s cubic-bezier(.2, .9, .3, 1);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;

  @container (min-width: 769px) {
    padding-inline: 16px;
  }

  &:not(textarea) {
    height: var(--field-height);
  }

  &:focus,
  &:focus-within {
    box-shadow: 0 0 0 2px var(--neutral-800);
    border: 1px solid var(--neutral-800);
  }

  &.field-error {
    border-color: var(--danger-color) !important;

    &:focus,
    &:focus-within {
      box-shadow: 0 0 0 2px var(--danger-color-200) !important;
    }
  }
}



.field-group-number {
  color: var(--neutral-800);
  border: 1px solid;
  border-color: var(--neutral-300);
  border-radius: var(--border-radius-xs);
  box-shadow: 0 0 0 0px transparent;
  transition: box-shadow 0.3s cubic-bezier(.2, .9, .3, 1);
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  height: var(--field-height);

  input[type="number"] {
    border: 0;
    height: var(--field-height);
    flex-grow: 1;
    padding-inline: 14px;
    -moz-appearance: textfield;
    outline: none;

    &::-webkit-outer-spin-button,
    &::-webkit-inner-spin-button {
      appearance: none;
      -webkit-appearance: none;
      margin: 0;
    }
  }

  .field-group-number-btn {
    border: 0;
    padding-inline: 14px;
    display: grid;
    place-content: center;
    background-color: #eaecf0;

    &:not(:disabled):active {
      box-shadow: 2px 4px 9px var(--text-muted) inset;
    }

    svg {
      width: 14px;
      height: 14px;
    }

    &.plus {
      border-left: 1px solid var(--neutral-300);
    }

    &.minus {
      border-right: 1px solid var(--neutral-300);
    }
  }

}