@import "./list";
@import "./list.ios.vars";

// iOS List
// --------------------------------------------------

.list-ios {
  @include margin(-1px, $list-ios-margin-end, $list-ios-margin-bottom, $list-ios-margin-start);
}


// If the item has the no-lines attribute remove the bottom border from:
// the item itself (for last-child items)
// the item-inner class (if it is not last)
.list-ios .item[no-lines],
.list-ios .item[no-lines] .item-inner {
  border-width: 0;
}

.list-ios:not([inset]) + .list-ios:not([inset]) ion-list-header {
  @include margin(-$list-ios-margin-top, null, null, null);
  @include padding(0, null, null, null);
}


// iOS Inset List
// --------------------------------------------------

.list-ios[inset] {
  @include margin($list-inset-ios-margin-top, $list-inset-ios-margin-end, $list-inset-ios-margin-bottom, $list-inset-ios-margin-start);
  @include border-radius($list-inset-ios-border-radius);
}

.list-ios[inset] ion-list-header {
  background-color: $item-ios-background-color;
}

.list-ios[inset] .item {
  border-bottom: 1px solid $item-ios-border-color;
}

.list-ios[inset] .item-inner {
  border-bottom: 0;
}

.list-ios[inset] > ion-item:first-child .item,
.list-ios[inset] > ion-item-sliding:first-child .item {
  border-top: 0;
}

.list-ios[inset] > ion-item:last-child .item,
.list-ios[inset] > ion-item-sliding:last-child .item {
  border-bottom: 0;
}

.list-ios[inset] + ion-list[inset] {
  @include margin(0, null, null, null);
}


// iOS No Lines List
// --------------------------------------------------

.list-ios[no-lines] ion-list-header,
.list-ios[no-lines] .item,
.list-ios[no-lines] .item-inner {
  border-width: 0;
}
