:root {
    /* Orange/Gold Theme Only */
    --primary: hsl(38, 92%, 58%);
    --primary-glow: hsl(38, 92%, 68%);
    --primary-hover: hsl(45, 100%, 50%);
    --background: #ffffff;
    --foreground: #1f2937;
    --card: #ffffff;
    --muted: #f1f5f9;
    --muted-foreground: #6b7280;
    --border: #e2e8f0;
    --radius: 0.75rem;
    --shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.4);
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
}

/* Base styles */
.donation-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: fade-in 500ms ease-in-out;
}

/* Box sizing fix for layout issues */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}
.progress-step {
    flex: 1;
    text-align: center;
}
.progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #999;
    transition: color 0.3s ease;
}
.progress-step.active .progress-label {
    color: var(--primary);
    font-weight: 700;
}
.progress-bar {
    height: 2px;
    background: var(--border);
    margin: 0 0.5rem;
    flex: 1;
    position: relative;
    border-radius: 1px;
}
.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-glow));
    transition: width 500ms ease;
    border-radius: 1px;
}

/* Step 1: Amount Selection */
.heart-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    display: block;
    fill: #dc2626;
}
.donation-header {
    text-align: center;
    margin-bottom: 2rem;
}
.donation-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.donation-subtitle {
    color: #666;
    font-size: 0.95rem;
}
.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.amount-button {
    position: relative;
    padding: 1.5rem 0.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    cursor: pointer;
    transition: all 300ms ease;
}
.amount-button:hover {
    border-color: var(--primary-hover) !important;
    background-color: rgba(255, 215, 0, 0.1) !important;
    box-shadow: 0 4px 15px -5px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}
.amount-button.selected {
    border-color: var(--primary) !important;
    background-color: rgba(245, 158, 11, 0.15) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 15px -5px rgba(245, 158, 11, 0.4);
}
.amount-value {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #000 !important;
    margin: 0 !important;
    line-height: 1.2;
}
.amount-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}
.amount-button.selected .amount-check {
    display: flex;
}

/* Custom Amount */
.custom-amount-wrapper {
    display: none;
    margin: 1.5rem 0;
}
.currency-input-group {
    position: relative;
}
.currency-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    font-weight: 500;
    pointer-events: none;
}
.custom-amount-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 4rem !important;
    font-size: 1.125rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    color: var(--foreground);
    transition: all 0.2s ease;
}
.custom-amount-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Security Info */
.security-info {
    margin-top: 2rem;
    text-align: center;
}
.security-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.security-icon {
    width: 1rem;
    height: 1rem;
    fill: var(--success);
}
.payment-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Step 2: Details Form */
.selected-amount-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: var(--foreground);
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0 auto 1.5rem;
}

/* Form Fields */
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--foreground);
}
.form-label .required {
    color: var(--error);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    color: var(--foreground);
    font-size: 1rem;
    transition: all 0.2s ease;
}
.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}
.form-control.error {
    border-color: var(--error);
}

/* Phone Input - FIXED WIDTH */
.phone-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.country-code {
    width: auto;
    min-width: 130px; /* NOT TOO LONG */
    flex-shrink: 0;
}
.country-code-display {
    font-weight: 600;
    color: var(--muted-foreground);
    padding: 0.75rem 1rem;
    background: var(--muted);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0;
}
.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
}
.checkbox-label {
    font-size: 0.875rem;
    color: var(--foreground);
    font-style: italic;
}

/* Dedication Section */
.dedication-section {
    margin: 2rem 0;
}
.dedication-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.dedication-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.dedication-fields {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--muted);
    border-radius: var(--radius);
}
.clear-selection-link {
    background: none;
    border: none;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin-top: 0.5rem;
    display: inline-block;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.clear-selection-link:hover {
    color: var(--primary);
    text-decoration: none;
    background: rgba(37, 99, 235, 0.1);
}

/* Project Selection */
.project-section {
    margin: 2rem 0;
    position: relative;
    min-height: 0;
}
.project-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    color: var(--foreground);
    font-size: 1rem;
    cursor: pointer;
}
.project-description {
    background: var(--muted);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 0;
    color: var(--foreground);
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 10;
}
.project-description.visible {
    opacity: 1;
    max-height: 200px;
    position: relative;
    margin-top: 1rem;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}
.btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: all 300ms ease;
    border: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: var(--foreground);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--foreground);
}
.btn-outline:hover:not(:disabled) {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: rgba(245, 158, 11, 0.05);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}
.toast.show {
    transform: translateX(0);
}
.toast.success {
    background: var(--success);
}
.toast.error {
    background: var(--error);
}
.toast.info {
    background: var(--info);
}

/* Animations */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step visibility */
.step {
    display: none;
    animation: fade-in 500ms ease-in-out;
}
.step.active {
    display: block;
}

/* Payment Status Page Styles */
.payment-status-container {
    max-width: 650px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
}
.status-header {
    margin-bottom: 2.5rem;
}
.status-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}
.status-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.status-message {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin: 0;
}
.status-success .status-icon { color: var(--success); }
.status-success .status-title { color: var(--success); }
.status-failed .status-icon { color: var(--error); }
.status-failed .status-title { color: var(--error); }
.status-pending .status-icon { color: var(--warning); }
.status-pending .status-title { color: var(--warning); }
.status-unknown .status-icon { color: var(--muted-foreground); }
.status-unknown .status-title { color: var(--muted-foreground); }

/* Transaction Summary */
.transaction-summary {
    background: var(--muted);
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    text-align: left;
}
.transaction-summary h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.summary-row:last-of-type {
    border-bottom: none;
}
.summary-row.important-notice {
    background: rgba(239, 68, 68, 0.1);
    margin: 1rem -1rem -1rem;
    padding: 1rem;
    border-radius: 0 0 var(--radius) var(--radius);
}
.label {
    font-weight: 600;
    color: var(--muted-foreground);
}
.value {
    font-weight: 500;
    color: var(--foreground);
}
.value.amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.action-buttons .btn {
    min-width: 150px;
    justify-content: center;
}
.pending-notice {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* Payment Status Page Buttons */
.status-button {
    flex: 1;
    min-width: 160px;
    max-width: 220px;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: all 300ms ease;
    border: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    line-height: 1.2;
}
.status-button[data-action="try-again"] {
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: var(--foreground);
    box-shadow: 0 4px 15px -5px rgba(245, 158, 11, 0.4);
}
.status-button[data-action="try-again"]:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}
.status-button[data-action="home"] {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--foreground);
}
.status-button[data-action="home"]:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: rgba(245, 158, 11, 0.05);
    transform: translateY(-2px);
}

/* Payment Icons */
.payment-icons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}
.payment-icon {
    height: 25px !important;
    width: auto !important;
    border: none !important;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.payment-icon:hover {
    opacity: 1;
}

/* DPO Logos */
.dpo-logo-small {
    margin-top: 0.75rem;
}
.dpo-logo-img {
    height: 48px !important;
    width: auto !important;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.dpo-logo-img:hover {
    opacity: 1;
}
.dpo-footer-logo {
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.dpo-logo-img-footer {
    height: 32px !important;
    width: auto !important;
    vertical-align: middle;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.dpo-logo-img-footer:hover {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .donation-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-row {
        grid-template-columns: 1fr !important; /* Force single column on mobile */
    }
    .phone-input-group {
        flex-direction: column; /* Stack on mobile */
    }
    .country-code {
        width: 100% !important; /* Full width on mobile */
        min-width: 100% !important;
    }
    .country-code {
        width: auto;
        min-width: 130px; 
        flex-shrink: 0;
        max-width: 150px;
    }
}
@media (min-width: 641px) {
    .form-row[name="first_name"],
    .form-row[name="last_name"] {
        grid-template-columns: 1fr 1fr !important;
    }
}