/**
 * Pipeline Visual Effects
 * Adds distinctive styling for schemes in the sales pipeline
 */

/* Pulsing glow animation for pipeline markers */
@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(0, 255, 136, 0));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(0, 255, 136, 0.9));
    }
}

@keyframes pulse-glow-subtle {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 255, 136, 0);
    }
}

/* Pipeline marker class - to be applied dynamically */
.pipeline-marker {
    border: 3px solid #00ff88 !important;
    animation: pulse-glow 2s infinite ease-in-out;
}

/* Alternative pipeline marker styling for different contexts */
.pipeline-marker-circle {
    border: 3px solid #00ff88 !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    animation: pulse-glow-subtle 2s infinite;
}

/* Pipeline indicator badge */
.pipeline-badge {
    display: inline-block;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #003d1a;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4);
    animation: pulse-glow-subtle 2s infinite;
}

/* Pipeline indicator in hover text */
.pipeline-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 255, 136, 0.15);
    border-left: 4px solid #00ff88;
    border-radius: 4px;
    margin: 8px 0;
    font-weight: 600;
    color: #00cc6a;
}

.pipeline-indicator::before {
    content: "🎯";
    font-size: 16px;
}

/* Pipeline status in scheme cards */
.scheme-pipeline-status {
    display: inline-block;
    background: #00ff88;
    color: #003d1a;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 8px;
    animation: pulse-glow-subtle 2s infinite;
}

/* Pipeline highlight in tables and lists */
.pipeline-row {
    background: rgba(0, 255, 136, 0.08) !important;
    border-left: 4px solid #00ff88 !important;
}

.pipeline-row:hover {
    background: rgba(0, 255, 136, 0.15) !important;
}

/* Pipeline filter button active state */
.filter-btn-pipeline.active,
.compact-filter-btn[data-filter="pipeline"].active {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%) !important;
    color: #003d1a !important;
    border-color: #00ff88 !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

/* Plotly marker styling override for pipeline (if needed) */
.js-plotly-plot .plotly .scattermapbox .pipeline-trace {
    stroke: #00ff88 !important;
    stroke-width: 3 !important;
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.7));
}

/* Pipeline legend item */
.legend-item.pipeline {
    border-left: 4px solid #00ff88;
    background: rgba(0, 255, 136, 0.08);
    padding-left: 12px;
    font-weight: 600;
}

.legend-color.pipeline {
    background: #00ff88 !important;
    border: 2px solid #00cc6a;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
    animation: pulse-glow-subtle 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    @keyframes pulse-glow {
        0%, 100% {
            filter: drop-shadow(0 0 0 rgba(0, 255, 136, 0));
        }
        50% {
            filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.8));
        }
    }
    
    .pipeline-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .pipeline-indicator {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Performance optimization - reduce animation on low-end devices */
@media (prefers-reduced-motion: reduce) {
    .pipeline-marker,
    .pipeline-marker-circle,
    .pipeline-badge,
    .scheme-pipeline-status,
    .legend-color.pipeline {
        animation: none;
    }
    
    .pipeline-marker {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    }
}
