@use '../../../style/variables.scss';

.modalWrapper {
  position: relative;
  margin: auto auto;
}

.loadingSpinner {
  display: flex;
  margin: auto;

  .spinner {
    animation: spin 2s linear infinite;
  }

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

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

.contentWrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 500px;
  row-gap: 28px;
  padding: 0px 14px 0px 4px;

  .title {
    position: absolute;
    top: 22px;
    left: 40px;
    font-size: 24px !important;
  }

  .content {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
    margin-top: 8px;
    width: 100%;

    .authSection,
    .publicProfileSection,
    .subscriptionSection {
      display: flex;
      flex-direction: column;
      width: 100%;
      gap: 8px;
    }

    .sectionTitle {
      font-size: 16px !important;
      font-weight: 600;
      text-transform: uppercase;
      color: variables.$lightgray-200;
      letter-spacing: 0.5px;
      margin: 0;
    }

    .authInfo {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;

      .profile {
        display: flex;
        column-gap: 16px;

        img {
          width: 100px;
          height: 100px;
          border-radius: 78px;
        }

        .credentials {
          display: flex;
          flex-direction: column;
          row-gap: 12px;
          justify-content: center;

          .name {
            font-size: 20px;
            font-weight: 400;
          }

          .email {
            font-size: 20px;
            font-weight: 400;
            color: variables.$lightgray-200;
          }
        }
      }

      .logOut {
        border-radius: 18px;
        background: none;
        color: variables.$purple !important;
        border: 1px solid variables.$purple !important;
      }
    }

    .divider {
      margin: 8px 0 4px 0;
      border-top: 1px solid rgb(92, 92, 92) !important;
    }

    .usernameSection {
      .loadingUsername {
        display: flex;
        align-items: center;
        gap: 8px;
        color: variables.$lightgray-200;

        .spinner {
          width: 20px;
          height: 20px;
          animation: spin 1s linear infinite;
        }
      }
    }

    .tokenUsage {
      display: flex;
      flex-direction: column;
      row-gap: 8px;

      & > p {
        display: flex;
        align-items: center;
        column-gap: 8px;
        font-size: 18px !important;
        margin: 0;
      }

      .tokenDescription {
        font-size: 14px !important;
        font-style: italic;
        color: variables.$lightgray-200;
        margin: 0;
      }
    }

    .manageBillingCard {
      display: flex;
      flex-direction: column;
      row-gap: 16px;

      & > p {
        display: flex;
        align-items: center;
        column-gap: 8px;
        font-size: 18px !important;
      }

      .manageSubscription {
        padding: 0 !important;
      }
    }

    .subscribeCard {
      display: flex;
      flex-direction: column;
      row-gap: 16px;

      background-color: #8965ef;
      border-radius: 8px;
      padding: 12px 16px;
      max-width: 456px;

      > span {
        font-weight: 400;
        font-size: 14px;
      }

      .about {
        display: flex;
        flex-direction: column;

        .cardTitle {
          font-weight: 600;
          font-size: 16px;
          margin: 0;
        }

        & > span {
          font-weight: 400;
          font-size: 14px;
        }
      }

      .controlButtons {
        display: flex;
        column-gap: 24px;
      }
    }
  }
}
