.container {
  width: 100%;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  color: $white;
  cursor: pointer;
  transition: box-shadow 200ms cubic-bezier(0.4, 1, 0.75, 0.9);
  pointer-events: all;
  &.disabled, &.loading {
    cursor: not-allowed;
  }

  &.intentSuccess {
    background-color: $green;
    box-shadow: 0 10px 20px transparentize($green, 0.8);
    &:hover {
      background-color: $mountain-meadow;
    }
    &:active {
      background-color: $elf-green;
      box-shadow: 0 0 10px transparentize($green, 0.4);
    }
    &.disabled, &.loading {
      box-shadow: none;
      background-color: transparentize($green, 0.5);
      color: transparentize($white, 0.4);
    }
    &.loading {
      :global {
        .bp4-spinner {
          .bp4-spinner-track {
            stroke: transparentize($green, 0.15);
          }
          .bp4-spinner-head {
            stroke: $white;
          }
        }
      }
    }
    &.minimal {
      background: none;
      box-shadow: none;
      color: $mountain-meadow;
      &:hover {
        background-color: transparentize($green, 0.85);
      }
      &:active {
        background-color: transparentize($green, 0.7);
      }
      &.disabled {
        background: none;
        color: transparentize($mountain-meadow, 0.6);
      }
      &.loading {
        background: none;
        :global {
          .bp4-spinner {
            .bp4-spinner-track {
              stroke: transparentize($gray, 0.8);
            }
            .bp4-spinner-head {
              stroke: $green;
            }
          }
        }
      }
    }
  }

  &.intentPrimary {
    background-color: $blue;
    box-shadow: 0 10px 20px transparentize($blue, 0.8);
    &:hover {
      background-color: $eastern-blue;
    }
    &:active {
      background-color: $blue-chill;
      box-shadow: 0 0 10px transparentize($blue, 0.4);
    }
    &.disabled, &.loading {
      box-shadow: none;
      background-color: transparentize($blue, 0.5);
      color: transparentize($white, 0.4);
    }
    &.loading {
      :global {
        .bp4-spinner {
          .bp4-spinner-track {
            stroke: transparentize($blue, 0.15);
          }
          .bp4-spinner-head {
            stroke: $white;
          }
        }
      }
    }
    &.minimal {
      background: none;
      box-shadow: none;
      color: $eastern-blue;
      &:hover {
        background-color: transparentize($blue, 0.85);
      }
      &:active {
        background-color: transparentize($blue, 0.7);
      }
      &.disabled {
        background: none;
        color: transparentize($eastern-blue, 0.6);
      }
      &.loading {
        background: none;
        :global {
          .bp4-spinner {
            .bp4-spinner-track {
              stroke: transparentize($gray, 0.8);
            }
            .bp4-spinner-head {
              stroke: $blue;
            }
          }
        }
      }
    }
  }

  &.intentSecondary {
    background-color: $link-water;
    color: $white;
    box-shadow: 0 10px 20px transparentize($link-water, 0.8);
    &:hover {
      background-color: $heather;
    }
    &:active {
      background-color: $cadet-blue;
      box-shadow: 0 0 10px transparentize($link-water, 0.4);
    }
    &.disabled, &.loading {
      box-shadow: none;
      background-color: transparentize($link-water, 0.5);
    }
    &.loading {
      :global {
        .bp4-spinner {
          .bp4-spinner-track {
            stroke: $link-water;
          }
          .bp4-spinner-head {
            stroke: $white;
          }
        }
      }
    }
    &.minimal {
      background: none;
      box-shadow: none;
      color: $heather;
      &:hover {
        background-color: transparentize($link-water, 0.8);
      }
      &:active {
        background-color: transparentize($link-water, 0.65);
      }
      &.disabled {
        background: none;
        color: transparentize($heather, 0.6);
      }
      &.loading {
        background: none;
        :global {
          .bp4-spinner {
            .bp4-spinner-track {
              stroke: transparentize($gray, 0.8);
            }
            .bp4-spinner-head {
              stroke: $cadet-blue;
            }
          }
        }
      }
    }
  }

  &.intentWarning {
    background-color: $orange;
    box-shadow: 0 10px 20px transparentize($orange, 0.8);
    &:hover {
      background-color: $mandarin;
    }
    &:active {
      background-color: $red-damask;
      box-shadow: 0 0 10px transparentize($orange, 0.4);
    }
    &.disabled, &.loading {
      box-shadow: none;
      background-color: transparentize($orange, 0.5);
      color: transparentize($white, 0.4);
    }
    &.loading {
      :global {
        .bp4-spinner {
          .bp4-spinner-track {
            stroke: transparentize($orange, 0.15);
          }
          .bp4-spinner-head {
            stroke: $white;
          }
        }
      }
    }
    &.minimal {
      background: none;
      box-shadow: none;
      color: $mandarin;
      &:hover {
        background-color: transparentize($orange, 0.85);
      }
      &:active {
        background-color: transparentize($orange, 0.7);
      }
      &.disabled {
        background: none;
        color: transparentize($mandarin, 0.6);
      }
      &.loading {
        background: none;
        :global {
          .bp4-spinner {
            .bp4-spinner-track {
              stroke: transparentize($gray, 0.8);
            }
            .bp4-spinner-head {
              stroke: $orange;
            }
          }
        }
      }
    }
  }

  &.intentDanger {
    background-color: $red;
    box-shadow: 0 10px 20px transparentize($red, 0.8);
    &:hover {
      background-color: $roman;
    }
    &:active {
      background-color: $valencia;
      box-shadow: 0 0 10px transparentize($red, 0.4);
    }
    &.disabled, &.loading {
      box-shadow: none;
      background-color: transparentize($red, 0.5);
      color: transparentize($white, 0.4);
    }
    &.loading {
      :global {
        .bp4-spinner {
          .bp4-spinner-track {
            stroke: transparentize($red, 0.15);
          }
          .bp4-spinner-head {
            stroke: $white;
          }
        }
      }
    }
    &.minimal {
      background: none;
      box-shadow: none;
      color: $roman;
      &:hover {
        background-color: transparentize($red, 0.85);
      }
      &:active {
        background-color: transparentize($red, 0.7);
      }
      &.disabled {
        background: none;
        color: transparentize($roman, 0.6);
      }
      &.loading {
        background: none;
        :global {
          .bp4-spinner {
            .bp4-spinner-track {
              stroke: transparentize($gray, 0.8);
            }
            .bp4-spinner-head {
              stroke: $red;
            }
          }
        }
      }
    }
  }

  .icon {
    flex-shrink: 0;
    color: inherit;
  }

  .text {
    &.withLeftIcon {
      margin-left: 8px;
    }
    &.withRightIcon {
      margin-right: 8px;
    }
  }
}
