/**
 * GiverLever - Public Styles
 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   These can be overridden by template CSS
   ============================================ */
.giverlever-container {
    /* Colors - Primary */
    --giverlever-primary: #0073aa;
    --giverlever-primary-hover: #005a87;
    --giverlever-primary-light: #f0f8ff;

    /* Colors - Semantic */
    --giverlever-success: #00a32a;
    --giverlever-success-light: #e8f5e9;
    --giverlever-warning: #dba617;
    --giverlever-warning-light: #fffbcc;
    --giverlever-error: #d63638;
    --giverlever-error-light: #ffebe9;

    /* Colors - Neutral */
    --giverlever-text: #1d2327;
    --giverlever-text-muted: #50575e;
    --giverlever-bg: #ffffff;
    --giverlever-bg-subtle: #f6f7f7;
    --giverlever-border: #ddd;
    --giverlever-border-hover: #c3c4c7;

    /* Typography */
    --giverlever-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --giverlever-font-size-sm: 13px;
    --giverlever-font-size-base: 14px;
    --giverlever-font-size-lg: 16px;
    --giverlever-font-size-xl: 18px;
    --giverlever-font-size-2xl: 24px;
    --giverlever-font-size-3xl: 28px;

    /* Spacing */
    --giverlever-space-xs: 4px;
    --giverlever-space-sm: 8px;
    --giverlever-space-md: 12px;
    --giverlever-space-lg: 16px;
    --giverlever-space-xl: 24px;
    --giverlever-space-2xl: 30px;

    /* Border Radius */
    --giverlever-radius-sm: 4px;
    --giverlever-radius-md: 6px;
    --giverlever-radius-lg: 8px;
    --giverlever-radius-full: 9999px;

    /* Shadows */
    --giverlever-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --giverlever-shadow-md: 0 2px 8px rgba(0,0,0,0.1);
    --giverlever-shadow-lg: 0 4px 16px rgba(0,0,0,0.12);

    /* Transitions */
    --giverlever-transition-fast: 0.15s ease;
    --giverlever-transition-base: 0.2s ease;
    --giverlever-transition-slow: 0.3s ease;
}

/* Container */
.giverlever-container {
    max-width: 600px;
    margin: 40px auto;
    font-family: var(--giverlever-font-family);
}

/* Steps */
.giverlever-step {
    display: none;
}

.giverlever-step.active {
    display: block;
}

.giverlever-step-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.giverlever-step-content h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 24px;
    color: #1d2327;
}

.step-description {
    color: #50575e;
    margin-bottom: 24px;
}

/* Amount Selection */
.giverlever-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.giverlever-amount-btn {
    flex: 1 1 auto;
    min-width: 80px;
}

.giverlever-amount-btn {
    padding: 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.giverlever-amount-btn:hover {
    border-color: var(--giverlever-primary);
    background: #f0f8ff;
}

.giverlever-amount-btn.active {
    border-color: var(--giverlever-primary);
    background: var(--giverlever-primary);
    color: white;
}

/* Custom Amount + Frequency Inline Row */
.giverlever-custom-amount-row {
    margin: 24px 0;
}

.giverlever-custom-amount-row > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d2327;
}

