/**
 * Download Counter Styles
 * Styles for the download counter display
 */

.download-counter-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-counter-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.download-counter-box i {
    font-size: 16px;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

#download-counter {
    font-weight: 700;
    font-size: 16px;
    margin: 0 3px;
    color: #fff;
}

/* Animation for the download icon */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .download-counter-box {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .download-counter-box i {
        font-size: 14px;
    }
    
    #download-counter {
        font-size: 14px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .download-counter-box {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        box-shadow: 0 2px 10px rgba(74, 85, 104, 0.4);
    }
    
    .download-counter-box:hover {
        box-shadow: 0 4px 15px rgba(74, 85, 104, 0.6);
    }
}

/* Loading state */
.download-counter-box.loading {
    opacity: 0.7;
    pointer-events: none;
}

.download-counter-box.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* Counter animation when updated */
.download-counter-box.updated {
    animation: counterUpdate 0.5s ease;
}

@keyframes counterUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}