@use '../../global/scss/tools' as nsw;

.nsw-list-item {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  padding: nsw.rem(24px) 0;
  border-bottom: 1px solid var(--nsw-grey-04);

  &:first-child {
    border-top: 1px solid var(--nsw-grey-04);
  }

  &__title {
    font-weight: var(--nsw-font-bold);
    
    @include nsw.font-size('md');
  }

  &__content {
    width: 100%;
  }

  &__label,
  &__info,
  &__title,
  &__copy,
  &__tags {
    margin-top: nsw.rem(8px);

    &:first-child {
      margin: 0;
    }
  }

  &__label,
  &__info {
    @include nsw.font-size('xs');
  }

  &__label {
    font-weight: var(--nsw-font-bold);
  }

  &__image {
    min-width: nsw.rem(250px);
    width: nsw.rem(250px);
    margin: 0 0 0 nsw.rem(24px);
    display: none;

    @include nsw.breakpoint('lg') {
      display: block;
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;      
    }
  }

  &--block {
    &:focus-within {
      @include nsw.nsw-focus($offset: false);

      .nsw-section--invert & {   
        @include nsw.nsw-focus($color: var(--nsw-focus-light));
      }
    }

    .nsw-list-item__title a {
      @include nsw.pseudo-clickable-block;

      &:focus {
        outline: none;
      }
    }
  }

  &--reversed {
    flex-direction: row-reverse;

    .nsw-list-item__image {
      margin: 0 nsw.rem(24px) 0 0;
    }
  }
}
