/**
 * progress-strip.css - Progress Strip Component (Hybrid B+C)
 * BO Inteligente v0.16.0
 *
 * Replaces the horizontal dot progress bar with:
 * 1. Segmented strip (8px) — passive progress visualization
 * 2. Context bar (36px) — current section info + expand
 * 3. Navigator drawer — full section list overlay
 */

/* ============================================ */
/* CONTAINER */
/* ============================================ */

.progress-strip-container {
    position: relative;
    z-index: 50;
    margin-bottom: 12px;
}

/* ============================================ */
/* SEGMENTED STRIP (8px) */
/* ============================================ */

.progress-strip {
    display: flex;
    height: 8px;
    gap: 1px;
    background: white;
}

.progress-strip__segment {
    flex: 1;
    background: #E5E7EB;
    transition: background 0.4s ease;
}

.progress-strip__segment--completed {
    background: #10B981;
}

.progress-strip__segment--in-progress {
    background: linear-gradient(90deg,
        #2563EB var(--fill, 0%),
        #E5E7EB var(--fill, 0%)
    );
}

.progress-strip__segment--skipped {
    background: repeating-linear-gradient(
        -45deg,
        #D1D5DB,
        #D1D5DB 2px,
        #E5E7EB 2px,
        #E5E7EB 4px
    );
}

/* ============================================ */
/* CONTEXT BAR (36px) */
/* ============================================ */

.progress-strip__context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 36px;
    background: white;
    border-bottom: 1px solid #E5E7EB;
    user-select: none;
}

.progress-strip__context-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.progress-strip__context-emoji {
    font-size: 16px;
    flex-shrink: 0;
}

.progress-strip__context-name {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-strip__context-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: 12px;
}

.progress-strip__context-count {
    font-size: 13px;
    color: #6B7280;
    white-space: nowrap;
}

.progress-strip__expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6B7280;
    transition: transform 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.progress-strip__expand-btn:hover {
    color: #2563EB;
    background: #EFF6FF;
}

.progress-strip__expand-btn--open {
    transform: rotate(180deg);
}

.progress-strip__expand-btn svg {
    width: 14px;
    height: 14px;
}

/* ============================================ */
/* OVERLAY (backdrop) */
/* ============================================ */

.progress-strip__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 49;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.progress-strip__overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================ */
/* NAVIGATOR DRAWER */
/* ============================================ */

.progress-strip__drawer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.progress-strip__drawer--open {
    max-height: 70vh;
    overflow-y: auto;
}

.progress-strip__drawer-content {
    padding: 16px;
}

.progress-strip__drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.progress-strip__drawer-title {
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
}

.progress-strip__drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #9CA3AF;
    font-size: 18px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.progress-strip__drawer-close:hover {
    color: #1F2937;
    background: #F3F4F6;
}

.progress-strip__drawer-subtitle {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 12px;
}

/* -------------------------------------------- */
/* DRAWER LIST */
/* -------------------------------------------- */

.progress-strip__drawer-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.progress-strip__drawer-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    gap: 12px;
}

.progress-strip__drawer-row:hover {
    background: #F3F4F6;
}

.progress-strip__drawer-row--active {
    background: #EFF6FF;
}

.progress-strip__drawer-row--active:hover {
    background: #DBEAFE;
}

.progress-strip__drawer-row--pending {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress-strip__drawer-row--pending:hover {
    background: transparent;
}

/* Status icon circle */
.progress-strip__drawer-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.progress-strip__drawer-icon--completed {
    background: #D1FAE5;
    color: #059669;
}

.progress-strip__drawer-icon--skipped {
    background: #F3F4F6;
    color: #9CA3AF;
}

.progress-strip__drawer-icon--in-progress {
    background: #EFF6FF;
    color: #2563EB;
}

.progress-strip__drawer-icon--pending {
    background: #F3F4F6;
    color: #D1D5DB;
}

.progress-strip__drawer-icon--final-locked {
    background: #F3F4F6;
    color: #D1D5DB;
}

.progress-strip__drawer-icon--final-unlocked {
    background: #D1FAE5;
    color: #059669;
}

/* Section info */
.progress-strip__drawer-info {
    flex: 1;
    min-width: 0;
}

.progress-strip__drawer-name {
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-strip__drawer-row--active .progress-strip__drawer-name {
    color: #2563EB;
    font-weight: 600;
}

/* Status badge */
.progress-strip__drawer-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    font-weight: 500;
}

.progress-strip__drawer-status--completed {
    background: #D1FAE5;
    color: #059669;
}

.progress-strip__drawer-status--skipped {
    background: #F3F4F6;
    color: #9CA3AF;
}

.progress-strip__drawer-status--in-progress {
    background: #EFF6FF;
    color: #2563EB;
}

.progress-strip__drawer-status--pending {
    color: #D1D5DB;
}

/* Separator before BO Final */
.progress-strip__drawer-separator {
    height: 1px;
    background: #E5E7EB;
    margin: 8px 0;
}

/* ============================================ */
/* ANIMATIONS */
/* ============================================ */

@keyframes stripPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.progress-strip__segment--in-progress {
    animation: stripPulse 2s ease-in-out infinite;
}
