@import "../../../src/scss/init";

:root {
  --embed-width: 50%;
  --embed-offset: 0;
  --content-offset: 7vw;
}

.d-p-side-embed {
  $root: &;

  --media-width: 100%;
  --media-height: 100%;
  --cta-links-alignment: left;

  position: relative;
  overflow: hidden;

  &--embed-right {
    --embed-offset: 50%;
  }

  &--embed-full {
    --embed-width: 100%;
    --embed-offset: 0;
  }

  &__embed {
    position: relative;
    width: 100%;
    min-height: 18rem;

    @include media-breakpoint-up(md) {
      position: absolute;
      left: var(--embed-offset);
      width: var(--embed-width);
      height: 100%;
    }

    iframe {
      position: absolute;
      width: 100%;
      height: 100%;
    }
  }

  &__content-column {
    position: relative;
    z-index: 1;
    background: var(--section-background-color);

    #{$root}--embed-left & {
      padding-left: var(--content-offset);
    }

    #{$root}--embed-right &, #{$root}--embed-full & {
      padding-right: var(--content-offset);
    }

    #{$root}--embed-full & {
      @include media-breakpoint-up(md) {
        padding-block: var(--content-spacer-l);

        &::before {
          content: "";
          position: absolute;
          top: 0;
          right: 0;
          width: 50vw;
          height: 100%;
          z-index: -1;
          background: inherit;
        }
      }
    }
  }

  .cta-links,
  .heading {
    margin-top: var(--content-spacer-m);
  }
}
