:root{
  /* brand palette — edit once */
  --bg-color:#ffffff;
  --text-color:#111827;
  --accent-color:#2563eb;
  --primary-color: #527bff;
  --success-color: #2ecc71;
  --error-color: #e74c3c;
  --info-color: #3498db;
  --border-color: #e5e7eb;
}

/* ---------- GENERAL STYLES ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
}

/* ---------- HEADER ---------- */
.header{
  background:var(--bg-color);
  color:var(--text-color);
  border-bottom:1px solid var(--border-color);
  padding:16px
}
.header-inner{
  max-width:900px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;   
}

/* --- HEADER LOGO --- */
.logo{
  width:220px;      /* fixed width  */
  height:70px;      /* fixed height */
  object-fit:contain;   /* keep aspect ratio inside the box */
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 0px;
}
.logo-container svg {
  max-width: 440px;
  height: auto;
  /* Removed blue shadow/glow effect */
  background: transparent;
  display: block;
}

/* Logo table styling */
.logo-table td {
  padding: 4px;
}

/* ---------- FOOTER ---------- */
.footer{
  background:var(--bg-color);
  color:var(--text-color);
  border-top:1px solid var(--border-color);
  font-size:.875rem;
  text-align:center;
  padding:20px 12px;
  margin-top: 12px; /* Added increased margin for more space between content and footer */
}
.footer a{
  color:inherit;
  margin:0 6px;
  text-decoration:none;
  font-weight:500
}
.footer a:hover{text-decoration:underline}
@media(max-width:640px){
  .footer{font-size:.8125rem}
}

/* ---------- MAIN ---------- */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  background-color: transparent; /* Explicitly set to transparent to remove container box */
  box-shadow: none; /* Explicitly remove any box shadow */
  border: none; /* Explicitly remove any border */
}

h1 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-color);
}

h2 {
  color: var(--info-color);
  /*margin: 1rem 0;*/
}

/* Required field styling */
.required {
  color: var(--error-color);
  font-weight: bold;
  margin-left: 2px;
}

.required-note {
  font-size: 0.85rem;
  color: var(--text-color);
  margin-top: 16px; /* Space between button and required note */
  text-align: center;
  margin-bottom: 16px; /* Added bottom margin as well */
}

/* Transaction ID styling */
.transaction-id {
  font-family: monospace;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

/* Page title styling for payment page */
main > h2 {
  text-align: center;
  margin-bottom: 32px; /* Increased space below the title */
  color: var(--text-color);
  font-size: 1.5rem;
  font-weight: 600;
}

/*
form {
  background: #f9f9fb;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  padding: 32px 32px 24px 32px;
  max-width: 480px;
  margin: 0 auto;
}*/

form table {
  width: 100%;
}
form td {
  padding: 8px 4px;
}
form input[type="text"], form input[type="number"], form input[type="email"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 1rem;
  background: #fff;
  color: #181A1B;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

form input[type="text"]:hover, form input[type="number"]:hover, form input[type="email"]:hover {
  border-color: #a0aec0;
}

form input[type="text"]:focus, form input[type="number"]:focus, form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(82, 123, 255, 0.25);
}

/* ---------- PAYMENT FORM STYLES ---------- */
.processing-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.error-message {
  color: var(--error-color);
  background-color: #fdf2f2;
  border: 1px solid #fad2d2;
  border-radius: 4px;
  padding: 1rem;
  margin: 1rem 0;
}

.success-message {
  color: var(--success-color);
  background-color: #f0fff4;
  border: 1px solid #c6f6d5;
  border-radius: 4px;
  padding: 1rem;
  margin: 1rem 0;
}

.processing-message {
  color: var(--info-color);
  background-color: #ebf8ff;
  border: 1px solid #bee3f8;
  border-radius: 4px;
  padding: 1rem;
  margin: 1rem 0;
}

/* Payment details section styling */
.payment-details-section {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f5f8ff;
  border-radius: 8px;
  border: 1px solid #e0e7ff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.payment-details-section:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.customer-details-section {
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e6e6e6;
  margin-bottom: 30px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.customer-details-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.customer-details-section h2 {
  margin-top: 0;
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* Button styling */
.button-container {
  text-align: center;
  margin: 20px 0 20px 0; /* Increased bottom margin to add space before the required note */
  display: flex;
  flex-direction: column;
  align-items: center;
}

#customPayButton {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: inline-block;
  font-family: inherit;
}

#customPayButton:hover {
  background-color: #3e68e0;
  color: #fff;
}

#customPayButton:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Custom styles for amount input */
.amount-container {
  margin: 20px 0;
  padding: 15px;
  background-color: #f0f8ff;
  border-radius: 8px;
  border: 2px solid var(--primary-color);
  text-align: center;
}

.amount-container label {
  font-weight: bold;
  font-size: 1.2rem;
  color: #333;
  margin-right: 10px;
}

#payment_amount {
  font-size: 1.5rem;
  padding: 8px 15px;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  width: 150px;
  text-align: center;
  color: #2c3e50;
  font-weight: bold;
}

#payment_amount:focus {
  outline: none;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}

/* Custom styles for important fields */
.important-fields {
  margin: 15px 0;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.important-fields table {
  width: 100%;
}

.important-fields td:first-child {
  font-weight: bold;
  width: 30%;
}

.important-fields input {
  padding: 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  width: 100%;
  font-size: 1rem;
}

.important-fields input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.08);
}

/* Loading spinner styling */
.loading-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin: 1rem auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Back link styling */
.back-link-container {
  margin-top: 24px;
}

.back-link {
  display: inline-block;
  padding: 8px 16px;
  background-color: #f8f9fa;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid var(--primary-color);
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-link:hover {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form validation styles */
.validation-error {
  color: var(--error-color);
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}

.input-error {
  border-color: var(--error-color) !important;
  background-color: rgba(231, 76, 60, 0.05);
  box-shadow: 0 0 0 1px var(--error-color) !important;
  animation: errorShake 0.4s 1;
}

.input-error:focus {
  border-color: var(--error-color) !important;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.25) !important;
}

.validation-summary {
  color: var(--error-color);
  background-color: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--error-color);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 16px;
  display: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
}

/* Animation for validation errors */
@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.input-valid {
  border-color: var(--success-color) !important;
  background-color: rgba(46, 204, 113, 0.05);
}

.input-valid:focus {
  border-color: var(--success-color) !important;
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.25) !important;
}

/* Payment Method Selection Styles - Clean Version */
.payment-method-selection {
  margin-bottom: 20px;
}

.payment-method-options-clean {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.payment-method-option-clean {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 5px;
  transition: all 0.2s ease;
}

.payment-method-option-clean input {
  margin-right: 8px;
}

.payment-method-option-clean input:checked + span {
  font-weight: bold;
  color: var(--primary-color);
}

.payment-fields-clean {
  margin-bottom: 15px;
  padding: 5px 0;
}

/* Old payment method styles kept for reference only */
/* These can be removed if they're not needed anymore */
.payment-method-options {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.payment-method-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.payment-method-option:hover {
  border-color: var(--primary-color);
}

.payment-method-option input {
  margin-right: 8px;
}

.payment-method-option input:checked + span {
  font-weight: bold;
  color: var(--primary-color);
}

.payment-fields {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 4px;
  background-color: #fafafa;
}

.payment-notice {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
  padding: 8px;
  background-color: #f9f9f9;
  border-left: 3px solid var(--primary-color);
}

.ach-field-group {
  margin-bottom: 15px;
}

#ach-fields label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}
