@use autoprefixer;

// This file adopted from tingle.js package (v0.11.0) (dist/tingle.css file)

.opinionstage-content-popup {
  &.tingle-modal {
    * {
      box-sizing: border-box;
    }

    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 159900; // same z-index uses WP media modal popup
    display: flex;
    visibility: hidden;
    flex-direction: column;
    align-items: center;
    overflow: auto;
    background: rgba(0, 0, 0, .8);
    opacity: 0;
    cursor: pointer;
    transition: transform .2s ease;
  }

  // modal
  .tingle-modal-box {
    position: relative;
    flex-shrink: 0;
    margin-top: auto;
    margin-bottom: auto;
    background: #fff;
    opacity: 1;
    cursor: auto;
    transition: transform .3s cubic-bezier(.175, .885, .32, 1.275);
    transform: scale(.8);
    @media only screen and (max-width: 875px) {
      min-width: 100%;
      overflow: hidden;
      width: 100%;
    }
    &__content {
      max-width: 960px;
      padding: 0;
      .content-actions__right {
        .dropdown {
          display: none !important;
        }
      }
    }
  }

  // state
  &.tingle-modal--visible {
    visibility: visible;
    opacity: 1;

    .tingle-modal-box {
      transform: scale(1);
    }
  }

  // responsive
  @media (max-width : 540px) {
    .tingle-modal-box {
      width: auto;
    }

    &.tingle-modal {
      top: 60px;
      display: block;
      width: 100%;
    }

    &.tingle-modal--overflow {
      padding: 0;
    }
  }
}

// attached to body tag
.tingle-enabled {
  overflow: hidden;
  height: 100%;

  .tingle-content-wrapper {
    filter: blur(15px);
  }
}
