/** @define Button */

:root {
  --Button-border-color: transparent;
  --Button-border-width: 0;
  --Button-color: inherit;
  --Button-disabled-opacity: 0.6;
  --Button-font: 1rem var(--fontBody);
  --Button-padding: 0.75em 2em 0.75em;
}

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

/**
 * 1. Normalize `box-sizing` across all elements that this component could be
 *    applied to.
 * 2. Inherit text color from ancestor.
 * 3. Inherit font styles from ancestor.
 * 4. Prevent button text from being selectable.
 */

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

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

.btn::-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.
 */

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

/**
 * UI states
 */

.btn:link {
  border-bottom-width: var(--Button-border-width);
  transition:
    color 0.3s 0.1s cubic-bezier(0.77, 0, 0.175, 1),
    background-color 193ms ease-out;
}

.btn:hover,
.btn:focus,
.btn:active {
  cursor: pointer;
  color: var(--Button-color);
  transition:
    color 0.3s 0.1s cubic-bezier(0.77, 0, 0.175, 1),
    background-color 250ms ease-in;
}

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

.btn span {
  position: relative;
  z-index: 3;
}

/**
* Button layout and positioning
*/

.btn--offset {
  margin-left: calc(-1 * var(--gutterPage));
}

/**
 * Different colors
 */

.btn--dark,
.btn--dark:link {
  background-color: var(--black);
  color: var(--white);
  text-shadow: 0.05em 0.05em 0.3em color(var(--black) alpha(-15%));
}

.btn--dark:visited {
  background-color: var(--black);
  color: var(--white);
}

.btn--dark:focus,
.btn--dark:hover {
  color: var(--white);
  background-color: color(var(--black) alpha(-20%));
}

.btn--pink,
.btn--pink:link {
  background-color: var(--darkPink);
  color: var(--white);
  text-shadow: 0.05em 0.05em 0.3em color(var(--pink) alpha(-20%));
}

.btn--pink:visited {
  background-color: var(--darkPink);
  color: var(--white);
}

.btn--pink:focus,
.btn--pink:hover {
  background-color: color(var(--darkPink) alpha(-40%));
  color: var(--white);
}
