button:not(.native-button),
.button {
  display: inline-block;
  padding: 8px 12px;
  background: var(--main);
  border: 1px solid var(--main);
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  --text-color: #fff;
  text-decoration: none;

  color: var(--text-color) !important;

  // No text wrapping
  white-space: nowrap;

  --main: #0160a0;
  --accent1: #00528a;
  --accent1-faded: #007acc12;
  --accent2: #004574;
  --accent2-faded: #006bb31f;

  &.danger {
    --main: #900000;
    --accent1: #ac0000;
    --accent1-faded: #cc000012;
    --accent2: #6b0000;
    --accent2-faded: #b300001f;
  }

  &:hover,
  &:focus {
    background: var(--accent1);
  }

  &:active {
    background: var(--accent2);
  }

  &:disabled {
    border-color: #7c7c7c;
    background: #7c7c7c;
    cursor: not-allowed;
  }

  .buttonLabel {
    display: flex;
    align-items: center;

    svg {
      margin-top: -1px;
      margin-right: 6px;
      margin-left: -4px;
    }
  }

  &.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    aspect-ratio: 1 / 1;
  }

  &.outlined {
    background: transparent;
    border: 1px solid var(--main);
    --text-color: var(--main);

    &:hover,
    &:focus {
      border-color: var(--accent1);
      background-color: var(--accent1-faded);
    }

    &:active {
      border-color: var(--accent2);
      background-color: var(--accent2-faded);
    }
  }
}

.buttonGroup {
  display: flex;

  button {
    &:not(:last-of-type) {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
      border-right: 1px solid rgba(0, 0, 0, 0.25);
    }

    &:not(:first-of-type) {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }

    &:not(.outlined) {
      &:not(:first-of-type) {
        border-left: none;
      }
    }
  }
}
