@use '../../_global/styles/mixins' as *;
@use '../../_global/styles/vars' as *;

.document-list {
  position: relative;
  display: block;
  margin: calc(1vw + 20px) 0 calc(1.5vw + 40px);
}

.document-list-item {
  position: relative;
  display: block;
  text-decoration: none;
  font-size: var(--font-size-small);
  border: 1px solid var(--color-surface-inset);
  padding: 15px;
  border-radius: 4px;
  @include focus-visible;
  transition: 0.3s ease;

  &:hover {
    text-decoration: none;
    color: var(--color-text-accent);
  }

  + .document-list-item {
    margin-top: 10px;
  }

  @media(min-width: 568px) {
    align-items: flex-start;
    display: flex;

    + .document-list-item {
      margin-top: 15px;
    }
  }

  &:before {
    position: absolute;
    top: 0;
    right: 0;
    margin: 10px;
    font-size: var(--icon-size-small);
    line-height: 1;
    font-family: 'Icons', sans-serif;
  }

  .image-box {
    position: relative;
    max-width: 210px;
    flex: 1 1 25%;

    @media(max-width: 567px) {
      flex: 1 1 75%;
      max-width: 70%;
    }

    &:before {
      content: "";
      position: relative;
      display: block;
      padding-top: 66.66667%;
    }

    &.chart {
      container-type: inline-size;
      &::before {
        @include gradient;
      }
    }

    img {
      position: absolute;
      display: block;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: 0.3s ease;
      opacity: 1;

      &.loading {
        opacity: 0;
      }
    }

    .chart-title {
      font-family: "Korb", sans-serif;
      font-weight: 700;
      font-size: 32px;
      color: var(--color-button-primary-text);
      position: absolute;
      left: 0;
      right: 0;
      top: 50%;
      transform: translate(0, -50%);
      text-align: center;
    }

    .copyright {
      @include copyright;
    }
  }

  .text-box:not(:first-child) {
    padding-top: 20px;
  }

  @media(min-width: 568px) {
    .text-box {
      padding: 2px 0 0;
    }

    .text-box:not(:first-child) {
      max-width: 75%;
      padding: 0 0 0 16px;
    }
  }

  h6, .like-h6 {
    font-size: 18px;
    margin-top: 4px;
    text-decoration: underline;

    @media(min-width: 768px) {
      font-size: 22px;
    }
  }

  h5, .like-h5, .details {
    font-weight: 600;
  }

  p {
    margin-bottom: 12px;
  }

  .details {
    margin: 0;
  }

  .kicker {
    margin-top: -4px;
  }
  .teaser--link {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
  }
}
