/** @define Button; use strict */

:root {
  --Button-border-color: currentcolor;
  --Button-border-width: 1px;
  --Button-color: inherit;
  --Button-disabled-opacity: 0.6;
  --Button-font: inherit;
  --Button-padding: 0.4em 0.75em;
}

/**
 * The button classes are best applied to links, buttons, and submit inputs.
 * These components can be used in forms, as calls to action, or as part of the
 * general UI of the site/app.
 */

/**
 * 1. Corrects inability to style clickable `input` types in iOS.
 * 2. Normalize `box-sizing` across all elements that this component could be
 *    applied to.
 * 3. Inherit text color from ancestor.
 * 4. Inherit font styles from ancestor.
 * 5. Normalize `line-height`. For `input`, it can't be changed from `normal` in Firefox 4+.
 * 6. Prevent button text from being selectable.
 * 7. Make sure `input` will wrap text across multiple lines.
 */

.Button {
  -webkit-appearance: none; /* 1 */
  background: transparent;
  border-color: var(--Button-border-color);
  border-style: solid;
  border-width: var(--Button-border-width);
  box-sizing: border-box; /* 2 */
  color: var(--Button-color); /* 3 */
  cursor: pointer;
  display: inline-block;
  font: var(--Button-font); /* 4 */
  line-height: normal; /* 5 */
  margin: 0;
  padding: var(--Button-padding);
  position: relative;
  text-align: center;
  text-decoration: none;
  user-select: none; /* 6 */
  white-space: normal; /* 7 */
}

/**
 * Remove excess padding and border in Firefox 4+
 */

.Button::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/**
 * Work around a Firefox/IE bug where the transparent `button` background
 * results in a loss of the default `button` focus styles.
 */

.Button:focus {
  outline: 1px dotted;
  outline: 5px auto -webkit-focus-ring-color;
}

/**
 * UI states
 */

.Button:hover,
.Button:focus,
.Button:active {
  text-decoration: none;
}

.Button:disabled,
.Button.is-disabled {
  cursor: default;
  opacity: var(--Button-disabled-opacity);
}
