@import '../../_global/styles/mixins';
@import '../../_global/styles/vars';

.infobanner {
  margin: var(--section-margin) auto;

  .banner {
    position: relative;
    display: flex;
    color: var(--theme-color-white);
    background: linear-gradient(130deg, var(--theme-color-gradient-01) 40%,var(--theme-color-gradient-02) 80%,var(--theme-color-gradient-03) 120%);
    border-radius: var(--border-radius-xs);
    text-decoration: none;
    transition: 0.25s ease;
    @include focus-visible;

    &.focus-visible:focus .btn {
      @include focus-standalone;
    }
    &:focus-visible .btn, &-moz-focusring .btn {
      @include focus-standalone;
    }

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

      @media(max-width: 567px) {
        padding-top: 66.6667%;
      }
    }
  }

  .is-commercial {
    position: absolute;
    display: block;
    z-index: 1;
    right: 0;
    top: 0;
    padding: 1px 7px;
    font-size: var(--font-size-xs);
    color: var(--theme-color-primary);
    background-color: rgba(#fff, 0.7);
    border-bottom-left-radius: var(--border-radius-xs);
  }

  .image-box {
    @include full-size;
    background-size: cover;
    background-position: center;

    img {
      position: relative;
      display: block;
      max-width: 100%;
      margin: 0 auto;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .text-wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex: 1 1 100%;
    background: linear-gradient(120deg, rgba(var(--theme-color-primary-rgb), 1) 0%, rgba(var(--theme-color-primary-rgb), 0.2) 100%);

    @media(max-width: 567px) {
      flex-direction: column;
    }
  }

  .text-box {
    padding: 18px 24px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.4;

    @media(max-width: 1339px) {
      min-height: 150px;
    }
    @media(max-width: 999px) {
      min-height: 0;
      padding: 12px 20px;
    }
    @media(max-width: 567px) {
      padding: 8px 0;
      margin: var(--content-box-padding);
    }

    > * {
      margin-top: 0.1em;
      margin-bottom: 0.1em;

      &.kicker {
        margin-left: 0;
      }
    }

    > .like-h2 {
      @media(max-width: 567px) {
        margin-top: 8px;
        margin-bottom: 10px;
      }
    }
  }

  .button-box {
    padding: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin-top: auto;

    @media(max-width: 999px) {
      padding: 16px;
    }
    @media(max-width: 767px) {
      padding: 0 0 20px;
      margin: 0 var(--content-box-padding);
    }
    @media(max-width: 567px) {
      padding-bottom: 30px;
    }
  }

  .btn {
    @media(min-width: 768px) {
      white-space: nowrap;
    }
  }
}