/**
 * Animated Progress Bars & Indicators
 * Various progress visualization styles
 */

/* ===================================
   BASE PROGRESS BAR
   =================================== */

.progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00f3ff 0%, #0066ff 100%);
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Shine effect on progress bar */
.progress-bar::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: progressShine 2s infinite;
}

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

    100% {
        transform: translateX(100%);
    }
}

/* ===================================
   PROGRESS SIZES
   =================================== */

.progress-sm {
    height: 4px;
}

.progress-md {
    height: 8px;
}

.progress-lg {
    height: 12px;
}

.progress-xl {
    height: 16px;
}

/* ===================================
   PROGRESS VARIANTS
   =================================== */

/* Success */
.progress-bar-success {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* Warning */
.progress-bar-warning {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

/* Error */
.progress-bar-error {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* Gradient */
.progress-bar-gradient {
    background: linear-gradient(90deg, #00f3ff 0%, #d946ef 100%);
}

/* Animated gradient */
.progress-bar-animated-gradient {
    background: linear-gradient(270deg, #00f3ff, #d946ef, #f59e0b);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
}

/* ===================================
   STRIPED PROGRESS
   =================================== */

.progress-striped .progress-bar {
    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-striped.progress-animated .progress-bar {
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 20px 20px;
    }
}

/* ===================================
   CIRCULAR PROGRESS
   =================================== */

.progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#00f3ff 0deg,
            #00f3ff calc(var(--progress, 0) * 3.6deg),
            rgba(255, 255, 255, 0.05) calc(var(--progress, 0) * 3.6deg));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-secondary);
}

.progress-circle-value {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

/* ===================================
   RING PROGRESS
   =================================== */

.progress-ring {
    width: 80px;
    height: 80px;
    position: relative;
}

.progress-ring-circle {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.progress-ring-bar {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

/* ===================================
   STEP PROGRESS
   =================================== */

.steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    counter-reset: step;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
}

.step:last-child::after {
    display: none;
}

.step.active::before {
    background: linear-gradient(135deg, #00f3ff 0%, #0066ff 100%);
    border-color: #00f3ff;
    color: white;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.step.completed::before {
    content: '✓';
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.step.completed::after {
    background: #10b981;
}

.step-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.step.active .step-label {
    color: #00f3ff;
    font-weight: 600;
}

/* ===================================
   LOADING BARS
   =================================== */

/* Indeterminate loading bar */
.loading-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    position: relative;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #00f3ff 0%, #0066ff 100%);
    animation: loadingBarMove 1.5s ease-in-out infinite;
}

@keyframes loadingBarMove {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

/* ===================================
   SKELETON PROGRESS
   =================================== */

.skeleton-progress {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 100px;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .progress-circle {
        width: 100px;
        height: 100px;
    }

    .progress-circle::before {
        width: 80px;
        height: 80px;
    }

    .progress-circle-value {
        font-size: 20px;
    }

    .step::before {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .step-label {
        font-size: 11px;
    }
}