/* ==================================================================
   SIMPLE CAMPAIGN GRID - LIGHTWEIGHT DESIGN
   Fast-loading campaign selection similar to amount grid
================================================================== */

/* Campaign Section */
.campaign-section {
    margin: 2rem 0;
}

/* Loading Placeholder */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-placeholder p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* Auto-extend notification */
.auto-extend-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
}

.auto-extend-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notification-content i {
    font-size: 1.5rem;
    color: #fbbf24;
    margin-top: 0.25rem;
}

.notification-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.notification-text p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Campaign Grid */
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Campaign Option Cards */
.campaign-option {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.campaign-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.campaign-option:hover::before {
    left: 100%;
}

.campaign-option:hover {
    border-color: #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
    transform: translateY(-4px) scale(1.02);
}

.campaign-option.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

.campaign-option.active::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    animation: checkmarkBounce 0.6s ease-out;
    z-index: 2;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3);
    }
    100% {
        box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5);
    }
}

@keyframes checkmarkBounce {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(360deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Campaign Tags */
.campaign-tags {
    margin-bottom: 0.75rem;
}

.campaign-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.campaign-tag.urgent {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Campaign Content */
.campaign-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.campaign-description {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Progress Section */
.campaign-progress {
    margin-top: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-info .raised {
    font-weight: 600;
    color: #10b981;
}

.progress-info .goal {
    color: #64748b;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669, #10b981);
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    animation: gradientShift 3s ease-in-out infinite;
    position: relative;
}

.campaign-option:hover .progress-fill {
    animation: gradientShift 1.5s ease-in-out infinite, progressPulse 0.6s ease-out;
}

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

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes progressPulse {
    0% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.2);
    }
    100% {
        transform: scaleY(1);
    }
}

/* Featured Image Styles */
.campaign-featured-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.campaign-option:hover .featured-image {
    transform: scale(1.05);
}

/* Campaign Content Container */
.campaign-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Campaign Header with Labels */
.campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.campaign-labels {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: center;
    overflow: hidden;
    min-width: 0;
}

/* Improved Label Base Styles */
.status-label,
.priority-label,
.category-label {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.025em;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Status Labels - Clear and intuitive */
.status-active {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.status-active::before {
    content: "●";
    color: #10b981;
    font-size: 0.75rem;
}

.status-paused {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.status-paused::before {
    content: "⏸";
    color: #f59e0b;
    font-size: 0.75rem;
}

.status-completed {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.status-completed::before {
    content: "✓";
    color: #3b82f6;
    font-size: 0.75rem;
}

.status-urgent {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
    animation: pulse-urgent 2s infinite;
}

.status-urgent::before {
    content: "⚠";
    color: #ef4444;
    font-size: 0.75rem;
}

@keyframes pulse-urgent {
    0%, 100% { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3), 0 0 0 2px rgba(239, 68, 68, 0.1); }
}

/* Priority Labels - Clear hierarchy */
.priority-normal {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.priority-normal::before {
    content: "○";
    color: #64748b;
    font-size: 0.75rem;
}

.priority-high {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.priority-high::before {
    content: "◐";
    color: #f59e0b;
    font-size: 0.75rem;
}

.priority-urgent {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.priority-urgent::before {
    content: "●";
    color: #ef4444;
    font-size: 0.75rem;
}

.priority-urgent {
    background: #ef4444;
    color: white;
}

/* Category Labels - Distinctive but not overwhelming */
.category-label {
    background: #8b5cf6;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .campaign-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .campaign-content {
        padding: 1.25rem;
    }
    
    .campaign-featured-image {
        height: 150px;
    }
    
    .campaign-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .campaign-labels {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .campaign-labels::-webkit-scrollbar {
        display: none;
    }
    
    .status-label,
    .priority-label,
    .category-label {
        padding: 3px 6px;
        font-size: 0.7rem;
        gap: 3px;
    }
    
    .campaign-title {
        font-size: 1rem;
    }
    
    .campaign-description {
        font-size: 0.85rem;
    }
}

/* RTL Support */
[dir="rtl"] .progress-info {
    direction: rtl;
}

[dir="rtl"] .campaign-tags {
    text-align: right;
}