//
// @file
// Invisible classes to initiate commone design patterns.
//

// Tabbed interfaces.
%tabs-primary,
%tabs-secondary {
  [dir] & {
    padding: {
      right: 0;
      left: 0;
    };
  }

  &,
  li {
    list-style-type: none;
  }

  li {
    display: inline-block;
    margin: {
      top: 0;
      bottom: 0;
    }

    [dir="ltr"] & {
      margin-right: $rhythm-space;

      &:last-child {
        margin-right: 0;
      }
    }

    [dir="rtl"] & {
      margin-left: $rhythm-space;

      &:last-child {
        margin-left: 0;
      }
    }
  }

  a {
    display: inline-block;
    text-decoration: none;

    &,
    &:link,
    &:visited {
      color: $color-text-light;
    }

    &:active,
    &.active,
    &:hover {
      color: $color-text;
    }
  }
}

%tabs-primary {
  li {
    border-bottom: $rhythm-space-short solid transparent;
    @include single-transition(border-color, .2s);
  }

  > [class*="active"],
  > :hover {
    a {
      color: $color-text;
    }
  }

  > [class*="active"] {
    border-color: $color-link-alternate;
  }

  a {
    padding: $rhythm-space-short 0;
    font: {
      size: ms(1);
      weight: $font-light;
    }
  }
}

%tabs-secondary {
  margin-top: -($rhythm-space + $rhythm-space-short);
  padding-top: $rhythm-space;

  a {
    font-weight: $font-bold;
  }
}
