@import "styles/_variables";
@import "styles/mixins";

.list a {
  text-decoration: none;
  cursor: pointer;
}

.item {
  display: grid;
  grid-template-rows: 24px auto; // 100px 200px auto;
  grid-gap: 10px;
  padding: 19px 15px;
  margin-bottom: 10px;
  text-align: left;
  background: var(--background-card);
  border-radius: 10px;
  box-shadow: 0 0 1px var(--shadow-4), 0 0 2px var(--shadow-5);
  transition: box-shadow 0.1s linear;

  &:hover {
    box-shadow: 0 1px 6px -3px var(--shadow-2);
  }

  .date {
    padding-right: 5px;
  }

  &.inactive {
    grid-template-rows: 24px;
    grid-gap: 0;

    .detail {
      display: none;
    }
  }
}

.title {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  grid-gap: 15px;
  color: var(--color-item);

  span {
    max-width: 100%;
    overflow: hidden;
    font-size: 15px;
    font-weight: 400;
    color: var(--color-text);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.detail {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  grid-gap: 15px;

  &.inactive {
    display: none;
  }

  & > div {
    display: flex;
    align-items: center;
    font-size: 13px;
    line-height: 26px;
    color: var(--color-item);
  }

  .date {
    justify-content: flex-end;
    font-size: 13px;
  }

  strong {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    margin-right: 8px;
    font-size: 13px;
    font-weight: 400;
    line-height: 26px;
    color: var(--color-heading);
    background: var(--background-light);
    border-radius: 8px;

    svg {
      width: 20px;
      height: 20px;
      margin-right: 4px;
      color: var(--color-summary);
    }
  }

  span {
    max-width: 600px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    @include sm-down {
      display: flex;
      margin: 10px 0;
      line-height: 1.3;
      white-space: normal;
    }
  }

  @include md-down {
    display: flex;
    flex-flow: column;
    grid-gap: unset;
    margin-left: 38px;

    .spacer {
      display: none;
    }

    .commit {
      display: flex;
      flex-flow: column;
      align-items: flex-start;

      strong {
        margin-bottom: 5px;
      }
    }

    .date {
      justify-content: flex-start;
    }
  }
}

// .commit {
//   padding-left: 50px;
// }
