$normal: "Open Sans", Arial, sans-serif;
$serif: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;

@mixin gradient-vertical($from, $to) {
  background: $to;
  background: -moz-linear-gradient(top,  $from 0%, $to 100%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$from), color-stop(100%,$to));
  background: -webkit-linear-gradient(top, $from 0%,$to 100%);
  background: -o-linear-gradient(top, $from 0%,$to 100%);
  background: -ms-linear-gradient(top, $from 0%,$to 100%);
  background: linear-gradient(to bottom, $from 0%,$to 100%);
}

@mixin gradient-image($image, $from, $to) {
  background-image: $image;
  background-image: $image, -moz-linear-gradient(top, $from 0%, $to 100%); /* FF3.6+ */
  background-image: $image, -webkit-gradient(linear, left top, left bottom, color-stop(0%,$from), color-stop(100%,#eaeaea)); /* Chrome,Safari4+ */
  background-image: $image, -webkit-linear-gradient(top,  $from 0%,$to 100%); /* Chrome10+,Safari5.1+ */
  background-image: $image, -o-linear-gradient(top, $from 0%,$to 100%); /* Opera 11.10+ */
  background-image: $image, -ms-linear-gradient(top, $from 0%,$to 100%); /* IE10+ */
  background-image: $image, linear-gradient(to bottom, $from 0%,$to 100%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$from', endColorstr='#eaeaea',GradientType=0 ); /* IE6-9 */
  background-repeat: no-repeat;
  background-position: center center;
}

@mixin button($border, $highlight) {
  border: 1px solid $border;
  -moz-border-radius: 4px;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  -moz-box-shadow: 0 1px 2px #ccc, inset 0 1px 1px $highlight;
  -webkit-box-shadow: 0 1px 2px #ccc, inset 0 1px 1px $highlight;
  box-shadow: 0 1px 2px #ccc, inset 0 1px 1px $highlight;
  font: normal 500 16px/16px "Open Sans", Arial, sans-serif;
  margin-left: 1px;
  margin-top: 1px;
  padding: 6px 30px;
  text-decoration: none;

  &:focus {
    color: #fff;
    outline: 0;
  }
}

@mixin grey-button {
  @include gradient-vertical(#fefefe,#e0e0e0);
  @include button(#ccc, #fff);

  &:hover,
  &:focus,
  &:active,
  &:disabled {
    background: #eeeeee;
    color: #5A5A5A;
    outline: 0;
    text-shadow: 0 -1px 1px #fff;
  }

}

@mixin blue-button {
  @include gradient-vertical(#36A2F6,#2F88CD);
  @include button(#2F88CD, #7bb8ef);
  color: #fff;

  &:hover,
  &:focus,
  &:active,
  &:disabled {
    background: #359ff2;
    box-shadow: 0 1px 2px #cccccc, inset 0 1px 1px #7bb8ef;
    color: #fff;
    text-shadow: 0 -1px 1px #2F88CD;
  }
}

@mixin box-shadow($horizontal,$vertical,$width,$color) {
  -moz-box-shadow: $horizontal $vertical $width $color;
  -webkit-box-shadow: $horizontal $vertical $width $color;
  box-shadow: $horizontal $vertical $width $color;
}

@mixin round-corners($topleft,$topright,$bottomright,$bottomleft) {
  -moz-border-radius: $topleft $topright $bottomright $bottomleft;
  -webkit-border-radius: $topleft $topright $bottomright $bottomleft;
  border-radius: $topleft $topright $bottomright $bottomleft;
}

@function calc-em($target-px, $context) {
  @return ($target-px / $context) * 1em;
}