.giverlever-custom-amount-inline {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.giverlever-custom-amount-inline .giverlever-amount-input {
    flex: 0 1 210px;
    min-width: 140px;
}

.giverlever-custom-amount-inline .giverlever-frequency {
    margin: 0;
    flex: 1;
}

.giverlever-custom-amount-inline .giverlever-frequency-option {
    padding: 12px 16px;
}

.giverlever-amount-input {
    position: relative;
    display: flex;
    align-items: center;
}

.giverlever-amount-input .currency-symbol {
    position: absolute;
    left: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #50575e;
    pointer-events: none;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
}

.giverlever-amount-input input {
    width: 100%;
    padding: 14px 14px 14px 30px !important;
    border: 2px solid var(--giverlever-border);
    border-radius: var(--giverlever-radius-sm);
    font-size: 18px;
    box-sizing: border-box;
}

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

/* Frequency Toggle */
.giverlever-frequency {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.giverlever-frequency-option {
    flex: 1;
    padding: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.giverlever-frequency-option:hover {
    border-color: var(--giverlever-primary);
    background: #f0f8ff;
}

.giverlever-frequency-option.active {
    border-color: var(--giverlever-primary);
    background: var(--giverlever-primary);
    color: white;
}

.giverlever-frequency-option input {
    display: none;
}

.giverlever-frequency-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.giverlever-frequency-option.warning {
    border-color: #dba617;
    background: #fffbcc;
    color: #664d03;
}

.giverlever-frequency-option.warning.active {
    background: #fffbcc;
    border-color: #dba617;
    color: #664d03;
}

/* Monthly Limit Warning */
.giverlever-monthly-limit-warning {
    background: #fff3cd;
    border-left: 4px solid #dba617;
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 4px;
}

.giverlever-monthly-limit-warning .warning-text {
    margin: 0;
    font-size: 14px;
    color: #664d03;
    line-height: 1.5;
}

/* Tax Credit Display */
.giverlever-tax-credit {
    margin: 24px 0;
}

.tax-credit-box {
    background: #fffbcc;
    border-left: 4px solid #ffc107;
    padding: 16px;
    border-radius: 4px;
}

.tax-credit-label {
    font-size: 14px;
    color: #5c4a00;
    margin: 0 0 8px 0;
}

.tax-credit-amount {
    font-size: 28px;
    font-weight: 700;
    color: #0073aa;
    margin: 0 0 8px 0;
}

.tax-credit-effective,
.tax-credit-effective-cost {
    font-size: 14px;
    margin: 4px 0;
}

/* Limit Indicator */
.giverlever-limit-indicator {
    background: var(--giverlever-bg-subtle, #f0f8ff);
    padding: 16px;
    border-radius: 6px;
    margin: 16px 0;
    border-left: 4px solid var(--giverlever-primary, #0073aa);
}

.giverlever-limit-indicator p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--giverlever-text, #1d2327);
    line-height: 1.5;
}

.giverlever-limit-indicator strong {
    color: var(--giverlever-primary, #0073aa);
    font-weight: 600;
}

/* Donor History (Returning Donors) */
.giverlever-donor-history {
    margin: 16px 0;
}

.donor-history-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 16px;
    border-radius: 4px;
}

.donor-history-box h4 {
    margin: 0 0 8px 0;
    color: #2e7d32;
    font-size: 16px;
}

.donor-history-summary {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #1d2327;
}

.donor-history-list {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.donor-history-list .history-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.donor-history-list .history-items li {
    padding: 6px 0;
    font-size: 13px;
    color: #50575e;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.donor-history-list .history-items li:last-child {
    border-bottom: none;
}

.donor-history-list .history-date {
    color: #1d2327;
}

.donor-history-list .history-amount {
    font-weight: 600;
    color: #2e7d32;
}

.donor-history-list .no-history {
    font-size: 13px;
    color: #50575e;
    margin: 0;
    font-style: italic;
}

/* Form Fields */
.giverlever-email-capture,
.giverlever-field {
    margin-bottom: var(--giverlever-space-md);
}

.giverlever-email-capture label,
.giverlever-field label {
    display: block;
    margin-bottom: var(--giverlever-space-xs);
    font-weight: 500;
    color: var(--giverlever-text);
}

.giverlever-email-capture input,
.giverlever-field input,
.giverlever-field select,
.giverlever-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--giverlever-border);
    border-radius: var(--giverlever-radius-sm);
    font-size: var(--giverlever-font-size-base);
    box-sizing: border-box;
}

.giverlever-email-capture input:focus,
.giverlever-field input:focus,
.giverlever-field select:focus,
.giverlever-field textarea:focus {
    outline: none;
    border-color: var(--giverlever-primary);
}

.field-description {
    font-size: var(--giverlever-font-size-sm);
    color: var(--giverlever-text-muted);
    margin: var(--giverlever-space-xs) 0 0 0;
}

/* Form Grid */
.giverlever-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px 18px;
}

.giverlever-field-full {
    grid-column: 1 / -1;
}

/* Three columns for city, province, postal code */
.giverlever-field-third {
    flex: 1;
}

.giverlever-city-row {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1.1fr;
    gap: 14px 18px;
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .giverlever-form-grid {
        grid-template-columns: 1fr;
    }
    
    .giverlever-city-row {
        grid-template-columns: 1fr;
    }
}

/* Summary Box */
.giverlever-summary-box {
    background: #f6f7f7;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.giverlever-summary-box p {
    margin: 8px 0;
}

.giverlever-order-summary {
    background: #f0f8ff;
}

.giverlever-order-summary h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #1d2327;
}

.summary-line-total {
    font-size: 18px;
    padding-top: 12px;
}

.summary-tax-credit {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--giverlever-primary);
}

