/**
* Transflow Payment Styles
* Save this as: assets/transflow-payment.css
*/
 
/* Modal and Overlay Styles */
.tf-c-overlay {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  opacity: 1;
  position: fixed;
  right: 0;
  top: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 10000;
}
 
.tf-c-overlay--hidden {
  opacity: 0;
}
 
.tf-c-iframe {
  border: none;
  bottom: 0;
  display: block;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10000;
}
 
.tf-c-iframe,
.tf-c-transaction-modal {
  border-radius: 10px;
  height: 100vh;
  width: 100vw;
}
 
.tf-c-transaction-modal {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 32px;
  position: relative;
  transform: scale(1);
  transition: transform 0.2s ease-in-out;
}
 
.tf-c-modal-content--closed {
  transform: scale(0.95);
}
 
.tf-c-spinner-container {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}
 
.tf-c-spinner-wrapper {
  align-items: center;
  display: flex;
  justify-content: center;
}
 
.tf-c-spinner {
  animation: spin 0.4s linear infinite;
  border: 4px solid hsla(0, 0%, 100%, 0.5);
  border-radius: 9999px;
  border-top-color: #fff;
  height: 2rem;
  width: 2rem;
}
 
@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}
 
.tf-c-close-button {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: none;
  font-size: 24px;
  height: 40px;
  justify-content: center;
  padding: 4px 10px;
  position: absolute;
  right: 10px;
  top: 10px;
  transition: background-color 0.3s ease, color 0.3s ease;
  width: 35px;
  z-index: 10001;
}
 
.tf-c-close-button:hover {
  background-color: rgba(0, 0, 0, 0.9);
}
 
.tf-c-close-button--enabled {
  display: flex;
}
 
/* Responsive styles for larger screens */
@media (min-width: 533px) {
  .tf-c-transaction-modal {
    height: 450px;
    padding: 24px;
    width: 340px;
  }
  .tf-c-close-button {
    right: -90px;
    top: -2px;
  }
  .tf-c-iframe {
    height: 600px !important;
    width: 390px !important;
  }
}
 
/* Pre-Payment Form Styles */
.transflow-payment-wrapper {
  max-width: 500px;
  margin: 0 auto;
}
 
.transflow-pre-payment-form {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
 
.tf-form-group {
  margin-bottom: 20px;
}
 
.tf-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 8px;
}
 
.tf-form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
 
.tf-form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
 
.tf-form-input:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
}
 
.tf-form-input:valid:not(:placeholder-shown) {
  border-color: #28a745;
}
 
/* Custom button styles */
.transflow-pay-button {
  background-color: #007bff;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 8px;
}
 
.transflow-pay-button:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}
 
.transflow-pay-button:active {
  transform: translateY(0);
}
 
.transflow-pay-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  transform: none;
}
 
/* Compact form variant */
.transflow-pre-payment-form.compact {
  padding: 16px;
}
 
.transflow-pre-payment-form.compact .tf-form-group {
  margin-bottom: 12px;
}
 
.transflow-pre-payment-form.compact .tf-form-input {
  padding: 10px 12px;
  font-size: 14px;
}
 
/* Loading state for button */
.transflow-pay-button.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
 
.transflow-pay-button.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}
 
/* Error messages */
.tf-error-message {
  color: #dc3545;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}
 
.tf-form-group.error .tf-error-message {
  display: block;
}
 
.tf-form-group.error .tf-form-input {
  border-color: #dc3545;
}
 
/* Success state */
.tf-success-message {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  color: #155724;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
 
/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .transflow-pre-payment-form {
    background: #1a1a1a;
    border-color: #333333;
  }
  .tf-form-group label {
    color: #e0e0e0;
  }
  .tf-form-input {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
  }
  .tf-form-input:focus {
    background: #2a2a2a;
    border-color: #0056b3;
  }
}