@import "./theme.css";

.react-aria-NumberField {
  margin-bottom: 8px;
  color: var(--text-color);

  .react-aria-Group {
    display: flex;
    width: fit-content;
    border-radius: 4px;

    &[data-focus-within] {
      outline: 1px solid var(--focus-ring-color);
      .react-aria-Input,
      .react-aria-Button {
        border-color: var(--focus-ring-color);
      }
    }
  }

  .react-aria-Button {
    font-size: 1.2249999999999999rem;
    width: 2.0124999999999997rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    &[slot=decrement] {
      border-start-end-radius: 0;
      border-end-end-radius: 0;
    }

    &[slot=increment] {
      border-start-start-radius: 0;
      border-end-start-radius: 0;
    }
  }

  .react-aria-Input {
    background: var(--field-background);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--field-text-color);
    margin: 0 -1px;
    z-index: 1;
    font-size: 0.875rem;
    padding: 0.375375rem 0.499625rem;
    outline: none;
    width: 5.25rem;
    flex: 1;
  }

  &[data-invalid] {
    .react-aria-Input,
    .react-aria-Button {
      border-color: var(--invalid-color);
    }

    &:focus-within {
      .react-aria-Input,
      .react-aria-Button {
        border-color: var(--focus-ring-color);
      }
    }
  }

  .react-aria-FieldError {
    font-size: 12px;
    color: var(--invalid-color);
  }

  [slot=description] {
    font-size: 12px;
  }

  .react-aria-Button {
    &[data-disabled] {
      border-color: var(--border-color-disabled);
      color: var(--text-color-disabled);
    }
  }

  .react-aria-Input {
    &[data-disabled] {
      border-color: var(--border-color-disabled);
      color: var(--text-color-disabled);
    }
  }
}
