/* Enhanced Payment Forms Modal - Professional Design */
.payforms-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000004;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payforms-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.payforms-modal {
  width: 90%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.payforms-overlay--visible .payforms-modal {
  transform: scale(1) translateY(0);
}

/* Header Styles */
.payforms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #8b5cf6;
  color: white;
}

.payforms-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payforms-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.payforms-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payforms-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.payforms-subtitle {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
  font-weight: 400;
}

.payforms-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 14px;
}

.payforms-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Compact Body Styles */
.payforms-body {
  padding: 16px;
  display: grid;
  gap: 14px;
}

/* Compact Summary Card */
.pf-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.pf-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pf-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pf-summary-icon {
  width: 32px;
  height: 32px;
  background: #8b5cf6;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.pf-summary-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pf-summary-label {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pf-summary-method {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.pf-summary-amount {
  text-align: right;
}

.pf-amount-value {
  font-size: 18px;
  font-weight: 700;
  color: #059669;
}

.pf-extra-fee {
  margin-top: 12px;
  padding: 8px 12px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #92400e;
  text-align: center;
}

/* Compact Form Styles */
.pf-form {
  display: grid;
  gap: 16px;
}

.pf-form-section {
  display: grid;
  gap: 12px;
}

.pf-field-group {
  display: grid;
  gap: 12px;
}

.pf-field {
  display: grid;
  gap: 6px;
}

.pf-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.pf-field-label i {
  color: #8b5cf6;
  width: 14px;
  font-size: 12px;
}

.pf-input {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
}

.pf-input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.pf-field-hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  min-height: 14px;
}

/* .pf-field-hint.validation-error {
  color: #dc2626;
}

.pf-field-hint.validation-success {
  color: #059669;
} */

/* Compact Security Notice */
.pf-security-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
}

.pf-security-icon {
  color: #059669;
  font-size: 14px;
}

.pf-security-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pf-security-text strong {
  font-size: 12px;
  font-weight: 600;
  color: #065f46;
}

.pf-security-text span {
  font-size: 10px;
  color: #047857;
}

/* Compact Form Actions */
.payforms-actions {
  display: flex;
  gap: 8px;
}

.pf-cancel {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.pf-cancel:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.pf-submit {
  flex: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #8b5cf6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  justify-content: center;
}

.pf-submit:hover:not(:disabled) {
  background: #7c3aed;
  transform: translateY(-1px);
}

.pf-submit:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.pf-submit.pf-loading {
  background: #8b5cf6;
  cursor: wait;
}

/* Error Display */
.pf-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #dc2626;
  font-size: 14px;
}

.pf-error i {
  font-size: 16px;
}

.pf-error-text {
  flex: 1;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .payforms-modal {
    background: #1e293b;
    color: white;
  }

  .pf-summary-card {
    background: #334155;
    border-color: #475569;
  }

  .pf-summary-icon {
    background: #475569;
  }

  .pf-summary-label {
    color: #94a3b8;
  }

  .pf-summary-method {
    color: white;
  }

  .pf-section-title {
    color: white;
    border-color: #475569;
  }

  .pf-field-label {
    color: #cbd5e1;
  }

  .pf-input {
    background: #334155;
    border-color: #475569;
    color: white;
  }

  .pf-input:focus {
    border-color: #8b5cf6;
  }

  .pf-field-hint {
    color: #94a3b8;
  }

  .pf-cancel {
    background: #334155;
    border-color: #475569;
    color: #cbd5e1;
  }

  .pf-cancel:hover {
    background: #475569;
  }

  .pf-security-notice {
    background: #064e3b;
    border-color: #047857;
  }

  .pf-security-text strong {
    color: #a7f3d0;
  }

  .pf-security-text span {
    color: #6ee7b7;
  }

  .pf-extra-fee {
    background: #92400e;
    border-color: #d97706;
    color: #fbbf24;
  }

  .pf-error {
    background: #7f1d1d;
    border-color: #dc2626;
    color: #fca5a5;
  }
}

/* Mobile Optimized Design */
@media (max-width: 480px) {
  .payforms-modal {
    width: 96%;
    margin: 6px;
  }

  .payforms-header {
    padding: 12px 14px;
  }

  .payforms-body {
    padding: 14px;
    gap: 12px;
  }

  .pf-summary-card {
    padding: 10px;
  }

  .pf-form {
    gap: 12px;
  }

  .pf-field-group {
    gap: 10px;
  }

  .pf-field {
    gap: 4px;
  }

  .pf-input {
    padding: 9px 10px;
  }

  .pf-security-notice {
    padding: 6px 10px;
  }

  .payforms-actions {
    gap: 6px;
  }

  .pf-cancel,
  .pf-submit {
    padding: 9px 12px;
    font-size: 12px;
  }
}
