.matrix-wishlist-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999989;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  font-size: 14px;
  visibility: hidden;
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
  box-sizing: border-box;

  * {
    box-sizing: border-box;
  }

  table {
    margin: 0;
  }

  .matrix-wishlist-popup-body {
    &:before {
      content: '';
      width: 100%;
      height: 100%;
      display: block;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 7;
      background-color: rgba(255, 255, 255, 0.7);
      opacity: 0;
      visibility: hidden;
    }

    &:after {
      width: 32px;
      height: 32px;
      display: block;
      margin-top: -16px;
      margin-left: -16px;
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      z-index: 8;
      -webkit-animation: matrix-wishlist-spinner 1s linear infinite;
      -moz-animation: matrix-wishlist-spinner 1s linear infinite;
      -ms-animation: matrix-wishlist-spinner 1s linear infinite;
      -o-animation: matrix-wishlist-spinner 1s linear infinite;
      animation: matrix-wishlist-spinner 1s linear infinite;
      opacity: 0;
      visibility: hidden;
    }
  }

  .matrix-wishlist-popup-inner {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;

    .matrix-wishlist-popup-content {
      width: 90%;
      max-width: 500px;
      height: auto;
      max-height: 90%;
      position: absolute;
      top: 40%;
      left: 50%;
      transform: translate3d(-50%, -50%, 0);
      -webkit-transform: translate3d(-50%, -50%, 0);
      padding: 0;
      display: flex;
      flex-direction: column;
      -webkit-transition: all 0.5s;
      -moz-transition: all 0.5s;
      -ms-transition: all 0.5s;
      -o-transition: all 0.5s;
      transition: all 0.5s;
      border-radius: 4px;
      overflow: hidden;

      > div {
        align-self: stretch;
      }

      .matrix-wishlist-popup-header {
        flex: 0 0 auto;
        height: 48px;
        line-height: 48px;
        padding: 0 60px 0 20px;
        margin: 0;
        position: relative;
        color: #fff;
        font-weight: 700;
        background-color: #1877f2;

        .matrix-wishlist-manage {
          color: #fff;
          margin-left: 5px;
          font-weight: 400;
          text-decoration: underline;
          cursor: pointer;
        }

        .matrix-wishlist-empty {
          color: #fff;
          margin-left: 5px;
          font-weight: 400;
          text-decoration: underline;
          cursor: pointer;
        }

        .matrix-wishlist-popup-close {
          display: inline-block;
          height: 48px;
          line-height: 48px;
          position: absolute;
          top: 0;
          right: 0;
          cursor: pointer;
          text-transform: none;
          color: #fff;

          &:before {
            display: inline-block;
            float: right;
            width: 48px;
            height: 48px;
            line-height: 48px;
            text-align: center;
            font-size: 20px;
            speak: none;
            font-style: normal;
            font-variant: normal;
            text-transform: none;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
          }
        }
      }

      .matrix-wishlist-popup-body {
        display: block;
        position: relative;
        min-height: 80px;
        flex: 1 1 auto;
        padding: 0;
        margin: 0;
        background-color: #fff;
        overflow-x: hidden;
        overflow-y: auto;

        .matrix-wishlist-popup-body-massage {
          display: block;
          padding: 20px;
          height: 40px;
          line-height: 40px;
          text-align: center;
        }

        .matrix-wishlist-popup-body-message {
          display: block;
          padding: 20px 40px 40px 40px;
          font-size: 20px;
          text-align: center;

          img {
            display: block;
            width: 60%;
            height: auto;
            margin: 0 auto;
            opacity: .6;
          }
        }

        table.matrix-wishlist-items-table {
          margin: 0;
          padding: 0;

          tr {
            border-bottom: 1px solid #eee;
            background: #fff;

            td {
              vertical-align: middle;
              padding: 10px;
              background: #fff;

              &:first-child {
                padding-left: 20px;
              }

              &:last-child {
                padding-right: 20px;
              }
            }

            &:nth-child(2n) {
              td {

              }
            }

            &:hover {
              td {

              }
            }
          }

          .matrix-wishlist-item {
            .matrix-wishlist-item--remove {
              vertical-align: middle;
              width: 16px;

              span {
                display: inline-block;
                width: 16px;
                height: 16px;
                line-height: 16px;
                text-align: center;
                cursor: pointer;

                &:before {
                  display: inline-block;
                  font-size: 16px;
                  speak: none;
                  font-style: normal;
                  font-variant: normal;
                  text-transform: none;
                  -webkit-font-smoothing: antialiased;
                  -moz-osx-font-smoothing: grayscale;
                }

                &:hover {
                  &:before {
                    color: #cc6055;
                  }
                }
              }

              span.matrix-wishlist-removing {
                &:before {
                  animation: matrix-wishlist-spinner 1s linear infinite;
                  -webkit-animation: matrix-wishlist-spinner 1s linear infinite;
                }
              }
            }

            .matrix-wishlist-item--image {
              width: 100px;

              img {
                width: 80px;
                height: auto;
                border-radius: 2px;
                border: none;
                padding: 0;
                margin: 0;
                box-shadow: none;
              }
            }

            .matrix-wishlist-item--name {
              font-weight: 700;

              a {
                font-weight: 700;
              }
            }

            .matrix-wishlist-item--add {
              p {
                border: none;
                padding: 0;
                margin: 0;
              }

              .add_to_cart_inline {
                border: none;
                padding: 0;
                margin: 0;
              }
            }
          }
        }
      }

      .matrix-wishlist-popup-footer {
        flex: 0 0 auto;
        height: 48px;
        line-height: 48px;
        padding: 0 20px;
        position: relative;
        color: #fff;
        font-size: 14px;
        background-color: #1877f2;
        overflow: hidden;

        .matrix-wishlist-popup-footer-inner {
          display: flex;
          flex-wrap: wrap;
          flex-direction: row;
          justify-content: space-between;
          align-items: center;
          width: 100%;

          a {
            color: #fff;
            text-decoration: underline;
            outline: none;
            cursor: pointer;

            &:hover {
              color: #5fbd74;
            }
          }

          span {
            color: #fff;
            text-decoration: underline;
            outline: none;
            cursor: pointer;
          }
        }

        .matrix-wishlist-notice {
          display: block;
          text-align: center;
          width: 100%;
          height: 48px;
          line-height: 48px;
          padding: 0 20px;
          color: #fff;
          font-size: 14px;
          font-weight: 400;
          background-color: #5fbd74;
          position: absolute;
          top: 50px;
          left: 0;
          -webkit-transition: all 0.5s;
          -moz-transition: all 0.5s;
          -ms-transition: all 0.5s;
          -o-transition: all 0.5s;
          transition: all 0.5s;
        }

        .matrix-wishlist-notice.matrix-wishlist-notice-show {
          top: 0;
        }
      }
    }
  }
}