.summary-tax-credit p {
    margin: 4px 0;
}

.tax-credit-note {
    font-size: 13px;
    color: #50575e;
}

/* Cover Fees */
.giverlever-cover-fees {
    margin: 24px 0;
}

.giverlever-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.giverlever-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--giverlever-primary);
}

.fee-amount {
    color: #50575e;
    font-size: 14px;
}

/* Payment Section */
.giverlever-payment-section {
    margin: 24px 0;
}

.giverlever-payment-section h3 {
    margin-bottom: 8px;
}

.payment-description {
    color: #50575e;
    margin-bottom: 16px;
}

/* Payment Request Button (Apple Pay / Google Pay) */
.giverlever-payment-request-button {
    margin-bottom: 0;
}

.giverlever-payment-request-button:empty {
    display: none;
}

/* Payment method divider */
.giverlever-payment-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #50575e;
    font-size: 13px;
}

.giverlever-payment-divider::before,
.giverlever-payment-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.giverlever-payment-divider span {
    padding: 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.giverlever-card-element {
    padding: 12px;
    border: 1px solid var(--giverlever-border);
    border-radius: var(--giverlever-radius-sm);
    background: var(--giverlever-bg);
}

.giverlever-card-errors {
    color: #d63638;
    margin-top: 8px;
    font-size: 14px;
}

/* Terms */
.giverlever-terms {
    margin: 24px 0;
    padding: 16px;
    background: #f6f7f7;
    border-radius: 4px;
}

.giverlever-terms .giverlever-checkbox-label span {
    color: #1d2327;
}

/* Buttons */
.giverlever-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.giverlever-btn-primary {
    background: var(--giverlever-primary);
    color: white;
}

.giverlever-btn-primary:hover:not(:disabled) {
    background: var(--giverlever-primary-hover);
}

.giverlever-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.giverlever-btn-secondary {
    background: #f0f0f1;
    color: #1d2327;
}

.giverlever-btn-secondary:hover {
    background: #dcdcde;
}

.giverlever-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

.giverlever-actions .giverlever-btn {
    flex: 1;
}

/* Button Spinner */
.button-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Error Messages */
.giverlever-error {
    background: #ffebe9;
    border-left: 4px solid #d63638;
    padding: 12px;
    margin: 16px 0;
    color: #d63638;
    border-radius: 4px;
}

/* Email Typo Suggestion */
.giverlever-email-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--giverlever-warning-light, #fffbcc);
    border-left: 4px solid var(--giverlever-warning, #dba617);
    padding: 10px 12px;
    margin: 8px 0 0;
    border-radius: 4px;
    font-size: 14px;
    color: var(--giverlever-text, #1d2327);
}

.giverlever-email-suggestion__text {
    flex: 1;
    min-width: 0;
}

.giverlever-email-suggestion__accept,
.giverlever-email-suggestion__dismiss {
    border: none;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.giverlever-email-suggestion__accept {
    background: var(--giverlever-primary, #0073aa);
    color: #fff;
}

.giverlever-email-suggestion__accept:hover {
    background: var(--giverlever-primary-hover, #005a87);
}

.giverlever-email-suggestion__dismiss {
    background: transparent;
    color: var(--giverlever-text-muted, #50575e);
    text-decoration: underline;
}

/* Secure Notice */
.giverlever-secure-notice {
    text-align: center;
    color: #50575e;
    font-size: 14px;
    margin-top: 16px;
}

.giverlever-security-badges {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.giverlever-security-badges p {
    font-size: 13px;
    color: #50575e;
    text-align: center;
}

/* Disclaimer */
.giverlever-disclaimer {
    margin-top: 20px;
    padding: 16px;
    background: #f6f7f7;
    border-radius: 4px;
    border-left: 3px solid var(--giverlever-primary);
}

.giverlever-disclaimer p {
    margin: 0;
    font-size: 13px;
    color: #50575e;
    line-height: 1.5;
}

/* Success Message */
.giverlever-success {
    text-align: center;
    padding: 60px 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #00a32a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 24px;
}

.giverlever-success h2 {
    color: #00a32a;
    margin-bottom: 16px;
    font-size: 28px;
    font-weight: 700;
}

.giverlever-success p {
    color: #1d2327;
    font-size: 16px;
    line-height: 1.6;
    margin: 12px 0;
}

.giverlever-success p strong {
    color: #1d2327;
    font-weight: 600;
}

.success-actions {
    margin-top: 32px;
}

/* Payment Processing Overlay */
.giverlever-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.giverlever-processing-overlay.active {
    opacity: 1;
    visibility: visible;
}

.giverlever-processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--giverlever-primary, #0073aa);
    border-radius: 50%;
    animation: giverlever-processing-spin 1s linear infinite;
    margin-bottom: 24px;
}

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

.giverlever-processing-text {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}

.giverlever-processing-subtext {
    font-size: 14px;
    color: #50575e;
}

/* Processing steps indicator */
.giverlever-processing-steps {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.giverlever-processing-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #50575e;
    transition: color 0.3s ease;
}

.giverlever-processing-step.active {
    color: #1d2327;
    font-weight: 500;
}

.giverlever-processing-step.completed {
    color: #00a32a;
}

.giverlever-processing-step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    font-size: 12px;
    transition: all 0.3s ease;
}

.giverlever-processing-step.active .giverlever-processing-step-icon {
    background: var(--giverlever-primary, #0073aa);
    color: white;
    animation: giverlever-pulse 1.5s ease infinite;
}

.giverlever-processing-step.completed .giverlever-processing-step-icon {
    background: #00a32a;
    color: white;
}

/* Contributor Message */
.giverlever-message-field {
    margin-top: 20px;
}

.giverlever-message-field label {
    display: block;
    margin-bottom: var(--giverlever-space-xs);
    font-weight: 500;
    color: var(--giverlever-text);
}

.giverlever-message-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--giverlever-border);
    border-radius: var(--giverlever-radius-sm);
    font-size: var(--giverlever-font-size-base);
    box-sizing: border-box;
    font-family: var(--giverlever-font-family);
    resize: vertical;
}

.giverlever-message-field textarea:focus {
    outline: none;
    border-color: var(--giverlever-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .giverlever-container {
        margin: 20px 15px;
    }

    .giverlever-step-content {
        padding: 20px;
    }

    .giverlever-step-content h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .giverlever-amounts {
        flex-wrap: wrap;
    }

    .giverlever-amounts .giverlever-amount-btn {
        flex: 1 1 calc(50% - 6px);
        min-width: calc(50% - 6px);
        padding: 14px 12px;
        font-size: 16px;
    }

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

    .giverlever-actions {
        flex-direction: column-reverse;
    }

    /* Custom amount + frequency inline on mobile — stack vertically */
    .giverlever-custom-amount-inline {
        flex-direction: column;
    }

    .giverlever-custom-amount-inline .giverlever-frequency {
        flex-direction: row;
        gap: 10px;
    }

    .giverlever-custom-amount-inline .giverlever-frequency-option {
        padding: 14px;
    }

    /* Tax credit box mobile */
    .tax-credit-amount {
        font-size: 24px;
    }

    /* Summary box mobile */
    .summary-line-total {
        font-size: 16px;
    }

    /* Terms section mobile */
    .giverlever-terms {
        padding: 14px;
    }

    .giverlever-checkbox-label span {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Larger checkboxes on mobile for better touch targets */
    .giverlever-checkbox-label input[type="checkbox"] {
        width: 22px;
        height: 22px;
        margin-right: 12px;
        margin-top: 0;
    }

    /* Success screen mobile */
    .giverlever-success {
        padding: 40px 20px;
    }

    .giverlever-success h2 {
        font-size: 22px;
    }

    .giverlever-success .success-icon {
        width: 70px;
        height: 70px;
        font-size: 40px;
    }

    /* Processing overlay mobile */
    .giverlever-processing-overlay {
        padding: 20px;
    }

    .giverlever-processing-text {
        font-size: 16px;
        text-align: center;
    }

    .giverlever-processing-subtext {
        font-size: 13px;
        text-align: center;
    }

    .giverlever-processing-steps {
        width: 100%;
        max-width: 280px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .giverlever-container {
        margin: 15px 10px;
    }

    .giverlever-step-content {
        padding: 16px;
    }

    .giverlever-step-content h2 {
        font-size: 18px;
    }

    .giverlever-amounts .giverlever-amount-btn {
        padding: 12px 10px;
        font-size: 15px;
    }

    .giverlever-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* ============================================
   Social Proof
   ============================================ */
.giverlever-social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--giverlever-space-sm);
    padding: var(--giverlever-space-md) var(--giverlever-space-lg);
    background: var(--giverlever-bg-subtle);
    border-radius: var(--giverlever-radius-md);
    margin-bottom: var(--giverlever-space-xl);
    font-size: var(--giverlever-font-size-base);
    color: var(--giverlever-text-muted);
}

.giverlever-social-proof-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.giverlever-social-proof-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--giverlever-primary);
}

.giverlever-social-proof-count {
    font-weight: 600;
    color: var(--giverlever-text);
}

/* ============================================
   Goal Progress
   ============================================ */
.giverlever-goal {
    margin-bottom: var(--giverlever-space-xl);
}

.giverlever-goal-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--giverlever-space-sm);
}

.giverlever-goal-label {
    font-size: var(--giverlever-font-size-sm);
    font-weight: 600;
    color: var(--giverlever-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.giverlever-goal-amounts {
    font-size: var(--giverlever-font-size-sm);
    color: var(--giverlever-text-muted);
}

.giverlever-goal-current {
    font-weight: 600;
    color: var(--giverlever-primary);
}

.giverlever-goal-bar {
    height: 12px;
    background: var(--giverlever-bg-subtle);
    border-radius: var(--giverlever-radius-full);
    overflow: hidden;
    position: relative;
}

.giverlever-goal-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--giverlever-primary), var(--giverlever-primary-hover));
    border-radius: var(--giverlever-radius-full);
    transition: width 1s ease-out;
    min-width: 0;
}

.giverlever-goal-percentage {
    position: absolute;
    right: var(--giverlever-space-sm);
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Hide percentage text when bar is too small */
.giverlever-goal-fill[style*="width: 0"] .giverlever-goal-percentage,
.giverlever-goal-fill[style*="width: 1%"] .giverlever-goal-percentage,
.giverlever-goal-fill[style*="width: 2%"] .giverlever-goal-percentage,
.giverlever-goal-fill[style*="width: 3%"] .giverlever-goal-percentage,
.giverlever-goal-fill[style*="width: 4%"] .giverlever-goal-percentage,
.giverlever-goal-fill[style*="width: 5%"] .giverlever-goal-percentage {
    display: none;
}

/* User's pending contribution indicator */
.giverlever-goal-pending {
    color: var(--giverlever-success);
    font-weight: 700;
}

/* Goal bar with pending contribution - pulsing glow effect */
.giverlever-goal-fill.with-pending {
    animation: giverlever-goal-pulse 1.5s ease infinite;
}

@keyframes giverlever-goal-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 163, 42, 0.4);
    }
    50% {
        box-shadow: 0 0 12px 3px rgba(0, 163, 42, 0.5);
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes giverlever-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes giverlever-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

@keyframes giverlever-confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* Amount button selection animation */
.giverlever-amount-btn.active {
    animation: giverlever-bounce 0.3s ease;
}

/* Step transition */
.giverlever-step.active {
    animation: giverlever-slide-up 0.3s ease;
}

/* ============================================
   Success Celebration (confetti effect)
   ============================================ */
.giverlever-success-celebration {
    position: relative;
    overflow: hidden;
}

.giverlever-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    animation: giverlever-confetti 1s ease-out forwards;
}

