// this is attached to the featured paragraph *Section*
// I have added the featured paragraph *items* styles here too
// so I can ensure the *items* rules are loaded in the Admin preview view mode

.field--name-field-featured-items {

  .field--label {
    width: 100%;
  }

  @media(min-width: 600px) {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;

    .paragraph--section & {
      margin: 0;
    }

  }

  .teaser--tile {

    @media(min-width: 600px) {
      flex: 0 0 49%;
      max-width: 49%;
      margin-left: 2%;

      &:nth-child(2n+1) {
        margin-left: 0;
      }

    }

    @media(min-width: 900px) {
      flex: 0 0 32%;
      max-width: 32%;
      margin-left: 2%;

      &:nth-child(2n+1) {
        margin-left: 2%;
      }

      &:nth-child(3n+1) {
        margin-left: 0;
      }
    }

  }

}

.teaser.teaser--tile {
  flex-direction: column;
  height: auto;

  // IE11 hack
  @media screen\0 {
    min-height: 320px;
  }

  .teaser__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .teaser__title {
    max-height: 63px;
    min-height: auto;
    font-size: 1rem;
    line-height: 1.625rem;
    margin-bottom: 1rem;
    padding-right: 0;
    color: #343434;
    font-weight: 400;
  }

  .teaser__image {
    position: relative;
    flex: 0 0 auto;
    height: auto;
    display: block;
    background: transparent;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;

    .img_wrapper {
      display: block;
      height: 0;
      padding-bottom: 33.3%;
      border-radius: inherit;
    }

    .no-feature-image {
      border: 0 none;
      border-bottom: 2px solid #777;
      padding: 0;
      position: absolute;
      bottom: 0;
      left: 1rem;
      right: 1rem;
      margin: 0;
    }

    img {
      position: absolute;
      top: 0;
      left: 0;
      width: auto;
      border-radius: inherit;
    }

  }

  .teaser__content {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
  }

  .card__link {
    align-self: flex-end;
  }

  .teaser__image a {
    display: block;
    border-radius: inherit;
  }

  .teaser__teaser-type {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px 0 8px 0;
    left: 0;
  }

  &.no-image {
    .teaser__teaser-type {
      background-color: transparent;
    }
  }

  &.teaser-group {
    .group-access-permissions {

      [data-toggle='popover'] {
        display: inline-block;
        margin-top: -1px;
        vertical-align: middle;
        font-size: 0;

        svg {
          width: 14px;
          height: 14px;
          fill: #555;
        }

        .help-block {
          font-size: .75rem;
        }
      }
    }
  }
}

.teaser.teaser-profile {
  text-align: left;

  .teaser__image {
    flex: 0 0 65px;
    height: 65px;
    margin-bottom: 55px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: visible;

    .teaser__teaser-type {
      display: none;
    }

    img {
      width: 95px;
      height: 95px;
      top: 15px;
      left: 15px;
      margin-left: 0;
      border: 5px solid #fff;
      border-radius: 4px;
    }
  }

  .teaser__body {
    .teaser__content {
      padding-top: 10px;
    }
  }

  .teaser__content-text {
    text-overflow: inherit;
    overflow-x: visible;
    white-space: normal;

    > span {
      display: block;
    }
  }
}