.matrix-wishlist-popup.matrix-wishlist-loading {
  .matrix-wishlist-popup-content {
    pointer-events: none;
  }

  .matrix-wishlist-popup-body {
    &:before {
      opacity: 1;
      visibility: visible;
    }

    &:after {
      opacity: 1;
      visibility: visible;
    }
  }
}

#matrix_wishlist_manage {
  .matrix-wishlist-popup-inner {
    .matrix-wishlist-popup-content {
      top: 60%;
    }
  }

  .matrix-wishlist-popup-body {
    padding: 10px 0;
  }
}

.matrix-wishlist-popup.matrix-wishlist-show {
  opacity: 1;
  visibility: visible;

  .matrix-wishlist-popup-inner {
    .matrix-wishlist-popup-content {
      top: 50% !important;
    }
  }
}

.matrix-wishlist-popup.matrix-wishlist-message {
  .matrix-wishlist-popup-inner {
    .matrix-wishlist-popup-content {
      background-color: #ffffff;
    }
  }

  .matrix-wishlist-popup-body-message {
    display: block;
    padding: 20px 40px 40px 40px;
    font-size: 20px;
    text-align: center;

    img {
      display: block;
      width: 60%;
      height: auto;
      margin: 0 auto;
      opacity: .6;
    }
  }
}
