@use "../ui/styles/media-queries" as *;

@import url('https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@100;900&display=swap');

.defly-wallet-modal {
  --defly-wallet-modal-font-family: "Spline Sans", sans-serif;
  --defly-wallet-connect-modal-headline-family: "Hanken Grotesk", sans-serif;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 999999;

  width: 100vw;
  height: 100vh;

  background-color: rgba(0, 0, 0, 0.7);

  &--select-account {
    .defly-wallet-modal__body {
      width: 480px;
      height: 578px;

    }
  }

  &--mobile {
    .defly-wallet-modal__body {
      top: 40px;
      bottom: 0;
      left: 20px;

      width: calc(100% - 40px);
      max-width: unset;
      height: calc(100 * var(--defly-wallet-vh));

      padding: 20px;

      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);

      border-radius: 20px 20px 0px 0px;

      animation: 0.3s DeflyWalletConnectMobileSlideIn ease-out;

      overflow-y: auto;

      transform: unset;

      &::before {
        background-image: unset;
      }
    }
  }

  * {
    box-sizing: border-box;

    margin: 0;
    padding: 0;

    font-family: var(--defly-wallet-modal-font-family);

    // Although this is not a standard, Design team suggest that we use it so supported browsers will use it
    // stylelint-disable-next-line property-no-unknown
    font-smooth: antialiased;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  ul,
  ol,
  li {
    list-style-type: none;
  }
}

.defly-wallet-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 48px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  outline: none;
  cursor: pointer;
  font-family: var(--defly-wallet-modal-font-family);
  font-size: 14px;
}

.defly-wallet-modal__logo img {
  display: block;

  width: 32px;
}

.defly-wallet-modal__body {
  position: relative;
  top: 50%;
  left: 50%;
  width: 979px;
  max-width: calc(100vw - 80px);
  padding: 28px;
  background-color: #131313;
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.08);
  border-radius: 40px;
  animation: 0.3s DeflyWalletConnectSlideIn ease-out;
  transform: translate(-50%, -50%);

}

@include for-small-screens {
  .defly-wallet-modal--desktop {
    .defly-wallet-modal__body {
      width: 100%;
      max-width: calc(100vw - 32px);
      padding: 24px;
    }
  }
}

@keyframes DeflyWalletConnectSlideIn {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 24px));
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes DeflyWalletConnectMobileSlideIn {
  0% {
    top: 30%;
    opacity: 0;
  }

  100% {
    top: 40px;
    opacity: 1;
  }
}
