/** Button Styles */
.button {
  /** Red Button */
  &.button-danger {
    background: $danger_button_color;
    border-color: darken($danger_button_color, 5%);
    color: $white;
    box-shadow: 0 1px 0 darken($danger_button_color, 10%);

    &:hover {
      background: $danger_button_color_hover;
      border-color: $danger_button_color_hover;
      color: $white;
    }
    &:active,
    &:focus {
      background: lighten($danger_button_color, 10%);
      border-color: lighten($danger_button_color, 5%);
      color: $white;
    }
  }
  /** Red Button */
  &.button-success {
    background: $success_button_color;
    border-color: darken($success_button_color, 5%);
    color: $white;
    box-shadow: 0 1px 0 darken($success_button_color, 10%);

    &:hover {
      background: $success_button_color_hover;
      border-color: $success_button_color_hover;
      color: $white;
    }
    &:active,
    &:focus {
      background: lighten($success_button_color, 10%);
      border-color: lighten($success_button_color, 5%);
      color: $white;
    }
  }
}

/* Add this attribute to the element that needs a tooltip */
[data-wg-tooltip] {
  position: relative;
  z-index: 2;
  cursor: pointer;
}

/* Hide the tooltip content by default */
[data-wg-tooltip]:before,
[data-wg-tooltip]:after {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Position tooltip above the element */
[data-wg-tooltip]:before {
  position: absolute;
  bottom: 120%;
  left: 50%;
  margin-bottom: 5px;
  margin-left: -35px;
  padding: 7px;
  width: 60px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  background-color: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  content: attr(data-wg-tooltip);
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
}

/* Triangle hack to make tooltip look like a speech bubble */
[data-wg-tooltip]:after {
  position: absolute;
  bottom: 120%;
  left: 50%;
  width: 0;
  margin-left: -5px;
  border-top: 5px solid #000;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  content: " ";
  font-size: 0;
  line-height: 0;
}

/* Show tooltip content on hover */
[data-wg-tooltip]:hover:before,
[data-wg-tooltip]:hover:after {
  visibility: visible;
  opacity: 1;
}