/* Success checkmark animation */
@keyframes giverlever-checkmark {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(-45deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.giverlever-success .success-icon {
    animation: giverlever-checkmark 0.6s ease-out;
}

/* ============================================
   Payment Method Selector
   ============================================ */
.giverlever-payment-method-selector {
    margin: 24px 0;
}

.giverlever-payment-method-selector > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--giverlever-text);
}

.giverlever-payment-method-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.giverlever-payment-method-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--giverlever-space-sm);
    padding: 16px 12px;
    border: 2px solid var(--giverlever-border);
    border-radius: var(--giverlever-radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--giverlever-transition-base);
    background: var(--giverlever-bg);
}

.giverlever-payment-method-option:hover {
    border-color: var(--giverlever-primary);
    background: var(--giverlever-primary-light);
}

.giverlever-payment-method-option.active {
    border-color: var(--giverlever-primary);
    background: var(--giverlever-primary-light);
    box-shadow: 0 0 0 1px var(--giverlever-primary);
}

.giverlever-payment-method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.giverlever-pm-icon {
    width: 28px;
    height: 28px;
    color: var(--giverlever-text-muted);
    transition: color var(--giverlever-transition-base);
    flex-shrink: 0;
}

.giverlever-payment-method-option.active .giverlever-pm-icon {
    color: var(--giverlever-primary);
}

