/* Enhanced Frontend Styles for Charity Donation Tracker */

/* Shortcode Container Styles */
.cdt-shortcode-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    margin: 25px 0;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cdt-shortcode-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.cdt-shortcode-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.cdt-shortcode-value {
    font-size: 3em;
    font-weight: 800;
    margin: 15px 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    background: linear-gradient(45deg, #ffffff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cdt-shortcode-label {
    font-size: 1.2em;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
}

/* Progress Bar Styles */
.cdt-donation-progress {
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    height: 12px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.cdt-donation-progress-bar {
    background: linear-gradient(90deg, #4ade80, #22c55e, #16a34a);
    height: 100%;
    border-radius: 25px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cdt-donation-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Minimal Styles */
.cdt-minimal-total,
.cdt-minimal-count {
    display: inline-block;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1em;
    border: 2px solid #0ea5e9;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
    transition: all 0.3s ease;
}

.cdt-minimal-total:hover,
.cdt-minimal-count:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

/* Legacy Support */
.cdt-donation-display {
    display: inline-block;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 15px 25px;
    border-radius: 12px;
    border-left: 5px solid #0073aa;
    margin: 15px 0;
    font-weight: 600;
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cdt-donation-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.cdt-donation-total {
    color: #059669;
    font-size: 1.2em;
}

.cdt-donation-count {
    color: #dc2626;
    font-size: 1.2em;
}

/* Card Grid Layout */
.cdt-donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cdt-shortcode-container {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .cdt-shortcode-value {
        font-size: 2.2em;
    }
    
    .cdt-shortcode-label {
        font-size: 1em;
        letter-spacing: 1px;
    }
    
    .cdt-donation-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .cdt-shortcode-value {
        font-size: 1.8em;
    }
    
    .cdt-shortcode-container {
        padding: 15px 10px;
    }
}

/* Animation Classes */
.cdt-fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.cdt-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success/Error Messages */
.cdt-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
    text-align: center;
}

.cdt-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.cdt-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.cdt-message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Loading States */
.cdt-loading-overlay {
    position: relative;
}

.cdt-loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

.cdt-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}