// Tiles
.tile {
  align-content: space-between;
  align-items: flex-start;
  display: flex;
  margin-bottom: $control-padding;

  .tile-icon {
    padding-right: $control-padding;
  }

  &:last-child {
    margin-bottom: 0;
  }

  // Sections
  .tile-section {
    flex: 0 0 auto;

    &:not(:first-child):last-child {
      justify-content: flex-end;
    }

    &.tile-content {
      flex: 1 1 auto;

      &:not(:last-child) {
        padding-right: $unit-4;
      }
    }
  }

  // List
  &.tile-list {
    align-items: center;

    .tile-icon {
      align-self: center;
    }

    // list with divider
    &.tile-list-divider {
      padding: $control-padding 0;
      margin-bottom: 0;
      border-bottom: $border-width solid $border-color;

      &:last-child, &.tile-list-divider-last {

        .tile-section {
          border-bottom: none;
        }
      }
    }

  }

  .tile-title,
  .tile-subtitle {
    line-height: $line-height;
  }

  &.tile-centered {
    align-items: center;

    .tile-content {
      overflow: hidden;
    }

    .tile-title,
    .tile-subtitle {
      @include text-ellipsis();
      margin-bottom: 0;
    }
  }
}

.theme-default-local {
  .tile {
    &.tile-list-divider {
      .tile-section:not(.tile-icon) {
        border-color: $border-color-dark;
      }
    }
  }
}