/* 
================================================================================
SILVERPAUL FORUM - DONATION PAGE STYLES
================================================================================

Dedicated styles for the donation page using SilverPaul design tokens.
Prevents FOUC by loading in head section.

Load Order: Loaded via {% block extra_head %} in donate.html
Dependencies: tokens/* (spacing, typography, colors)
Last Updated: August 2, 2025
================================================================================
*/

@layer components.donation {
  
.donation-section {
  max-width: var(--space-100); /* 600px */
  padding: 0 var(--space-4); /* 0 16px */
}

.donation-header {
  text-align: center;
  margin-bottom: var(--space-layout-lg); /* 48px */
}

.header-content h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--brand-primary-500);
  margin-bottom: var(--space-4); /* 16px */
  font-family: var(--font-family-primary);
}

.donation-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: var(--space-96); /* 400px */
  margin: 0 auto;
  font-family: var(--font-family-primary);
}

.donation-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.donation-card {
  background: var(--bg-light);
  border-radius: var(--space-3); /* 12px */
  padding: var(--space-layout-lg); /* 48px */ var(--space-10); /* 40px */
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: var(--space-96); /* 400px */
}

.card-header {
  text-align: center;
  margin-bottom: var(--space-8); /* 32px */
}

.card-header h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2); /* 8px */
  font-family: var(--font-family-primary);
}

.card-header p {
  color: var(--text-muted);
  font-size: var(--text-base);
  font-family: var(--font-family-primary);
}

/* Amount Selection */
.amount-section {
  margin-bottom: var(--space-8); /* 32px */
}

.form-label {
  display: block;
  font-weight: var(--font-weight-semibold);
  color: var(--primary-blue);
  margin-bottom: var(--space-3); /* 12px */
  font-size: var(--text-base);
  font-family: var(--font-family-primary);
  text-align: center;
}

.amount-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3); /* 12px */
  margin-bottom: var(--space-4); /* 16px */
}

.amount-btn {
  padding: var(--space-3) var(--space-4); /* 12px 16px */
  border: var(--space-0-5) solid var(--border-subtle);
  background: var(--bg-light);
  color: var(--text-muted);
  border-radius: var(--space-2); /* 8px */
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: var(--text-base);
  font-family: var(--font-family-primary);
}

.amount-btn:hover {
  border-color: var(--primary-green);
  background: var(--primary-green);
  color: var(--silver);
}

.amount-btn.selected {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
  color: var(--silver);
}

.custom-amount-input {
  margin-top: var(--space-4); /* 16px */
}

.custom-amount-input input {
  width: 100%;
  padding: var(--space-3); /* 12px */
  border: var(--space-0-5) solid var(--border-subtle);
  border-radius: var(--space-2); /* 8px */
  font-size: var(--text-base);
  transition: border-color 0.3s ease;
}

.custom-amount-input input:focus {
  border-color: var(--brand-green-500);
  outline: none;
}

.selected-amount {
  font-family: var(--font-family-primary);
  text-align: center;
  margin-top: var(--space-4); /* 16px */
}

.amount-display {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--brand-green-500);
}

/* Form Groups */
.form-group {
  margin-bottom: var(--space-6); /* 24px */
}

.form-input {
  width: 100%;
  padding: var(--space-3); /* 12px */
  border: var(--space-0-5) solid var(--border-subtle);
  border-radius: var(--space-2); /* 8px */
  font-size: var(--text-base);
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  font-family: var(--font-family-primary);
  text-align: center;
}

.form-input:focus {
  border-color: var(--primary-green);
  outline: none;
}

.card-input {
  padding: var(--space-4); /* 16px */
  min-height: var(--space-12); /* 48px */
}

/* Donate Button */
.donate-btn {
  width: 100%;
  background: var(--primary-blue);
  color: var(--silver);
  border: none;
  padding: var(--space-4); /* 16px */
  border-radius: var(--space-2); /* 8px */
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: var(--space-6); /* 24px */
  min-height: var(--space-14); /* 56px */
  font-family: var(--font-family-primary);
}

.donate-btn:hover:not(:disabled) {
  background: var(--primary-green);
  color: var(--silver);
  transform: translateY(calc(-1 * var(--space-0-5)));
  box-shadow: var(--shadow-lg);
}

.donate-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: var(--space-5); /* 20px */
  height: var(--space-5); /* 20px */
  border: var(--space-0-5) solid transparent;
  border-top: var(--space-0-5) solid var(--bg-light);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Security Info */
.security-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2); /* 8px */
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4); /* 16px */
  font-family: var(--font-family-primary);
}

.lock-icon {
  width: var(--space-4); /* 16px */
  height: var(--space-4); /* 16px */
  color: var(--brand-green-500);
}

/* Stripe Logo */
.stripe-logo {
  text-align: center;
}

.stripe-logo img {
  height: var(--space-7-5); /* 30px */
  opacity: 0.8;
}

/* Success Modal */
.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-backdrop);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-modal);
}

.modal-content {
  background: var(--bg-light);
  padding: var(--space-layout-lg) var(--space-8); /* 48px 32px */
  border-radius: var(--space-3); /* 12px */
  text-align: center;
  max-width: var(--space-97); /* 400px */
  margin: var(--space-4); /* 16px */
}

.success-icon {
  width: var(--space-15); /* 60px */
  height: var(--space-15); /* 60px */
  margin: 0 auto var(--space-6); /* 0 auto 24px */
  background: var(--brand-green-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: var(--space-7-5); /* 30px */
  height: var(--space-7-5); /* 30px */
  color: var(--bg-light);
}

.modal-content h2 {
  font-size: var(--text-2xl);
  color: var(--text-primary);
  margin-bottom: var(--space-4); /* 16px */
  font-family: var(--font-family-primary);
}

.modal-content p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-8); /* 32px */
  font-family: var(--font-family-primary);
}

.close-modal-btn {
  background: var(--brand-green-500);
  color: var(--bg-light);
  border: none;
  padding: var(--space-3) var(--space-8); /* 12px 32px */
  border-radius: var(--space-2); /* 8px */
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: var(--font-family-primary);
}

.close-modal-btn:hover {
  background: var(--brand-green-600);
}

/* Error Message */
.error-message {
  background: var(--status-danger-50);
  color: var(--status-danger-700);
  padding: var(--space-4); /* 16px */
  border-radius: var(--space-2); /* 8px */
  margin: var(--space-4) auto; /* 16px auto */
  max-width: var(--space-96); /* 400px */
  text-align: center;
  border: var(--space-px) solid var(--status-danger-200);
  font-family: var(--font-family-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .donation-section {
    margin: var(--space-4) auto; /* 16px auto */
  }
  
  .donation-card {
    padding: var(--space-8) var(--space-6); /* 32px 24px */
  }
  
  .header-content h1 {
    font-size: var(--text-3xl);
  }
  
  .amount-options {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .custom-btn {
    grid-column: span 2;
  }
}

} /* end @layer components.donation */
