@import (less) '../values';

:root {
  --small-visual-height-ratio: 2/3;
}

.container-stacked {
  margin: 0 auto;
  white-space: nowrap;
  padding-bottom: calc(@xl*2/3);

  @media @tablet {
    padding-bottom: calc(100vw * (2/3));
  }
}

.container-fullscreen {
  margin: 0 auto;
  white-space: nowrap;
  padding-bottom: 0;

  @media @tablet {
    padding-bottom: calc(100vw * (2/3));
  }
}

.container-side-by-side {
  padding-bottom: calc(50vw*2/3);
  width: 50%;
  height: 100%;

  @media (max-width: @lg) {
    margin: 0 auto;
    width: auto;
    white-space: nowrap;
    padding-bottom: calc(100vw * (2/3));
  }
}

.container-small-visual {
  width: 150px;
  height: calc(150px*var(--small-visual-height-ratio))
}

.image-wrapper-stacked {
  position: absolute;
  width: 100%;
}

.image-wrapper-fullscreen {
  position: absolute;
  width: 100%;

  @media @mobile {
    margin: 0;
    padding: 0;
    height: auto;
  }
}

.image-wrapper-side-by-side {
  position: absolute;
  width: calc(50vw);
  height: calc(50vw*2/3);

  @media (max-width: @lg) {
    width: 100%;
    height: calc(100vw*2/3);
  }
}

.image-wrapper-small-visual {
  position: absolute;
  width: 150px;
  right: 0;
  left: 0;
  bottom: 0;
  margin: auto;
}

.image-wrapper-side-by-side-portrait {
  position: absolute;
  width: calc(90vh*2/3);
  height: calc(90vh);
  min-height: calc(600px + 32px);

  @media (max-width: @lg) {
    height: calc(90vh);
    min-height: unset;
  }

  @media @mobile {
    width: 90vw;
    height: calc(90vw*3/2);
  }
}

.side-by-side-portrait-margin-left {
  margin-left: clamp(0px, calc(50vw - 32px - 90vh * 2/3), calc(600px - 90vh * 2/3))
}

/* enter animation */
.fade-enter {
  opacity: 0;

  /* allows the image to show if animations are turned off in settings */
  @media (prefers-reduced-motion: reduce) {
    opacity: 1;
  }
}

.fade-enter.fade-enter-active {
  opacity: 1;
  transition: opacity 1500ms linear;
}

/* exit animation */
.fade-exit {
  opacity: 1;
}

.fade-exit.fade-exit-active {
  opacity: 0;
  transition: opacity 2000ms linear;

  @media (prefers-reduced-motion: reduce) {
    opacity: 1;
  }
}

.fade-exit-done {
  opacity: 0;
}