/**
 * https://material.google.com/components/lists.html#lists-specs
 */

@import "../../css/mixins";

.List {
  padding: 0 0;
  margin: 0 0;
  list-style: none;
  background-color: white;
}

.List-row-text {
  flex-shrink: 1;
  min-width: 150px;
}

.List-row-text-primary {
  font-size: 16px;
  margin: 0 0;
  margin-bottom: 6px;
  font-weight: normal;
  padding: 0 0;
}

.List-row--oneline .List-row-text-primary {
  margin-bottom: 0px;
}

.List-row.List-row--selectable:focus {
  background-color: #f1f1f1;
  outline: none;
}

.List-row--selectable:hover {
  background-color: #fdfdfd;
}

.List-row-text-secondary, .List-row-text-subheader {
  font-size: 14px;
  line-height: 19px;
  font-weight: normal;
  padding: 0 0;
  margin: 0 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block;
  width: 100%;
  overflow: hidden;
}

.List-row-text-secondary {
  color: #808080;
}

.List-row--twoline {
  height: 72px;
}

.List-row--threeline {
  height: 88px;
}

.List-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding-left: 16px;
  padding-right: 16px;
  /** This article suggest to increase padding for table and above
   * https://material.google.com/layout/metrics-keylines.html#metrics-keylines-keylines-spacing
   */
  @include medium {
    padding-left: 24px;
    padding-right: 24px;
  }
  &:first-child {
    padding-top: 8px;
  }

  &:last-child {
    padding-bottom: 8px;
  }
}

.List-row-icon-left, .List-row-icon-right, .List-row-avatar {
  flex-shrink: 0;
  width: 56px;
}

/* Three line rows have top aligned icons */
.List-row.List-row--threeline {
  align-items: flex-start;

  & > * {
    margin-top: 20px;
  }

  .List-row-avatar {
    align-items: flex-start;
  }
}

.List-row-icon-right {
  margin-left: auto;

  & > * {
    float: right;
  }
}

.List-row-avatar {
  height: 56px;
  display: flex;
  align-items: center;
  > * {
    border-radius: 100%;
    width: 40px;
 }
}

