/* Enhanced donation goal tracker with live data indicators */
.donation-goal-tracker-v2 {
    position: relative;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-height: 100px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.donation-goal-tracker-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -2px rgba(0, 0, 0, 0.06);
    border-color: #3b82f6;
}

.donation-goal-tracker-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 16px 16px 0 0;
}

/* Live data indicator */
.donation-goal-tracker-v2::after {
    content: '';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse-live {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.goal-v2-widgets {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.goal-v2-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    min-width: 0; /* Allow flex shrinking */
}

/* Widget content layout - horizontal */
.widget-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.widget-info {
    text-align: left;
    min-width: 0; /* Allow text truncation if needed */
}

.raised-widget .widget-icon,
.donations-widget .widget-icon {
    font-size: 1.25rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.raised-widget .widget-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.raised-widget .widget-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer-effect 3s infinite;
}

.donations-widget .widget-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.donations-widget .widget-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer-effect 3s infinite 1s;
}

@keyframes shimmer-effect {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.widget-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1;
    transition: all 0.3s ease;
    position: relative;
}

.widget-value.updating {
    animation: value-update 0.6s ease;
}

@keyframes value-update {
    0% {
        transform: scale(1);
        color: #1f2937;
    }
    50% {
        transform: scale(1.1);
        color: #3b82f6;
    }
    100% {
        transform: scale(1);
        color: #1f2937;
    }
}

.donations-widget .widget-value {
    font-size: 1.5rem;
}

.widget-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.25px;
    margin: 0;
    margin-top: 2px;
}

/* Progress section - horizontal bar instead of circle */
.goal-v2-widget-progress {
    position: relative;
    flex: 1;
    max-width: 200px;
    min-width: 150px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6b7280, #9ca3af, #6b7280);
    border-radius: 4px;
    transition: width 0.8s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.progress-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.progress-goal-amount {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 600;
}

/* Last updated info - enhanced with live indicator */
.last-updated {
    position: absolute;
    bottom: -1.5rem;
    right: 0;
    font-size: 0.625rem;
    color: #9ca3af;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.last-updated::before {
    content: '🔄';
    font-size: 0.5rem;
    animation: rotate 2s linear infinite;
}

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

/* Mobile responsive adjustments - Enhanced design */
@media (max-width: 768px) {
    .donation-goal-tracker-v2 {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 12px;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border: 1px solid #e2e8f0;
        box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    }
    
    .donation-goal-tracker-v2::before {
        height: 3px;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    }
    
    .donation-goal-tracker-v2::after {
        top: 0.75rem;
        right: 0.75rem;
        width: 6px;
        height: 6px;
    }
    
    .goal-v2-widgets {
        gap: 0.75rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    .goal-v2-widget {
        justify-content: space-between;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 10px;
        border: 1px solid rgba(59, 130, 246, 0.1);
        backdrop-filter: blur(5px);
        transition: all 0.3s ease;
    }
    
    .goal-v2-widget:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
        border-color: rgba(59, 130, 246, 0.2);
    }
    
    .goal-v2-widget-progress {
        max-width: none;
        min-width: 0;
    }
    
    .progress-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .progress-info {
        justify-content: space-between;
        align-items: center;
    }
    
    .widget-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 1.1rem !important;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2) !important;
    }
    
    .raised-widget .widget-icon {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
    }
    
    .donations-widget .widget-icon {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
    }
    
    .widget-value {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
    }
    
    .widget-label {
        font-size: 0.7rem !important;
        color: #6b7280 !important;
    }
    
    .progress-bar-container {
        height: 6px !important;
    }
    
    .progress-bar {
        background: linear-gradient(90deg, #6b7280, #9ca3af, #6b7280) !important;
        box-shadow: 0 1px 3px rgba(107, 114, 128, 0.3) !important;
    }
    
    .progress-percentage {
        font-size: 1.1rem !important;
        background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
    }
    
    .last-updated {
        position: static;
        text-align: center;
        margin-top: 0.75rem;
        border-top: 1px solid rgba(59, 130, 246, 0.1);
        padding-top: 0.75rem;
        font-size: 0.6rem !important;
    }
    
    .last-updated::before {
        font-size: 0.4rem !important;
    }
    
    /* Mobile-specific animations */
    .widget-value.updating {
        animation: value-update-mobile 0.6s ease !important;
    }
    
    @keyframes value-update-mobile {
        0% {
            transform: scale(1);
            color: #1f2937;
        }
        50% {
            transform: scale(1.05);
            color: #3b82f6;
        }
        100% {
            transform: scale(1);
            color: #1f2937;
        }
    }
    
    /* Enhanced mobile hover effects */
    .goal-v2-widget:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Mobile touch feedback */
    .widget-icon:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .donation-goal-tracker-v2 {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .goal-v2-widgets {
        gap: 0.5rem;
    }
    
    .goal-v2-widget {
        padding: 0.5rem;
    }
    
    .widget-icon {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 0.9rem !important;
    }
    
    .widget-value {
        font-size: 1.25rem !important;
    }
    
    .widget-label {
        font-size: 0.65rem !important;
    }
    
    .progress-percentage {
        font-size: 1rem !important;
    }
    
    .progress-bar-container {
        height: 5px !important;
    }
    
    .last-updated {
        font-size: 0.55rem !important;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .last-updated::before {
        font-size: 0.35rem !important;
    }
}

/* RTL Support */
[dir="rtl"] .goal-v2-widgets {
    direction: rtl;
}

[dir="rtl"] .widget-info {
    text-align: right;
}

[dir="rtl"] .progress-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .last-updated {
    right: auto;
    left: 0;
}

/* Error and Loading States */
.donation-goal-tracker.error {
    padding: 1rem 1.5rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    text-align: center;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #dc2626;
}

.error-message i {
    font-size: 1.5rem;
    opacity: 0.8;
}

.retry-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Loading state */
.donation-goal-tracker-v2.loading {
    opacity: 0.7;
    pointer-events: none;
}

.donation-goal-tracker-v2.loading .widget-value,
.donation-goal-tracker-v2.loading .progress-percentage {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 2s infinite;
    color: transparent;
    border-radius: 4px;
    min-width: 60px;
    min-height: 20px;
}

@keyframes loading-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
} 

/* Credit Card Form Styles */
.credit-card-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.credit-card-section h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.25rem;
}

.credit-card-form {
    margin-top: 1rem;
}

.mollie-component-container {
    min-height: 50px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.mollie-component-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Ensure credit card form is properly hidden by default */
.credit-card-section[style*="display: none"] {
    display: none !important;
}

/* Payment method selection styles */
.payment-method.selected {
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

.payment-method.selected .payment-method-icon {
    color: #10b981;
}

.payment-method.selected .payment-method-name {
    color: #10b981;
    font-weight: 600;
}