/* Payment Pages - Modern Professional Styling */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.08);
    --primary-focus: rgba(79, 70, 229, 0.2);
    --success: #059669;
    --success-light: rgba(5, 150, 105, 0.1);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --bg-page: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.donation-page {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: var(--bg-page);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: relative;
}

.donation-page-bg {
    display: none;
}

.donation-page .container {
    position: relative;
}

/* Header - Centered */
.donation-header {
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donation-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.donation-logo {
    max-height: 72px;
    height: auto;
}

.donation-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    margin-bottom: 0.25rem;
}

.donation-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Alert */
.donation-alert {
    border-radius: 0.75rem;
    border: none;
}

/* Form Box - Centered bordered layout */
.donation-form-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    max-width: 480px;
    margin: 0 auto;
    transition: box-shadow 0.2s ease;
}

.donation-form-box:hover {
    box-shadow: var(--card-shadow-hover);
}

.donation-form-inner {
    padding: 1.5rem 1.5rem;
}

@media (min-width: 768px) {
    .donation-form-inner {
        padding: 1.75rem 2rem;
    }
}

.donation-form-box .form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    display: block;
}

.donation-form-box .form-label-required {
    color: var(--text-secondary);
    font-weight: 500;
}

.donation-form-box .form-label-optional {
    color: var(--text-muted);
    font-weight: 400;
}

.donation-form-box .form-control,
.donation-form-box .form-select {
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.donation-form-box .form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.donation-form-box .form-select:invalid,
.donation-form-box .form-select option[value=""] {
    color: var(--text-muted);
}

.donation-form-box .form-control:hover,
.donation-form-box .form-select:hover {
    border-color: #d1d5db;
}

.donation-form-box .form-control:focus,
.donation-form-box .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus);
    outline: none;
}

.donation-form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Payment Type Toggle (legacy) */
.donation-type-toggle {
    display: flex;
    gap: 0;
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 4px;
}

.donation-type-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.donation-type-btn:hover {
    color: var(--text-primary);
}

.donation-type-toggle .btn-check:checked + .donation-type-btn {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Amount Presets */
.donation-amount-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}


.donation-amount-btn {
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.donation-amount-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.donation-amount-input {
    font-weight: 600;
    font-size: 1.0625rem;
}

/* Submit Button */
.btn-donate {
    background: var(--primary);
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: #fff;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-donate:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-donate:active {
    transform: translateY(0);
}

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

.btn-donate-centered {
    min-width: 220px;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Result Cards */
.donation-result-card {
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
}

/* Success page specific */
.donation-result-card .text-success {
    color: var(--success) !important;
}

/* Receipt (success page) */
.receipt-box {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem 1.75rem;
    box-shadow: var(--card-shadow);
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-light);
}

.receipt-row:last-child {
    border-bottom: none;
}

.receipt-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.receipt-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.success-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon-wrap svg {
    width: 32px;
    height: 32px;
    color: var(--success);
}

@media print {
    .no-print {
        display: none !important;
    }
    .donation-page {
        background: #fff !important;
    }
    .receipt-box {
        box-shadow: none;
        border: 1px solid #d1d5db;
    }
}

/* Responsive */
@media (max-width: 576px) {
    .donation-form-box {
        max-width: 100%;
    }
    .donation-form-inner {
        padding: 1.25rem 1.25rem;
    }
    .donation-title {
        font-size: 1.5rem;
    }
    .donation-type-btn {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
    .donation-amount-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }
}
