/**
 * Navigation Progress Bar
 * Feature: 038-mobile-style-refresh (FR-009)
 *
 * Thin top-of-viewport progress indicator for page transitions.
 * Essential in PWA standalone mode where no browser chrome provides loading feedback.
 *
 * Z-index: 1040 (above navbar at 1030)
 */

/* ==========================================================================
   Progress Bar Container
   ========================================================================== */

.nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1040;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nav-progress.active {
    opacity: 1;
}

/* ==========================================================================
   Progress Bar Track
   ========================================================================== */

.nav-progress-bar {
    height: 100%;
    width: 0;
    background: var(--bs-primary, #8B4513);
    transition: width 0.3s ease;
}

.nav-progress.active .nav-progress-bar {
    animation: progress-indeterminate 1.5s ease-in-out infinite;
}

/* ==========================================================================
   Animation: Indeterminate progress
   ========================================================================== */

@keyframes progress-indeterminate {
    0% {
        width: 0;
        margin-left: 0;
    }
    50% {
        width: 70%;
        margin-left: 15%;
    }
    100% {
        width: 0;
        margin-left: 100%;
    }
}

/* ==========================================================================
   Accessibility: Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .nav-progress,
    .nav-progress-bar {
        transition: none;
    }

    .nav-progress.active .nav-progress-bar {
        animation: none;
        width: 100%;
    }
}
