/* Ultra Compact Workflow Roadmap Styles */
.workflow-roadmap {
    position: relative;
    padding: 10px;
    background: linear-gradient(to bottom, var(--background-color) 0%, #ffffff 100%);
    border-radius: 6px;
    margin-top: 15px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.roadmap-container {
    position: relative;
    max-width: 450px;
    margin: 0 auto;
}

/* Curvy road path */
.road-path {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--neutral-200) 0%, 
        var(--neutral-400) 25%,
        var(--neutral-200) 50%,
        var(--neutral-400) 75%, 
        var(--neutral-200) 100%);
    border-radius: 2px;
    z-index: 0;
    opacity: 0.6;
}

/* Stage milestone container - ultra compact */
.stage-milestone {
    position: relative;
    margin: 3px 0;
    min-height: 32px;
    display: flex;
    align-items: center;
    z-index: 1;
}

.stage-milestone:nth-child(even) {
    text-align: right;
}

.stage-milestone:nth-child(even) .stage-card {
    margin-left: auto;
    margin-right: 0;
}

/* Stage cards - tiny boxes */
.stage-card {
    background: white;
    border-radius: 4px;
    padding: 4px 7px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    width: 42%;
    position: relative;
    transition: all 0.15s ease;
    border: 1px solid var(--neutral-200);
    font-size: 0.65rem;
}

.stage-card:hover {
    transform: translateY(-0.5px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Alternate left and right with curve effect */
.stage-milestone:nth-child(odd) .stage-card {
    margin-left: auto;
    margin-right: 53%;
}

.stage-milestone:nth-child(even) .stage-card {
    margin-left: 53%;
    margin-right: auto;
}

.stage-card.completed {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9f4 100%);
}

.stage-card.completed .stage-marker {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.stage-card.in-progress {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #e7f3ff 100%);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15);
}

.stage-card.in-progress .stage-marker {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    animation: pulse-marker 2s infinite;
}

.stage-card.skipped {
    border-color: var(--neutral-400);
    background: var(--background-color);
    opacity: 0.6;
}

.stage-card.skipped .stage-marker {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
    color: white;
    font-size: 8px;
}

.stage-card.pending {
    border-color: var(--neutral-200);
    background: white;
    opacity: 0.75;
}

.stage-card.pending .stage-marker {
    background: white;
    border-color: var(--neutral-200);
}

/* Stage marker on the road - tiny circles */
.stage-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: white;
    border: 1.5px solid var(--neutral-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 8px;
    color: var(--text-secondary);
    z-index: 2;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Stage title - ultra compact */
.stage-title {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1px;
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1.1;
}

.stage-title i {
    font-size: 0.65rem;
}

/* Stage number badge - inline */
.stage-number {
    display: inline;
    font-size: 0.55rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Stage metadata - ultra compact */
.stage-meta {
    font-size: 0.55rem;
    color: var(--text-secondary);
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.stage-meta i {
    font-size: 0.55rem;
    opacity: 0.7;
}

/* Stage actions - ultra compact */
.stage-actions {
    margin-top: 3px;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.stage-actions form {
    margin: 0;
}

.stage-actions .btn {
    font-size: 0.55rem;
    padding: 1px 4px;
    line-height: 1.1;
}

.stage-actions .btn i {
    font-size: 0.55rem;
}

/* Animations */
@keyframes pulse-marker {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(var(--primary-rgb), 0);
    }
}

/* Progress stats styling - ultra compact */
.roadmap-progress {
    margin-bottom: 10px;
    padding: 8px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.roadmap-progress h6 {
    margin-bottom: 6px;
    color: var(--neutral-700);
    font-weight: 600;
    font-size: 0.75rem;
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--neutral-200);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Phase headers - ultra compact */
.phase-header {
    text-align: center;
    margin: 10px 0 6px 0;
    position: relative;
    z-index: 1;
}

.phase-header h3 {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--neutral-700);
    background: white;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--neutral-200);
}

/* View toggle buttons */
.view-toggle .btn {
    border-radius: 4px;
    font-size: 0.8rem;
}

.view-toggle .btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive design - compact */
@media (max-width: 768px) {
    .stage-card {
        width: 80%;
        margin-left: 10% !important;
        margin-right: 10% !important;
        font-size: 0.7rem;
    }
    
    .stage-milestone {
        min-height: 40px;
        margin: 5px 0;
    }
    
    .road-path {
        left: 20px;
        transform: none;
        width: 4px;
    }
    
    .stage-marker {
        left: 20px;
        transform: translate(-50%, -50%);
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
    
    .phase-header h3 {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
    
    .stage-actions .btn {
        font-size: 0.6rem;
        padding: 2px 5px;
    }
}

