/* Campaign Fundraiser Frontend Styles */

/* Product Page Campaign Info */
.cf-product-campaign-info {
    background: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.cf-campaign-title {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.cf-progress-section {
    margin-bottom: 10px;
}

.cf-progress-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}

/* Progress Bar */
.cf-progress-container {
    margin-bottom: 10px;
}

.cf-progress-bar {
    width: 100%;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}

.cf-progress-bar-large {
    height: 32px;
    border-radius: 16px;
}

.cf-progress-bar-small {
    height: 20px;
    border-radius: 10px;
}

.cf-progress-bar-widget {
    height: 28px;
    border-radius: 14px;
}

.cf-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #2271b1, #135e96);
    transition: width 0.6s ease;
    border-radius: inherit;
    position: relative;
    overflow: hidden;
}

.cf-progress-fill-campaign {
    background: linear-gradient(to right, #16a34a, #15803d);
}

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

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

.cf-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.cf-progress-percentage {
    font-weight: 600;
    color: #2271b1;
}

.cf-progress-amounts {
    color: #666;
}

.cf-campaign-message {
    margin: 10px 0 0;
    font-size: 14px;
    color: #555;
}

/* Campaign Progress (Shortcode) */
.cf-campaign-progress {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.cf-campaign-header {
    margin-bottom: 25px;
}

.cf-campaign-name {
    font-size: 24px;
    margin: 0 0 15px;
    color: #333;
}

.cf-campaign-description {
    color: #666;
    line-height: 1.6;
}

.cf-campaign-total {
    margin-bottom: 30px;
}

/* Campaign Stages */
.cf-campaign-stages {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.cf-campaign-stages h4 {
    font-size: 18px;
    margin: 0 0 15px;
    color: #333;
}

.cf-stage-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.cf-stage-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* Widget Styles */
.cf-widget-campaign {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cf-widget-header {
    margin-bottom: 15px;
}

.cf-widget-title {
    font-size: 18px;
    margin: 0;
    color: #333;
}

.cf-widget-progress {
    margin-bottom: 20px;
}

.cf-widget-stats {
    margin-top: 15px;
}

.cf-widget-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cf-widget-stat:last-child {
    border-bottom: none;
}

.cf-stat-label {
    color: #666;
    font-size: 14px;
}

.cf-stat-value {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

/* Widget Stages */
.cf-widget-stages {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.cf-widget-stage {
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.cf-widget-stage.cf-stage-completed {
    background: #d4edda;
}

.cf-stage-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.cf-stage-progress {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.cf-stage-bar {
    display: block;
    height: 100%;
    background: #2271b1;
    transition: width 0.6s ease;
}

.cf-widget-stage.cf-stage-completed .cf-stage-bar {
    background: #28a745;
}

.cf-stage-percent {
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .cf-product-campaign-info,
    .cf-campaign-progress,
    .cf-widget-campaign {
        padding: 15px;
    }
    
    .cf-campaign-name {
        font-size: 20px;
    }
    
    .cf-progress-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
