@import "bourbon";
@import "icons";
@import "type_mixins";
@import "variables";

@mixin defaultList() {
  list-style: none;
  @include type-body();
  margin: 0;
  padding: 0;

  > li {
    line-height: $base-line-height;
    list-style-type: none;
    margin: 0;
    padding: 0;
    zoom: 1;
    > ul, ol {
      margin-left: 1em;
    }
  }
}

%list {
  @include defaultList();
}

// UNORDERED, ORDERED
ul,
ol {
  @extend %list;
}

%list-with-margins {
  > li {
    list-style-type: disc;
    margin-left: 1.25rem;
    & li {
      margin-left: 0;
    }
  }
}

.list-bullet {
  @extend %list-with-margins;
  > li {
    list-style-type: disc;
  }
}

.list-ordered {
  @extend %list-with-margins;
  > li {
    list-style-type: decimal;
  }
}


// INLINE
.list-inline {
  margin-left: -5px;
  > li {
    display: inline-block;
    padding-left: 5px;
    padding-right: 5px;
  }
}

// COMMA
.list-comma {
  margin-right: -4px;
  display: inline;
  > li {
    display: inline;
    &:after {
      content:', ';
    }
    &:last-child:after {
      content: '';
    }
  }
}

// MEDIA OBJECT
.list-media-object {
  @include display(flex);
  @include flex-flow(row wrap);
  @include align-items(flex-start);
  width: 100%;
  padding: 0.8rem;

  &:hover {
    text-decoration: none;
  }

  .figure {
    margin-right: 0.65rem;
    vertical-align: top;
    min-width: 65px;
  }

  .body {
    @include flex(1);

    .header {
      padding-top: 0;

      &.link {
        color: $color-blue;
      }
    }
  }
}

// MEDIA
.list-media {
  .header {
    @include type-5();
    color: $color-blue;
    font-family: $font_regular;
    font-weight: bold;
  }
  .body {
    margin: 0;
    padding-bottom: 0.25rem;
    @include fontSize($type-M);
  }
  .sub-header {
    margin: 0;
    color: $color-gray-4;
  }
  .header,
  .sub-header {
    margin: 0;
    padding-top: 0;
  }

}

// Note: Form group lists are kept in _forms.scss.


// Definition Lists
// TODO


// DETAILS
details summary::-webkit-details-marker {
  color: $color-blue;
}