/* Progress Bar Component Styles */

/* Progress Bar Variables */
:root {
    /* Progress Bar Heights */
    --progress-height-sm: 6px;
    --progress-height-md: 10px;
    --progress-height-lg: 14px;

    /* Circular Progress Sizes */
    --circular-size-sm: 48px;
    --circular-size-md: 72px;
    --circular-size-lg: 96px;
    --circular-stroke-sm: 4px;
    --circular-stroke-md: 6px;
    --circular-stroke-lg: 8px;
}

/* Progress Container */
.progress-container {
    width: 100%;
}

.progress-label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.progress-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
}

.progress-percentage {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* Progress Bar Track */
.progress-bar {
    width: 100%;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

/* Progress Bar Fill */
.progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease, background-color 0.2s ease;
    position: relative;
}

/* Size Variants */
.progress-bar.size-sm {
    height: var(--progress-height-sm);
}

.progress-bar.size-md {
    height: var(--progress-height-md);
}

.progress-bar.size-lg {
    height: var(--progress-height-lg);
}

/* Color Variants */
.progress-fill.variant-default {
    background-color: var(--color-accent);
}

.progress-fill.variant-success {
    background-color: #16a34a;
}

.progress-fill.variant-warning {
    background-color: #eab308;
}

.progress-fill.variant-danger {
    background-color: #dc2626;
}

.progress-fill.variant-info {
    background-color: #0284c7;
}

.progress-fill.variant-pink {
    background-color: var(--color-accent-secondary);
}

/* Striped Variant */
.progress-fill.striped {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
}

.progress-fill.striped.animated {
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

/* Indeterminate Progress */
.progress-fill.indeterminate {
    width: 100% !important;
    background: linear-gradient(
        90deg,
        var(--color-surface) 0%,
        var(--color-accent) 50%,
        var(--color-surface) 100%
    );
    background-size: 200% 100%;
    animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Circular Progress */
.circular-progress-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}

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

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

.circular-progress-bg {
    fill: none;
    stroke: var(--color-surface);
    stroke-width: inherit;
}

.circular-progress-fill {
    fill: none;
    stroke: var(--color-accent);
    stroke-linecap: round;
    stroke-width: inherit;
    transition: stroke-dashoffset 0.3s ease;
}

.circular-progress-text {
    position: absolute;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}

/* Circular Size Variants */
.circular-progress.size-sm {
    width: var(--circular-size-sm);
    height: var(--circular-size-sm);
}

.circular-progress.size-sm svg {
    width: var(--circular-size-sm);
    height: var(--circular-size-sm);
}

.circular-progress.size-sm .circular-progress-bg,
.circular-progress.size-sm .circular-progress-fill {
    stroke-width: var(--circular-stroke-sm);
}

.circular-progress.size-md {
    width: var(--circular-size-md);
    height: var(--circular-size-md);
}

.circular-progress.size-md svg {
    width: var(--circular-size-md);
    height: var(--circular-size-md);
}

.circular-progress.size-md .circular-progress-bg,
.circular-progress.size-md .circular-progress-fill {
    stroke-width: var(--circular-stroke-md);
}

.circular-progress.size-md .circular-progress-text {
    font-size: var(--text-base);
}

.circular-progress.size-lg {
    width: var(--circular-size-lg);
    height: var(--circular-size-lg);
}

.circular-progress.size-lg svg {
    width: var(--circular-size-lg);
    height: var(--circular-size-lg);
}

.circular-progress.size-lg .circular-progress-bg,
.circular-progress.size-lg .circular-progress-fill {
    stroke-width: var(--circular-stroke-lg);
}

.circular-progress.size-lg .circular-progress-text {
    font-size: var(--text-lg);
}

/* Circular Color Variants */
.circular-progress-fill.variant-success {
    stroke: #16a34a;
}

.circular-progress-fill.variant-warning {
    stroke: #eab308;
}

.circular-progress-fill.variant-danger {
    stroke: #dc2626;
}

.circular-progress-fill.variant-info {
    stroke: #0284c7;
}

.circular-progress-fill.variant-pink {
    stroke: var(--color-accent-secondary);
}

/* Circular Indeterminate */
.circular-progress-fill.indeterminate {
    animation: circular-indeterminate 1.5s linear infinite;
    stroke-dasharray: 80, 200;
    stroke-dashoffset: 0;
}

@keyframes circular-indeterminate {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 100, 200;
        stroke-dashoffset: -15;
    }
    100% {
        stroke-dasharray: 100, 200;
        stroke-dashoffset: -125;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .progress-bar {
        background-color: var(--color-surface);
        border-color: var(--color-border);
    }

    .progress-fill.indeterminate {
        background: linear-gradient(
            90deg,
            var(--color-surface) 0%,
            var(--color-accent) 50%,
            var(--color-surface) 100%
        );
    }

    .circular-progress-bg {
        stroke: var(--color-surface);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .progress-label-wrapper {
        margin-bottom: var(--space-1);
    }

    .progress-label,
    .progress-percentage {
        font-size: var(--text-xs);
    }

    .circular-progress.size-lg {
        width: var(--circular-size-md);
        height: var(--circular-size-md);
    }

    .circular-progress.size-lg svg {
        width: var(--circular-size-md);
        height: var(--circular-size-md);
    }

    .circular-progress.size-lg .circular-progress-text {
        font-size: var(--text-base);
    }
}
