/* Stripe Donation Section Styles */
.stripe-donation-section {
    padding: 3rem 1.5rem;
    background: linear-gradient(to bottom, var(--background-light) 0%, #ffffff 100%);
}

.donation-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.donation-header h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
}

/* Add the blue line divider */
.section-divider {
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 1.5rem;
    border-radius: 2px;
}

.donation-subtitle {
    font-size: 1.2rem;
    color: #1e40af;
    margin-bottom: 0.75rem;
}

.donation-description {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.5;
    padding: 0 1rem;
}

.donation-form {
    max-width: 800px;
    margin: 0 auto;
}

/* Amount Selection Styles */
.donation-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.amount-btn-wrapper {
    min-width: unset;
    max-width: unset;
}

.amount-btn {
    width: 100%;
    padding: 1.5rem 1.2rem;
    border: 2px solid var(--primary);
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    cursor: pointer;
    overflow: visible;
}

/* Hover and Selected States */
.amount-btn:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    background: linear-gradient(to bottom, #ffffff, var(--primary-50));
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.amount-btn.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.amount-btn.selected .amount,
.amount-btn.selected .amount-description,
.amount-btn.selected .amount-impact {
    color: white;
}

/* Recommended Button Styles */
.amount-btn.recommended {
    background: #ffffff;
    border: 2px solid var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}

.amount-btn.recommended:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
    background: linear-gradient(to bottom, #ffffff, var(--primary-50));
}

.amount-btn.recommended.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transform: translateY(-4px);
}

/* Badge Styles */
.recommended-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffc800 100%);
    color: #1a202c;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Update amount text styles */
.amount {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
}

.amount-description {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
}

.amount-impact {
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
}

