// Dependencies.
@import 'init';

// Button
//
// In addition to the default styling of `<button>` and
// `<input type="submit|image|reset|button">` elements, the `.button` class and
// its variants can apply buttons styles to various elements (like an `<a>`
// link).
//
// Markup: button.hbs
//
// :hover - Hover styling.
// .button--large - Large button styling.
//
// Style guide: components.button

.button,
%button {
  @include padding(15px 20px);
  // Prevent "line-height: normal" rule below from breaking the
  // "appearance: button" styling on the input elements in Firefox.
  line-height: inherit;
  // Some styles don't apply to <a> links since they are inline elements.
  display: inline-block;
  text-decoration: none;
  // Improve usability and consistency of cursor style between image-type `input` and others.
  cursor: pointer;
  border: 0;
  background: color(text-bg-rev);
  color: color(text-rev);
  font-weight: weight(bold);

  @if support-legacy-browser(ie, '7') {
    // Remove inner spacing in IE 7 without affecting normal text inputs.
    *overflow: visible;
  }

  &:hover,
  &:focus {
    text-decoration: none;
    // Add your styles.
  }

  // Re-set default cursor for disabled elements.
  &[disabled] {
    @include opacity(.25);

    &:hover,
    &:focus {
      // Add your styles.
    }
  }

  &--large {
    @include padding(25px);
    @include type-layout(32px, 1);
  }

  &--wide {
    display: block;
    text-align: center;
  }
}
