@import './variables.css';

body,
html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: var(--m);
  font-weight: 300;
}

body {
  z-index: 0 !important;
  /* overflow: scroll !important; */
}

.inter {
  font-family: 'Inter', Helvetica, Arial, sans-serif;
}

.lightGray {
  color: var(--light-gray);
}

.background-v2 {
  background-color: var(--background-white);
}

/* welcome page */
.welcome {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .logo {
    width: 250px;
    height: auto;
    @media screen and (max-width: 300px) {
      width: 150px;
    }
  }

  .welcomeText {
    font-size: var(--xl);
    line-height: 24px;
    text-align: center;
    margin-bottom: 32px;
  }

  .qr-code {
    width: 180px !important;
    height: 180px !important;
    margin-bottom: 32px;
  }

  .qr-logout {
    margin-top: 16px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .generateQRCodeButtonLabel {
    background: #cee9d2;
    border-radius: 8px;
    font-size: var(--m);
    line-height: 22px;
    color: #33333c;
    padding: var(--s);
    position: absolute;
    bottom: 24px;
    animation-name: resultIcon;
    @include animationDefault;
    animation-duration: 1.5s;
  }
}

.with-icon {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.primary-new {
  padding: 0px 16px 0px 16px;
  border-radius: 4px;
  background-color: var(--brown);
  border: none;
  gap: 4px;
  color: var(--white);
  height: 40px;
  cursor: pointer;
  font-size: var(--m);
  width: 200px;

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  @media screen and (max-width: 350px) {
    padding: 0px 10px 0px 10px;
    width: 100px;
  }
}

.secondary {
  padding: 0px 16px 0px 16px;
  border-radius: 4px;
  background-color: transparent;
  border: 1px solid var(--brown);
  gap: 4px;
  color: var(--brown);
  height: 40px;
  cursor: pointer;
}

.textButton {
  border: none;
  background: none;
  font-size: var(--m);
  color: black;
  cursor: pointer;
  font-family: 'Inter', Helvetica, Arial, sans-serif;
}

/* info footer */
.infoFooter {
  position: absolute;
  bottom: 0px;
  height: 155px;
  width: 100%;
  background-color: var(--dark-blue);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 25px;
  font-size: var(--s);

  .leftSide {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 8px;
  }

  .rightSide {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 8px;
    justify-content: right;
    text-align: right;
    color: var(--light-text);
  }
}

/* legal footer */
.legalFooter {
  width: 100%;
  height: 80px;
  position: fixed;
  bottom: 0px;
  display: flex;
  z-index: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--dark-blue);
  color: var(--white);
  gap: 8px;
  text-align: center;
}

.heightWithFooter {
  height: calc(100vh - 155px);

  @media screen and (max-width: 900px) {
    padding-bottom: 200px !important;
  }
}
/* payment */
.contentWindow {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 50px 60px 50px 60px;
  overflow-y: scroll;
  align-items: center;
  overflow-x: hidden;

  @media (max-width: 576px) {
    padding: 24px;
  }

  .logoContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    .logo {
      width: 200px;
      height: auto;
    }
  }

  .client-register-button-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 40px;
  }

  .contentContainer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    height: auto;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;

    .sideBySide {
      width: calc(50% - 5px);
      min-width: 500px;
      @media screen and (max-width: 550px) {
        min-width: 400px;
      }
      @media screen and (max-width: 450px) {
        min-width: 300px;
      }
      @media screen and (max-width: 350px) {
        min-width: 200px;
      }
      @media screen and (max-width: 250px) {
        min-width: 150px;
      }
    }

    .legal {
      display: flex;
      flex-direction: column;
      justify-content: center;
      height: 100%;

      .legalContent {
        width: 750px;
        padding-left: 25px;
        padding-right: 25px;
        color: black;

        a {
          text-decoration: underline;
          text-underline-offset: 2px;
          color: var(--legal-text);
        }

        h1 {
          text-align: center;
          font-size: var(--xxl);
          font-weight: 400;
        }
        h2 {
          font-size: var(--xl);
          font-weight: 350;
        }
        h3 {
          font-size: var(--l);
          font-weight: 350;
        }
        p {
          display: block;
          box-sizing: border-box;
          font-size: var(--m);
          font-weight: 300;
          color: var(--legal-text);
        }
      }
      @media screen and (max-width: 850px) {
        .legalContent {
          width: 600px;
        }
      }
      @media screen and (max-width: 600px) {
        .legalContent {
          width: 500px;
        }
      }
      @media screen and (max-width: 500px) {
        .legalContent {
          width: 300px;
        }
      }
      @media screen and (max-width: 300px) {
        .legalContent {
          width: 200px;
        }
      }
    }
  }
}