.giverlever-payment-method-option span {
    font-size: var(--giverlever-font-size-sm);
    font-weight: 500;
    color: var(--giverlever-text);
    line-height: 1.3;
}

.giverlever-payment-method-option.active span {
    color: var(--giverlever-primary);
    font-weight: 600;
}

/* ============================================
   Pledge Instructions (E-Transfer, Cheque)
   ============================================ */
.giverlever-pledge-instructions {
    margin: 24px 0;
    animation: giverlever-slide-up 0.3s ease;
}

.giverlever-instructions-box {
    background: var(--giverlever-primary-light);
    border-left: 4px solid var(--giverlever-primary);
    padding: 20px 24px;
    border-radius: var(--giverlever-radius-sm);
}

.giverlever-instructions-box h3 {
    margin: 0 0 12px 0;
    font-size: var(--giverlever-font-size-lg);
    color: var(--giverlever-text);
}

.giverlever-instructions-box p {
    margin: 8px 0;
    font-size: var(--giverlever-font-size-base);
    color: var(--giverlever-text);
    line-height: 1.6;
}

.giverlever-instruction-detail {
    font-size: var(--giverlever-font-size-xl) !important;
    text-align: center;
    padding: 12px 0;
}

.giverlever-instruction-detail strong {
    color: var(--giverlever-primary);
}

.giverlever-instruction-address {
    white-space: pre-line;
    font-family: inherit;
    background: var(--giverlever-bg);
    padding: 12px 16px;
    border-radius: var(--giverlever-radius-sm);
    border: 1px solid var(--giverlever-border);
    margin: 12px 0;
}

.giverlever-instruction-note {
    font-size: var(--giverlever-font-size-sm) !important;
    color: var(--giverlever-text-muted) !important;
    font-style: italic;
}

/* ============================================
   Payment Method Selector - Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
    .giverlever-payment-method-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .giverlever-payment-method-option {
        padding: 14px 10px;
    }

    .giverlever-payment-method-option span {
        font-size: 12px;
    }

    .giverlever-pm-icon {
        width: 24px;
        height: 24px;
    }

    /* Pledge instructions mobile */
    .giverlever-instructions-box {
        padding: 16px;
    }

    .giverlever-instruction-detail {
        font-size: var(--giverlever-font-size-lg) !important;
    }
}

@media (max-width: 400px) {
    .giverlever-payment-method-options {
        grid-template-columns: 1fr;
    }

    .giverlever-payment-method-option {
        flex-direction: row;
        justify-content: center;
        padding: 12px;
    }
}
