/* Payment Modal Styles */
.payment-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.payment-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.payment-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.payment-modal-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
}

.close-modal {
  background: none;
  border: none;
  font-size: 32px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.close-modal:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.payment-amount-display {
  background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.amount-label {
  font-size: 16px;
  font-weight: 500;
}

.amount-value {
  font-size: 32px;
  font-weight: 700;
}

.payment-form-fields {
  padding: 24px;
}

.form-section {
  margin-bottom: 32px;
}

.form-section h4 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.form-group {
  margin-bottom: 16px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

/* Card Type Icon */
.card-type-icon {
  position: absolute;
  right: 12px;
  top: 38px;
  width: 40px;
  height: 25px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.card-type-icon.visa {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 32"><rect fill="%231434CB" width="48" height="32" rx="4"/><text x="24" y="20" font-family="Arial" font-size="12" font-weight="bold" fill="white" text-anchor="middle">VISA</text></svg>');
}

.card-type-icon.mastercard {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 32"><rect fill="%23EB001B" width="48" height="32" rx="4"/><circle cx="18" cy="16" r="8" fill="%23FF5F00"/><circle cx="30" cy="16" r="8" fill="%23F79E1B"/></svg>');
}

.card-type-icon.amex {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 32"><rect fill="%23006FCF" width="48" height="32" rx="4"/><text x="24" y="20" font-family="Arial" font-size="10" font-weight="bold" fill="white" text-anchor="middle">AMEX</text></svg>');
}

.card-type-icon.discover {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 32"><rect fill="%23FF6000" width="48" height="32" rx="4"/><text x="24" y="20" font-family="Arial" font-size="9" font-weight="bold" fill="white" text-anchor="middle">DISCOVER</text></svg>');
}

/* Payment Security Notice */
.payment-security-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #166534;
}

.security-icon {
  font-size: 20px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-cancel,
.btn-pay {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.btn-cancel:hover {
  background: #e5e7eb;
}

.btn-pay {
  background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
  color: white;
}

.btn-pay:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.btn-pay:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-spinner {
  animation: spin 1s linear infinite;
}

/* reCAPTCHA Notice */
.recaptcha-notice {
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
}

.recaptcha-notice a {
  color: #d4af37;
  text-decoration: none;
}

.recaptcha-notice a:hover {
  text-decoration: underline;
}

/* Success Overlay */
#successOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.3s ease;
}

.success-content {
  background: white;
  border-radius: 16px;
  padding: 48px;
  max-width: 500px;
  text-align: center;
  animation: slideUp 0.3s ease;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  margin: 0 auto 24px;
  animation: scaleIn 0.5s ease;
}

.success-content h3 {
  margin: 0 0 16px 0;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

.success-content p {
  margin: 12px 0;
  font-size: 16px;
  color: #6b7280;
  line-height: 1.6;
}

.transaction-id {
  font-family: monospace;
  font-size: 14px !important;
  color: #9ca3af !important;
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-block;
}

.btn-close {
  margin-top: 24px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

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

/* Dark Mode Support - DISABLED to maintain light mode appearance */
@media (prefers-color-scheme: dark) and (min-width: 99999px) {
  .payment-modal-content {
    background: #1f2937;
  }

  .payment-modal-header {
    border-bottom-color: #374151;
  }

  .payment-modal-header h3 {
    color: white;
  }

  .close-modal {
    color: #9ca3af;
  }

  .close-modal:hover {
    background: #374151;
    color: white;
  }

  .form-section h4 {
    color: white;
  }

  .form-group label {
    color: #d1d5db;
  }

  .form-group input,
  .form-group select {
    background: #374151;
    border-color: #4b5563;
    color: white;
  }

  .form-group input:focus,
  .form-group select:focus {
    border-color: #d4af37;
  }

  .btn-cancel {
    background: #374151;
    color: #d1d5db;
  }

  .btn-cancel:hover {
    background: #4b5563;
  }

  .recaptcha-notice {
    border-top-color: #374151;
    color: #9ca3af;
  }

  .success-content {
    background: #1f2937;
  }

  .success-content h3 {
    color: white;
  }

  .success-content p {
    color: #d1d5db;
  }

  .transaction-id {
    background: #374151 !important;
    color: #d1d5db !important;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .payment-modal {
    padding: 0;
    align-items: flex-end;
  }

  .payment-modal-content {
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
  }

  .payment-modal-header {
    padding: 20px;
  }

  .payment-modal-header h3 {
    font-size: 20px;
  }

  .payment-amount-display {
    padding: 16px 20px;
  }

  .amount-value {
    font-size: 28px;
  }

  .payment-form-fields {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .success-content {
    padding: 32px 24px;
  }

  .success-icon {
    width: 64px;
    height: 64px;
    font-size: 36px;
  }

  .success-content h3 {
    font-size: 24px;
  }
}
