@use "_theme.scss";

.modal {
  &.thumbnails-preview {
    @media (max-width: theme.$md) {
      background-color: var(--color-fill);
    }
    .modal-content {
      border: unset;
      border-radius: unset;
      width: 100vw;
      height: auto;
      position: relative;
      align-self: flex-end;
      margin: 0;
      animation: flyInFlyOut 1s;
      animation-fill-mode: forwards;

      @media (min-width: theme.$md) {
        width: calc(100vw - 120px);
        height: calc(100vh - 120px);
        background-color: var(--color-fill);
        margin: auto;
        align-self: normal;
      }
      @keyframes flyInFlyOut {
        0%   {
          transform: translateY(200%);
        }
        100% {
          transform: translateY(0%);
        }
      }
      .modal-body {
        display: flex;
        width: 100%;
        height: 100%;
        padding: 0;

        @media (max-width: theme.$lg) {
          max-height: 100vh;
          display: flex;
          flex-direction: column;
        }

        .mobile-preview-failure {
          position: absolute;
          top: calc(50% - 20px - 30px);
          left: calc(50% - 130px);
        }

        img {
          border: var(--image-border-width) solid var(--image-border-color);
        }
        .preview-arrows-left, .preview-arrows-right {
          position: absolute;
          top: 50%;
          opacity: 0;
          transition: all 0.3s ease;
          cursor: pointer;

          @media (max-width: theme.$lg) {
            display: none;
          }
        }

        .preview-arrows-right {
          right: 0;
        }

        &:hover {
          .preview-arrows-left, .preview-arrows-right {
            opacity: 1;
          }
        }
        .thumbnail-modal-image {
          position: relative;
          width: 100%;
          height: 100%;
          padding: 20px 60px;

          @media (max-width: theme.$md) {
            padding: 60px 20px 30px;
          }
        }

        .thumbnail-modal-image.mobile {
          position: relative;
          width: 65%;
          display: flex;
          flex-direction: column;
          background-color: var(--color-fill);;

          @media (max-width: theme.$lg) {
            width: 100%;
            height: 100svh;
            max-height: 100svh;
            min-height: 100svh;
            display: flex;
            flex-direction: column;
          }
          .image {
            text-align: center;
          }

          img {
            max-width: 100%;
            max-height: 70vh;
            height: auto;
            width: auto;
            margin: auto;
            margin-top: 0;
            border: var(--image-border-width) solid var(--image-border-color);

          }

          .preview-page-title {
            margin: 5px auto 6px;
            color: var(--text-color-dark);
            font-size: var(--text-size-regular);
          }
          .dot-carousel-wrapper {
            height: 8px;
          }
          .image-wrapper {
            padding: 0;
            background-color: inherit;
          }

          .preview-wrapper.single-static {
            height: calc(100% - 40px);

            .carousel-root {
              height: 100%;
            }
            .preview-area-wrapper {
              height: 100%;
            }
          }
        }
      }
    }

    .modal-dialog {
      margin: 0;
      width: 100%;
      height: 100%;
      display: flex;
      max-width: unset;
    }

    .modal-close {
      width: 20px;
      height: 20px;
      z-index: 2;
      position: absolute;
      font-size: 40px;
      line-height: 20px;
      right: 20px;
      top: 20px;
      cursor: pointer;
      font-weight: normal;
      color: #000000;
    }
  }
}
