@import "../../theme.scss";

#sfsync-settings-page .numberInput-wrapper {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  max-width: 540px;

  label {
    max-width: 200px;
  }

  .numberInput {
    border-radius: $border-radius;
    border: 1px solid $border-field;
    background: $secondary-bg;
    max-width: 340px;
    flex-grow: 1;
    padding-inline-end: 10px;
    font-size: 14px;
    display: grid;
    grid-template-columns: 1fr 19px;
    grid-template-rows: 1fr 1fr;
    overflow: hidden;
    column-gap: 8px;
    padding: 4px 4px 4px 0;
    height: 42px;

    &:hover {
      border-color: $secondary;
    }

    &.numberInput-focused {
      border-color: $secondary;
      box-shadow: 0 0 0 1px $secondary-light;
    }

    button {
      cursor: pointer;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      height: 16px;
      padding-bottom: 2px;
      border: 1px solid;
      border-color: #dae2ed;
      background: #f3f6f9;
      color: $text-primary;

      &:hover {
        background: $secondary;
        color: white;
      }
    }

    .numberInput-decrementButton {
      grid-column: 2/3;
      grid-row: 2/3;
      border-bottom-left-radius: 4px;
      border-bottom-right-radius: 4px;
    }

    .numberInput-incrementButton {
      grid-column: 2/3;
      grid-row: 1/2;
      border-top-left-radius: 4px;
      border-top-right-radius: 4px;
      border-bottom: 0;
    }

    .numberInput-input {
      grid-column: 1/2;
      grid-row: 1/3;
      background: inherit;
      border: none;
      border-radius: inherit;
      padding-inline: 10px;
      outline: 0;
      box-shadow: none;
      font-size: 14px;
      font-family: inherit;
      min-height: unset;

      &::placeholder {
        font-size: 0.8rem;
        color: $text-placeholder;
      }
    }

    .numberInput-disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }
}
