@import '../../partials/variables';
@import '../../lib/functions';

.posts {
  height: calc(100vh - map-deep-get($nav, height));
  overflow-y: scroll;
  padding: 0 0 0 10px;

  @media (max-width: $mobile-breakpoint) {
    height: calc(100vh - map-deep-get($nav, mobile, height));
    padding: 0;
  }

  &__list {
    display: flex;
    flex-direction: column;

    width: 100%;
    padding: 0;

    list-style: none;

    @media (max-width: $mobile-breakpoint) {
      width: initial;
    }
  }

  &__item {
    display: flex;
    flex-direction: column-reverse;

    padding: 10px;

    max-width: max-content;

    @media (max-width: $mobile-breakpoint) {
      max-width: 100vw;
    }

    &:first-child {
      padding: 0 10px 10px 10px;
    }

    & .badge {
      background-color: var(--background-color-secondary);

      @media (max-width: $mobile-breakpoint){
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }

    &:last-child {
      border-bottom: 0;
    }
  }

  &__header {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: map-deep-get($post, header-font-size);

    &--read {
      text-decoration: line-through;
    }

    &:hover {
      cursor: pointer;
    }
  }
}
