.unified-download-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

/* Size variants */
.unified-download-indicator.small {
    width: 24px;
    height: 24px;
}

.unified-download-indicator.medium {
    width: 32px;
    height: 32px;
}

.unified-download-indicator.large {
    width: 40px;
    height: 40px;
}

/* Completed state - green checkmark */
.unified-download-indicator.completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 2px solid #10b981;
}

.unified-download-indicator.completed:hover {
    background: rgba(16, 185, 129, 0.3);
}

/* Downloading state - animated spinner with progress ring */
.unified-download-indicator.downloading {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.download-progress {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

.progress-ring {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 20px;
    height: 20px;
}

.progress-circle {
    transform: rotate(-90deg);
}

.progress-stroke {
    transition: stroke-dashoffset 0.3s ease;
}

/* Downloadable state - button for initiating downloads */
.unified-download-indicator.downloadable {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: 2px solid #ef4444;
    cursor: pointer;
    border: none;
    outline: none;
}

.unified-download-indicator.downloadable:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.05);
}

.unified-download-indicator.downloadable:active {
    transform: scale(0.95);
}

/* Special styling for tracks that already exist */
.unified-download-indicator.downloadable.exists {
    background: rgba(245, 158, 11, 0.9);
    border-color: #f59e0b;
}

.unified-download-indicator.downloadable.exists:hover {
    background: rgba(245, 158, 11, 1);
}

.download-with-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.download-with-plus .plus {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 8px;
    font-weight: bold;
    background: white;
    color: #f59e0b;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .unified-download-indicator.medium {
        width: 28px;
        height: 28px;
    }
    
    .unified-download-indicator.large {
        width: 36px;
        height: 36px;
    }
}

/* Accessibility */
.unified-download-indicator:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: 2px;
}

/* Animation for state transitions */
.unified-download-indicator {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}