@import '@common/styles/common.less';

.modalFundFlow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2147483647;
  .flex-center;

  transition: all 0.2s ease-in-out;
  transition-delay: 0.2s;
  display: none;

  &.show {
    display: flex;
  }

  .container {
    position: relative;
    width: 90%;
    min-width: 880px;
    height: 90%;
    border-radius: 2px;
    box-shadow: 0 12px 48px 16px rgba(0, 0, 0, 0.03),
      0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 6px 16px -8px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
    .flex-column;
    .md-flex;

    .header {
      justify-content: space-between;
      font-weight: 500;
      color: #000000;
      line-height: 17px;
      font-size: 14px;
      padding-left: 22px;
      border-bottom: 1px solid #f0f0f0;
      .items-center;
      .md-flex;

      .basicInfo {
        min-width: 300px;
        .items-center;
        .md-flex;

        .tokenLogo {
          width: 26px;
          height: 26px;
        }

        .mainAddress {
          flex: 1;
          margin: 0 10px 0 14px;
          .text-ellipsis;
        }
      }

      .msButton {
        .items-center;
        .md-flex;

        gap: 4px;
      }

      .downloadPopoverContainer {
        p {
          color: #000000;
          cursor: pointer;
          margin: 0;
        }
      }

      .watermarkSwitchContainer {
        margin: 0 21px 0 10px;
        font-size: 14px;
        color: rgba(0, 0, 0, 0.65);
        .items-center;
        .md-flex;

        label {
          margin: 0 0 0 5px;
        }
      }

      .btn {
        padding: 22px;
        cursor: pointer;
        .flex-center;

        img {
          width: 16px;
          height: 16px;
        }

        &.download {
          background: #f5f5f7;
          border-radius: 5px;
          padding: 8px;
        }
      }

      .tipContainer {
        position: relative;
        margin-right: 10px;
        .items-center;
        .md-flex;

        &:hover {
          .content {
            display: block;
          }
        }

        .iconImg {
          width: 14px;
          height: 14px;
        }

        .content {
          display: none;
          z-index: 9;
          position: absolute;
          width: 280px;
          background: #ffffff;
          padding: 13px;
          box-shadow: 0 9px 28px 8px rgba(0, 0, 0, 0.05),
            0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12);
          top: 100%;
          transform: translateX(-50%) translateY(8px);
          font-size: 14px;
          color: rgba(0, 0, 0, 0.65);
          line-height: 22px;

          &::after {
            content: '';
            position: absolute;
            width: 0;
            height: 0;
            border: 8px solid;
            border-color: transparent transparent #ffffff;
            top: -8px;
            left: 50%;
            transform: translateY(-8px);
          }
        }
      }

      .selector {
        margin-right: 10px;

        svg {
          margin-bottom: 0;
        }

        :global {
          .ant-select-selector {
            border: none;
            background-color: #f5f5f7;

            .ant-select-selection-placeholder {
              color: #000000;
            }
          }

          .ant-select-arrow {
            color: #000000;
          }
        }
      }

      .dropdownWrapper {
        overflow: hidden;
        max-height: 400px;
        .flex-column;
        .md-flex;

        .input {
          margin: 0 10px;
          width: auto;
        }

        .addressList {
          padding: 0 10px;
          flex: 1;
          overflow: auto;

          p {
            margin-bottom: 16px;
            line-height: 22px;

            &:first-of-type {
              margin-top: 13px;
            }

            :global {
              span {
                font-size: 14px;
                color: rgba(0, 0, 0, 0.65);
              }
            }
          }
        }

        .dropdownFooter {
          padding: 7px 10px;
          box-shadow: 0 -4px 10px 0 rgba(0, 0, 0, 0.1);
          justify-content: space-between;
          .items-center;
          .md-flex;
        }
      }
    }

    .body {
      flex: 1;
      position: relative;
      overflow: hidden;
      padding: 15px;

      .watermark {
        display: block;
        position: absolute;
        right: 8px;
        bottom: 8px;
        width: 262px;
        height: 66px;
        cursor: pointer;

        img {
          width: 100%;
          height: 100%;
          opacity: 0.2;
        }
      }

      .graphContainer {
        width: 100%;
        height: 100%;
        overflow: hidden;
      }

      .loading {
        height: 100%;
        width: 100%;
        .flex-center;

        .iconMetaDock {
          width: 80px;
          height: 80px;
          animation-name: loading;
          animation-duration: 1s;
          animation-iteration-count: infinite;
        }
      }

      .errorBoundary {
        height: 100%;
        width: 100%;
        line-height: 17px;
        .flex-column;
        .md-flex;

        align-items: center;
        .flex-center;

        img {
          width: 33%;
          max-width: 388px;
        }

        p {
          font-size: 14px;
          color: #747478;
          margin: 32px 0 56px;
          max-width: 640px;
          text-align: center;
        }
      }
    }
  }
}

@keyframes loading {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
