/* Progress bar for Node-backed multipage downloader. Prefixed .dw-* to avoid
   collisions with existing site styles. */

.dw-progress-container {
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    font-family: inherit;
}

.dw-progress-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.dw-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.dw-badge.dw-queued {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.dw-badge.dw-running {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.dw-badge.dw-done {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.dw-badge.dw-failed {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.dw-stage-label {
    font-size: 0.92rem;
    color: #1e293b;
    margin-bottom: 0.55rem;
    min-height: 1.3em;
    font-family: "JetBrains Mono", Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
    word-break: break-word;
}

.dw-progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.dw-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #2563eb);
    border-radius: 999px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.dw-progress-bar.active .dw-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.35) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0.35) 75%,
        transparent 75%,
        transparent
    );
    background-size: 22px 22px;
    animation: dw-progress-stripe 1.2s linear infinite;
}

@keyframes dw-progress-stripe {
    from { background-position: 0 0; }
    to   { background-position: 22px 0; }
}

@media (max-width: 600px) {
    .dw-progress-container { padding: 0.85rem 1rem; }
    .dw-stage-label { font-size: 0.85rem; }
}
