  .main-container {
  max-width: 800px; /* Match your form's max-width */
  margin: 0 auto; /* Center the container */
  position: relative; /* For logo positioning */
}
    body {
      font-family: Arial, sans-serif;
      margin: 2rem;
    }
    h1 {
      margin-bottom: 1rem;
    }
    #customerInfo {
      margin-bottom: 1.5rem;
    }
    form {
      display: grid;
      grid-template-columns: 220px 1fr;
      row-gap: 1.1rem;
      column-gap: 2rem;
      max-width: 800px;
      align-items: center;
    }
    .form-legend {
  grid-column: 1 / -1;
  font-size: 0.9em;
  color: #666;
  margin-bottom: 1rem;
}
.hidden {
  display: none;
}
label.required::after {
  content: " *";
  color: #d00;
  font-weight: bold;
}
    label {
      margin: 0;
      text-align: right;
      align-self: center;
    }
    input, select, button {
      width: 100%;
      padding: 0.65rem 0.75rem;
      font-size: 1rem;
      box-sizing: border-box;
      border: 1px solid #ccc;
      border-radius: 4px;
      align-self: center;
    }
    .expiration-group {
      display: flex;
      gap: 0.5rem;
      align-items: center;
      height: 40px;
    }
    .expiration-group input {
      width: 60px;
      text-align: center;
      height: 100%;
    }
    .slash {
      font-size: 1.2rem;
      align-self: center;
    }
    .info, .error, .success {
      grid-column: 1 / -1;
      font-weight: bold;
    }
    .error {
      color: red;
    }
    .success {
      color: green;
    }
    input.invalid {
      border: 2px solid red;
    }
    .error-message {
      font-size: 0.9em;
      color: red;
      margin-top: -0.3rem;
      margin-bottom: 0.5rem;
      grid-column: 2 / -1;
    }
    .version {
      margin-top: 2rem;
      font-size: 0.8rem;
    }
    button {
      background-color: #f2f2f2;
      border: 1px solid #999;
      cursor: pointer;
      transition: background-color 0.2s;
    }
    button:hover {
      background-color: #e0e0e0;
    }

    #loadingIndicator {
      text-align: center;
      padding: 20px;
      margin-top: 20px;
    }

    .processing {
      display: inline-block;
      position: relative;
      padding-left: 30px;
    }

    .processing:before {
      content: "";
      position: absolute;
      left: 0;
      top: 50%;
      width: 20px;
      height: 20px;
      margin-top: -10px;
      border: 3px solid #ccc;
      border-top-color: #3498db;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    #successMessage {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 15px;
  border-radius: 4px;
  margin-top: 20px;
  }


    #errorContainer {
      max-width: 800px;
      margin-left: auto;
      margin-right: auto;
      background-color: #f8d7da;
      border: 1px solid #f5c6cb;
      color: #721c24;
      padding: 15px;
      border-radius: 4px;
      margin-top: 20px;
    }
    .authorization-text {
  grid-column: 2;
  margin: 0px 0;
  padding: 0 5px;
  text-align: right;
  font-size: 1em;
  color: #666;
}
    .payment-info {
      background-color: #fff3cd;
      border: 1px solid #ffeeba;
      color: #856404;
      padding: 15px;
      border-radius: 4px;
      margin-bottom: 20px;
    }
    /* Add this to your style section */
    .g-recaptcha-wrapper {
  grid-column: 1 / -1;
  margin: 20px 0;
  margin-bottom: 0;
  display: flex;
  justify-content: flex-end; /* Align to the right instead of center */
}
/* Add a container for the submit button */
.submit-button-container {
  grid-column: 2; /* Place in the second column of the grid */
  display: flex;
  justify-content: flex-end; /* Align to the right */
  margin-top: 10px;
}

/* Style the submit button */
#submitBtn {
  width: auto; /* Override the 100% width */
  min-width: 120px; /* Set a minimum width */
}
/* This ensures the reCAPTCHA is centered and properly spaced */
.g-recaptcha {
  display: inline-block;
}
/* Logo styling */
.logo-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.company-logo {
  height: 40px;
  width: auto;
  max-width: 200px;
}

/* Make the form container have relative positioning */
body {
  position: relative;
  padding-top: 80px; /* Add some padding to ensure content doesn't overlap with logo */
}


/* Form header styling - place this outside any media queries */
.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 2rem;
}

.form-header h1 {
  margin: 0;
  flex: 1; /* Take up available space */
}

.logo-link {
  position: absolute;
  right: 0;
  top: 20px;
}

.company-logo {
  height: 50px;
  width: auto;
}
.payment-info {
  width: 100%;
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.version {
  margin-top: 2rem;
  font-size: 0.8rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
  body {
    padding-top: 0;
  }
/* Mobile styles */
@media (max-width: 768px) {
  /* Keep your existing header styles */
  .form-header {
    flex-direction: column;
    align-items: flex-start;
  }
  #successMessage, #errorContainer {
    margin: 15px 10px;
    padding: 12px;
    border-radius: 3px;
    font-size: 0.95em;
    width: auto;  /* Allow flexible width on mobile */
    max-width: 100%;
  }
    
  #successMessage p, #errorContainer p {
    margin: 0.5em 0;  /* Tighter spacing between paragraphs */
  }
  
  .authorization-text {
    text-align: left;
    margin: 0px 0;
  }
  .logo-link {
    margin-left: 0;
    margin-top: 15px;
  }
  
  /* Add the new mobile optimizations */
  body {
    margin: 1rem;
    padding: 0;
  }
  
  /* Convert grid to single column on mobile */
  form {
    display: block;
    max-width: 100%;
  }
  
  /* Form labels */
  label {
    display: block;
    text-align: left;
    margin-bottom: 0.3rem;
    font-weight: bold;
  }
  
  /* Form inputs */
  input, select {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.8rem;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  /* Additional mobile styles... */
}

@media (max-width: 320px) {
  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: left center;
  }
}
@media (max-width: 767px) {
  .mobile-form-note {
    display: block;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
  }
}
@media (max-width: 768px) {
  .expiration-group {
    justify-content: flex-start;
  }
  
  .expiration-group input {
    width: 80px; /* Larger touch target */
  }
}
@media (max-width: 768px) {
  .payment-info {
    padding: 12px;
    margin-bottom: 1.5rem;
  }
}

  .mobile-form-note {
  display: none;
}

@media (max-width: 767px) {
  .mobile-form-note {
    display: block;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
  }
}
