.page {
  /* position: relative; */
  position: static;
  /* height: calc(100vh - 50px);
      max-height: -webkit-fill-available; */
  display: flex;
  justify-items: center;
  justify-content: center;
  gap: 16px;
}

.hide {
  height: 0;
  visibility: hidden;
}

.payment-loader {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cross {
  position: absolute;
  top: -36px;
  right: 28px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  z-index: 9;
}

.title {
  font-size: 27px;
  font-weight: 700;
  margin: 0;
}

.email {
  font-size: 17px;
  font-weight: 500;
  margin: 0;
}

.button {
  min-height: 0;
  height: 67px;
  text-transform: uppercase;
  background-color: #224e90;
  border-radius: 9px;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.07em;
  gap: 12px;
  opacity: 1;
  transition: opacity 0.2s ease;
  margin-top: 10px;

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

.button > img {
  height: 22px;
  // margin-top: -5px;
}

.form {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hide {
  display: none;
}

.formRow {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;

  &.cardNumberRow {
    width: fit-content;
    margin: 0 auto 16px;
  }

  label {
    display: block;
    margin-bottom: 5px;
    font-weight: 400;
    text-align: left;

    padding-left: 7px;
    font-size: 16px;
  }
}

.formGroup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 302px;
  margin-inline: auto;
}

@media (max-width: 280px) {
  .formGroup {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .fieldContainer {
    &.cardExpiry {
      max-width: none !important;
    }

    &.cardCvv {
      max-width: none !important;
    }
  }

  .formRow {
    &:nth-child(2) {
      margin-left: 0 !important;
    }
  }
}

.input {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.2s;

  &:focus {
    outline: none;
    border-color: #3b82f6;
  }
}

:global {
  .CollectJSInlineIframe {
    width: fit-content !important;
    max-width: 100% !important;
    height: 100% !important;
    border: none !important;
  }

  #CollectJSInlineccnumber {
    max-width: 292px !important;
  }

  #CollectJSInlineccexp {
    max-width: 130px !important;
  }

  #CollectJSInlinecvv {
    max-width: 68px !important;
  }
}

.fieldContainer {
  background-color: #f0f5ff;
  border: 0.5px solid #cdcdcd;
  border-radius: 11px;
  overflow: hidden;
  transition: border-color 0.2s;
  padding: 2px;
  height: 52px;
  width: 100%;

  &:focus-within {
    border-color: #3b82f6;
  }

  &.invalid {
    border-color: #fca5a5;
    border-width: 2px;
  }

  &.cardNumber {
    width: fit-content !important;
    margin: 0 auto !important;
    padding-left: 6px !important;
  }

  &.cardExpiry {
    max-width: 150px;
    padding: 2px 12px;
  }

  &.cardCvv {
    max-width: 100px;
    padding: 2px 12px;
  }
}

.errorMessage {
  color: #dc3545;
  font-size: 12px;
  margin-top: 4px;
}

.formContainer {
  position: relative;
  width: calc(100% + 30px);
  max-width: 356px;
  background-color: #fff;
  border-radius: 11px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  padding: 46px 12px 6px;
  margin-bottom: 21px;
}

.cardIcon {
  position: absolute;
  top: 10px;
  left: 12px;
}

// @media (max-width: 376px) {
//     .formContainer {
//         margin-left: -15px;
//     }
// }

.loaderContainer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cardTypeError {
  width: 100%;
  padding: 15px 13px 18px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  margin-bottom: 12px;

  & > .textContainer {
    & > .title {
      font-size: 14px;
      line-height: 20px;
      text-align: left;
      margin-bottom: 0;
      font-weight: 500;
      color: #b91c1c;
    }

    & > .description {
      font-size: 14px;
      line-height: 20px;
      text-align: left;
      color: #b91c1c;
      margin-top: 4px;
    }
  }
}

.cardNumberLabelContainer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
