/*
 * Copyright (c) 2022 @automata-network/wallet-sdk authors and contributors.
 * This software may be modified and distributed under the terms of UNLICENSED
 * license. Refer to the LICENSE file for details.
 */
.react-responsive-modal-root.@{selector-prefix}modalRoot {
  .react-responsive-modal-overlay {
    animation-fill-mode: forwards !important;
    backdrop-filter: blur(.pxToPcVw(16) []);
    background-color: rgba(0, 0, 0, 0.33);
  }

  .react-responsive-modal-modal.@{selector-prefix}modal {
    box-shadow: 0 .pxToPcVw(4) [] .pxToPcVw(20) [] rgba(0, 0, 0, 0.1);
    background-color: var(--wallet-modal-bg);
    border: solid .pxToPcVw(3) [] rgba(255, 255, 255, 0.1);
    border-radius: .pxToPcVw(50) [];
    max-width: auto;
    padding: 0;

    .react-responsive-modal-closeButton {
      width: .pxToPcVw(29) [];
      height: .pxToPcVw(29) [];
      top: .pxToPcVw(40) [];
      right: .pxToPcVw(40) [];

      .@{selector-prefix}closeIcon {
        fill: #9c9c9c;
        width: 100%;
        height: 100%;
      }
    }

    .@{selector-prefix}modalWrap {
      display: flex;
      flex-direction: column;
      max-width: 80vw;
      max-height: 80vh;
      padding: .pxToPcVw(40) [];
      color: var(--wallet-text);
    }

    .@{selector-prefix}modalTitle {
      flex-shrink: 0;
      margin-bottom: .pxToPcVw(36) [];
      font-size: .pxToPcVw(25) [];
      font-weight: 500;
      line-height: calc(29 / 25 * 1em);
    }

    .@{selector-prefix}modalContent {
      flex-grow: 1;
      overflow-x: hidden;
      overflow-y: auto;
      padding-top: .pxToPcVw(36) [];
      width: 100%;
      border-top: .pxToPcVw(2) [] solid rgba(255, 255, 255, 0.2);
    }
  }
}

@media (max-width: @media-query-max-width) {
  .react-responsive-modal-root.@{selector-prefix}modalRoot {
    .react-responsive-modal-overlay {
      backdrop-filter: blur(.pxToMobileVw(12) []);
    }

    .react-responsive-modal-modal.@{selector-prefix}modal {
      box-shadow: 0 .pxToMobileVw(4) [] .pxToMobileVw(20) [] rgba(0, 0, 0, 0.1);
      border: solid .pxToMobileVw(3) [] rgba(255, 255, 255, 0.1);
      border-radius: .pxToMobileVw(16) [];

      .react-responsive-modal-closeButton {
        width: .pxToMobileVw(29) [];
        height: .pxToMobileVw(29) [];
        top: .pxToMobileVw(40) [];
        right: .pxToMobileVw(40) [];
      }

      .@{selector-prefix}modalWrap {
        padding: .pxToMobileVw(40) [];
      }

      .@{selector-prefix}modalTitle {
        margin-bottom: .pxToMobileVw(36) [];
        font-size: .pxToMobileVw(25) [];
      }

      .@{selector-prefix}modalContent {
        padding-top: .pxToMobileVw(36) [];
        border-top: .pxToMobileVw(2) [] solid rgba(255, 255, 255, 0.2);
      }
    }
  }
}