.position-relative {
  position: relative;
}

.card {
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px;
  box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.12);
  border-radius: 4px;

  .header {
    font-size: var(--xxl);
    color: black;
    width: 100%;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-align: center;

    .heading {
      font-weight: 600;
    }

    .subheading {
      font-size: var(--m);
    }
  }

  .body {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    margin-bottom: 10px;

    .row {
      width: 100%;
      border-bottom: 1px solid var(--light-border);
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      padding-top: 15px;
      padding-bottom: 15px;
      gap: 20px;

      div:first-child:not(.items) {
        text-align: left;
      }

      div:last-child:not(.items) {
        text-align: right;
        word-break: break-all;
      }

      .items {
        width: 100%;
        display: flex;
        flex-direction: column;

        .item {
          width: 100%;
          display: flex;
          flex-direction: row;
          align-items: center;
          justify-content: space-between;
          margin-top: 5px;
          margin-bottom: 5px;
        }
      }
    }

    .card-title {
      font-size: var(--xxxl);
      color: black;
      text-align: center;
    }

    .infoText {
      font-size: var(--s);
      margin-top: 15px;
    }

    /* checkbox and its text */
    .disclaimer {
      display: flex;
      flex-direction: row;
      width: 100%;
      align-items: center;
      gap: 10px;
      margin-top: 15px;
      margin-bottom: 20px;
    }
    .termsLink {
      text-decoration: underline !important;
      text-underline-offset: 2px;
      color: black !important;
      cursor: pointer;
    }

    .checkBoxWrap {
      display: flex;
      align-items: center;

      .checkboxContainer {
        position: relative;
        width: 16px;
        height: 16px;
        cursor: pointer;
        font-size: var(--m);
        user-select: none;

        &:hover input ~ .customCheckBox {
          @media screen and(min-width: 900px) {
            opacity: 0.5;
          }
        }

        .newDesignCheckbox:checked ~ .customCheckBox {
          background-color: var(--brown);
          border: none;
        }

        input {
          position: absolute;
          opacity: 0;
          cursor: pointer;
        }

        .customCheckBox {
          position: absolute;
          top: 0;
          left: 0;
          height: 16px;
          width: 16px;
          border: solid 1px var(--brown);
          border-radius: 2px;
        }

        .customCheckBox:after {
          content: '';
          position: absolute;
          display: none;
        }

        input:checked ~ .customCheckBox:after {
          display: block;
        }

        .customCheckBox:after {
          left: 5px;
          top: 2px;
          width: 3px;
          height: 8px;
          border: solid white;
          border-width: 0 2px 2px 0;
          -webkit-transform: rotate(45deg);
          -ms-transform: rotate(45deg);
          transform: rotate(45deg);
        }
      }
    }

    /* payment status card */
    .paymentStatus {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      color: black;
      margin-bottom: 50px;

      .mainText {
        font-size: var(--xxl);
        font-weight: 350;
        margin-bottom: 10px;
        margin-top: 10px;
        text-align: center;
      }
    }
  }
}

.inputWrapper {
  margin-top: 10px;
  margin-bottom: 10px;
}
.emailInput {
  width: 100%;
  height: 40px;
  border: 1px solid var(--base-border);
  border-radius: 4px;
  color: black;
  font-size: var(--m);
  padding-left: 10px;

  &:focus-visible {
    outline: none;
  }
}

.cardLogos {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;

  .card-image {
    height: 30px;
    max-width: 80px;
    width: auto;
    border-radius: 4px;
  }
}

/* proceed to payment button wrapper */
.buttonWrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
}

.simplepay-container {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;

  .simplepay-logo {
    margin-top: 10px;
  }
}

.removeBorder {
  border: 0px !important;
}

.hidden {
  /* display: none; */
  visibility: hidden;
}

.link {
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  color: var(--white);
  .classLinkNew {
    color: var(--white);
    white-space: normal;
    word-break: break-word;
  }
}

