/*
  @file Theming the teaser view mode, and lists that render teasers.
*/

.lgd-teaser__image img {
  width: 100%;
}

.lgd-teaser__content + .lgd-teaser__image {
  margin-block-start: var(--spacing);
}

@media screen and (min-width: 48rem) {
  .lgd-teaser {
    display: flex;
  }

  .lgd-teaser__image {
    flex-shrink: 0;
    width: var(--teaser-image-with);
  }

  .lgd-teaser__image + .lgd-teaser__content {
    margin-inline-start: 1rem;
  }

  .lgd-teaser__content + .lgd-teaser__image {
    margin-block-start: 0;
    margin-inline-start: auto;
    padding-inline-start: 1rem;
  }

  /*
    This featured news section should really be its own (card) view mode.
    We shouldn't need overrides like this in our theme.
  */
  .newsroom__featured-news .lgd-teaser {
    display: block;
    height: var(--teaser-featured-height);
    border: var(--teaser-featured-border);
    border-color: var(--teaser-featured-border-color);
  }
  .newsroom__featured-news .lgd-teaser__image {
    width: 100%;
  }
  .newsroom__featured-news .lgd-teaser__content {
    padding: var(--teaser-featured-content-padding);
  }
  .newsroom__featured-news .lgd-teaser__image + .lgd-teaser__content {
    margin-inline-start: 0;
  }
}

/*
  .lgd-teaser-list is a class that we can use as a container when we
  render teasers, for example:
    - services list on services landing page
    - news listing page
    - events listing page
*/
.lgd-teaser-list .views-row,
.lgd-teaser-list .service-landing-page__service,
.lgd-teaser-list .lgd-topic-list-builder__service,
.news-article .field--name-localgov-news-related > .field__item {
  margin-block-end: var(--vertical-rhythm-spacing);
  padding-block-end: var(--vertical-rhythm-spacing);
  border-block-end: var(--border);
}

.lgd-teaser-list--grid .view-content,
.lgd-teaser-list--grid .lgd-teaser-list__content {
  display: flex;
}
