@import (less) "../Theme/constants.css";

.button {
  height: 56*@unit;
  line-height: 56*@unit;
  font: inherit;
  font-weight: 400;

  text-decoration: none;
  text-align: center;
  cursor: pointer;

  display: inline-block;
  border: none;
  border-radius: 0*@unit;
  padding: 0;

  &:disabled {
    cursor: not-allowed;
    background-color: @color-primary-button-disabled;
    color: darken(@color-primary-button-disabled, 20%);
  }
}

.button-text {
  font-size: @font-size-small;
}

.button-centered {
  margin: auto;
}

.button-primary {
  /*text*/
  color: @color-white;

  /*layout*/
  display: block;
  width: 216*@unit;
  max-width: 100%;

  border-radius: 0*@unit;
  border: none;

  @media (--small-viewport) {
    width: 100%;
  }

  background-color: @color-primary-button;

  &.hoverDesktop:not(:disabled) {
    &:hover {
      background-color: @color-primary-button-hover;
    }
  }

  &:not(:disabled) {
    &:active,
    &.hoverDesktop:active {
      background-color: @color-primary-button-active;
    }
  }
}

.button-secondary {
  border: 1px solid @color-button-border;
  border-radius: 4*@unit;
  background-color: @color-transparent;
  color: @color-secondary-button-text;
  line-height: 16*@unit;
  padding: 19.2*@unit 32*@unit;

  &.hoverDesktop {
    &:hover {
      background-color: @color-secondary-button-hover;
    }
  }

  &:active,
  &.hoverDesktop:active {
    background-color: @color-secondary-button-active;
  }
}

.button-small {
  background-color: @color-small-button;
  border-radius: 0*@unit;
  color: @color-white;
  font-weight: 300;
  height: auto;
  line-height: 1.4;
  padding: 11.2*@unit 19.6*@unit;

  &:hover {
    background-color: @color-small-button-hover;
  }

  &:active {
    background-color: @color-small-button-active;
  }
}

.fallbackButton {
  cursor: pointer;
  display: inline-block;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  background: none;
  border: none;
}