.new-input-wrapper {
  width: 100%;
  max-width: 600px;
  position: relative;

  .input-new {
    font-size: 14px;
    height: 40px;
    width: 100%;
    color: black;
    padding-top: 10px;
  }

  .placeholder-new {
    color: gray;
    font-size: 14px;
    position: absolute;
    top: 13px;
    left: 5px;
    transition: 0.3s ease-in-out;
  }

  .input-new:focus {
    outline: none;
  }

  .input-new:not(:placeholder-shown) + .placeholder-new,
  .input-new:focus + .placeholder-new {
    top: 1px;
    font-size: 12px;
    transition: 0.3s ease-in-out;
  }

  .select-new {
    font-size: 14px;
    height: 40px;
    width: 100%;
    color: black;
    padding-top: 10px;
    display: block;
  }

  .dropdown-new {
    display: none;
  }

  .select-new:focus + .dropdown-new {
    width: 100%;
    max-height: 300px;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
  }
}

.new-form-section-title {
  font-size: 14px;
  color: black;
}

.new-form-container {
  margin: 0;
}

.new-design-v2 {
  .inputLabel {
    all: unset;
    display: none;
  }
  .inputComponent {
    all: unset;
  }
  .autocompleteComponent {
    all: unset;
  }
  .inputPlaceholder {
    all: unset;
    display: none;
  }
  .zero-prefix {
    align-items: end;
    padding-left: 12px;
  }
  .newInputComponent {
    display: flex;
    height: 40px;
    position: relative;
    font-size: var(--m);
    border: 1px solid var(--base-border);
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;

    .newInputPlaceholder {
      color: var(--light-gray);
      font-weight: 400;
      display: unset !important;
      position: absolute;
      top: 13px;
      left: 12px;
      font-size: var(--m);
      transition: 0.3s ease-out;
      pointer-events: none;
    }

    .newInputField {
      height: 100%;
      width: 100%;
      font-size: var(--m);
      padding-top: 14px;
      padding-left: 12px;
      font-family: 'Inter', Helvetica, Arial, sans-serif;
    }
    .newInputField:focus ~ .newInputPlaceholder {
      transition: 0.3s ease-out;
      font-size: var(--s);
      top: 2px;
    }
  }

  .filled {
    .newInputPlaceholder {
      transition: 0.3s ease-out;
      font-size: var(--s);
      top: 2px;
    }
  }

  .newInputComponent.text-area {
    height: 75px;
  }

  .hasError {
    background-color: transparent;
  }

  .selectComponent {
    border: 1px solid var(--base-border);
    border-radius: 4px;
    height: 40px;
    margin: unset;
    padding: unset;
    box-shadow: unset;
    position: relative;
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    font-weight: 400;

    .selectedValue {
      color: transparent;
      height: 100%;
    }

    .newPlaceholder {
      display: unset !important;
      position: absolute;
      top: 11px;
      left: 12px;
      font-size: var(--m);
      transition: 0.3s ease-out;
      pointer-events: none;
      color: var(--light-gray);
    }
  }

  .filled .newPlaceholder {
    transition: 0.3s ease-out;
    top: -1px;
    font-size: var(--s);
    height: 14px;
  }

  .filled .selectedValue {
    color: rgb(51, 51, 60);
    padding: 15px 0 0 12px;
  }

  .formRow {
    min-height: 65px;
    width: 100%;
    display: flex;
    flex-direction: row;
    /* flex-wrap: wrap; */
    justify-content: start;
    gap: 8px;

    .item {
      position: relative;
      height: 100%;
      min-width: 200px;

      .errorMessage {
        margin: unset;
        margin-top: 3px;
      }
    }

    .clientTitle {
      width: 20%;
      min-width: 0 !important;
    }
    .firstName {
      width: 40%;
    }
    .lastName {
      width: 40%;
    }
    .countryCode {
      width: calc(60% + 8px);
    }
    .phone {
      width: 40%;

      .newInputField {
        padding-top: 1px;
        padding-left: 0px;
      }
    }
    .max {
      width: 100%;
    }

    @media screen and (max-width: 1000px) {
      & {
        flex-wrap: wrap !important;
        gap: 4px;
        margin-bottom: 4px;
      }
      .item {
        width: 100% !important;
        height: 60px;
      }
    }
  }

  .checkComponent:focus,
  .checkComponent.in-focus,
  .checkComponent:active {
    outline: none;
    border: none;
    box-shadow: none;
  }
}

.errorMessage {
  color: red;
  font-size: var(--s);
}

.yellow {
  background-color: yellow;
}

.blue {
  background-color: blue;
}

.green {
  background-color: green;
}

@mixin animationDefault {
  animation-duration: 1s;
  animation-fill-mode: backwards;
  animation-timing-function: ease-in;
  animation-delay: 0.5s;
}