/* Custom Amount Section Styles */
.custom-amount-section {
    max-width: 400px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: rgba(37, 99, 235, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: all 0.3s ease;
}

.custom-amount-section:focus-within {
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.custom-amount-header {
    margin-bottom: 1rem;
    text-align: center;
}

.custom-amount-label {
    font-size: 1.1rem;
    color: #2563eb;
    font-weight: 600;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #2563eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.currency-symbol {
    padding: 0.75rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 600;
    font-size: 1.1rem;
}

.input-wrapper input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    font-size: 1.1rem;
    color: #1e40af;
    outline: none;
    background: transparent;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.custom-amount-note {
    text-align: center;
    color: #3b82f6;
    font-size: 0.95rem;
    margin-top: 1rem;
    font-style: italic;
}

.amount-hint {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
    text-align: center;
}

/* Improve input validation visual feedback */
.input-wrapper input:invalid {
    border-color: var(--error);
}

.input-wrapper input:focus:invalid {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Payment Element Styles */
.payment-element {
    margin: 2rem 0;
    padding: 1rem;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payment-element:not(.hidden) {
    display: block;
}

.payment-element.hidden {
    display: none;
}

#donate-button {
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#donate-button:not(.hidden) {
    display: block;
}

#donate-button.hidden {
    display: none;
}

/* Donate Button Styles */
.donate-button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 2.5rem auto;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.donate-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}

.donate-button:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.donate-button:disabled {
    background: #3e3eae;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

.donate-button .spinner {
    margin-right: 1rem;
}

/* Add pulsing effect to the donate button */
@keyframes pulse {
    0% {
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
    }
    100% {
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    }
}

.donate-button:not(:disabled) {
    animation: pulse 2s infinite;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Test Card Message Styles */
.test-card-message {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: #475569;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.test-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #0570de;
    font-weight: 600;
}

.test-card-content {
    font-size: 0.95rem;
}

.test-card-content ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.test-card-content li {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-number {
    font-family: monospace;
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.test-card-note {
    font-style: italic;
    color: #64748b;
    margin-top: 1rem;
}

/* Message Styles */
.payment-message {
    max-width: 400px;
    margin: 1rem auto;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.payment-message.show {
    opacity: 1;
    transform: translateY(0);
}

.payment-message.error {
    background-color: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
}

.payment-message.success {
    background-color: #DCFCE7;
    color: #16A34A;
    border: 1px solid #86EFAC;
}

.payment-message i {
    font-size: 1.1rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Page Styles */
.donation-success-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--background-light) 0%, #ffffff 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.success-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    animation: heartBeat 1.3s ease-in-out infinite;
}

.success-content h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.success-message {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.success-details {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: rgba(17, 76, 223, 0.836);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.social-impact {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 16px;
}

.social-impact h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .stripe-donation-section {
        padding: 2rem 1rem;
    }

    .donation-header {
        margin-bottom: 2rem;
    }

    .donation-header h2 {
        font-size: 1.75rem;
    }

    .donation-amounts {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    .amount {
        font-size: 1.5rem;
    }

    .custom-amount-section {
        margin: 1.5rem 1rem;
        padding: 1.25rem;
    }

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

    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .donation-amounts {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }

    .amount-btn {
        padding: 1rem;
    }
}

/* Success Page Enhanced Styles */
.donation-amount {
    background: #2563eb;
    color: white;
    padding: 1rem 2rem;
    border-radius: 16px;
    display: inline-flex;
    gap: 1rem;
    align-items: center;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.amount-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

.amount-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.success-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #059669;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.success-status i {
    font-size: 1.5rem;
}

.transaction-id {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-family: monospace;
    color: #6b7280;
    font-size: 0.9rem;
}

.impact-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.impact-content i {
    font-size: 2rem;
    color: #2563eb;
}

.thank-you-note {
    margin-top: 2rem;
    font-style: italic;
    color: #4b5563;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
}

.btn-primary i, .btn-secondary i {
    font-size: 1.2rem;
}

/* Failure Page Styles */
.donation-failure-section {
    padding: 4rem 1rem;
    background: var(--background-light);
}

.failure-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.failure-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1.5rem;
}

.failure-content h1 {
    color: #1f2937;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.error-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #991b1b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.failure-details {
    color: #4b5563;
    margin: 1.5rem 0;
}

.failure-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

@media (max-width: 640px) {
    .failure-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .failure-content {
        padding: 1.5rem;
    }
}

.test-mode-banner {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
    text-align: center;
    font-size: 0.9rem;
}

.test-mode-banner i {
    margin-right: 0.5rem;
}

/* Update confirmation message styles */
.donation-confirmation {
    max-width: 400px;
    margin: 1rem auto;
    padding: 0.75rem 1rem;
    background: linear-gradient(to right, rgba(37, 99, 235, 0.02), rgba(37, 99, 235, 0.08));
    border-left: 3px solid #2563eb;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.donation-confirmation.show {
    opacity: 1;
    transform: translateY(0);
}

.confirmation-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.confirmation-content i {
    color: #2563eb;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.confirmation-text {
    flex-grow: 1;
}

.confirmation-text p {
    margin: 0;
    line-height: 1.3;
}

.confirmation-text p:first-child {
    color: #1e293b;
    font-weight: 500;
}

.amount-display {
    font-weight: 600;
    color: #2563eb;
}

.impact-message {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.2rem !important;
}

/* Improve button states */
.amount-btn.selected {
    background: var(--primary);
    color: white;
    transform: scale(1.02);
    box-shadow: var(--box-shadow-md);
}

/* Add typing state styles */
.donation-confirmation.typing {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

.donation-confirmation.typing .impact-message {
    color: var(--gray-500);
    font-style: italic;
}

.donation-confirmation.typing i {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Improve input styles for better feedback */
.input-wrapper input {
    transition: all 0.3s ease;
}

.input-wrapper.typing {
    border-color: var(--gray-300);
}

.input-wrapper.typing input {
    color: var(--gray-600);
}

/* Large Donation Modal Styles */
.large-donation-message {
    font-size: 1.1rem;
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-content .bank-details {
    background: var(--primary-50);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.modal-content .detail-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.modal-content .label {
    font-weight: 600;
    color: var(--gray-700);
    min-width: 100px;
}

.modal-content .value {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--primary);
}

.modal-content .note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-top: 1rem;
    line-height: 1.4;
}

.modal-content .note i {
    color: var(--primary);
    margin-top: 0.2rem;
}

/* Donor Information Section */
.donor-info-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.donor-info-title {
    font-size: 1.2rem;
    color: #1e40af;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.donor-fields {
    display: grid;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
}

.checkbox-group label {
    margin-bottom: 0;
}

.field-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
    margin-left: 1.75rem;
    font-style: italic;
}

@media (min-width: 640px) {
    .donor-fields {
        grid-template-columns: 1fr 1fr;
    }
    
    .checkbox-group {
        grid-column: span 2;
    }
}