// ------------------------------------------------------------
// Omega Reset
// ------------------------------------------------------------

@mixin omega-reset($nth) {
    &:nth-child(#{$nth}) {
        margin-right: flex-gutter();
    }
    &:nth-child(#{$nth}+1) {
        clear: none
    }
}

// BUTTON

@mixin button($textcolor, $backgroundcolor, $bordercolor,$fontsize,$paddingh,$paddingv) {
    cursor: pointer;
    display: inline-block;
    background: $backgroundcolor;
    color: $textcolor;
    border: 1px solid $bordercolor;
    border-radius: 0;
    font-size: $fontsize;
    line-height: $fontsize;
    padding: $paddingh $paddingv;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
}

@mixin button-inline($textcolor, $backgroundcolor, $bordercolor,$fontsize,$paddingh,$paddingv) {
    cursor: pointer;
    display: inline;
    background: $backgroundcolor;
    color: $textcolor;
    border: 1px solid $bordercolor;
    font-size: $fontsize;
    padding: $paddingh $paddingv;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
}

@mixin button-locator($textcolor, $backgroundcolor, $bordercolor,$fontsize,$paddingh,$paddingv) {
    cursor: pointer;
    display: inline-block;
    background: $backgroundcolor;
    color: $textcolor;
    border: 1px solid $bordercolor;
    font-size: $fontsize;
    padding: $paddingh $paddingv;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
}

// TEXT CENTER

@mixin text-left() {
    text-align: left;
}

@mixin text-center() {
    text-align: center;
}

@mixin text-right() {
    text-align: right;
}

/**
 * Emulates the background-size: cover behaviour any element
 * @note: the parent element must have a relative position
 */
@mixin cover($reset: false)
{
  @if $reset
  {
    min-width: 0;
    min-height: 0;

    position: static;
    transform: none;
  }
  @else
  {
    display: block;
    height: auto;
    max-height: none;
    max-width: none;
    min-width: 100%;
    min-height: 100%;
    width: auto;

    position: absolute;
      left: 50%;
      top: 50%;
    transform: translateX(-50%) translateY(-50%) translateZ(0);
  }
}

@mixin reset-button
{
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
  outline: none;
  padding: 0;
}

@mixin fixed-columns($items, $gutter-width)
{
  margin-bottom: $gutter-width;
  margin-left: $gutter-width;
  width: calc((100% - #{$gutter-width * ($items - 1)}) / #{$items});

  &:nth-child(#{$items}n+1)
  {
    margin-left: 0;
  }
}
