/**
 * Workflow Canvas Styles
 * Extracted from workflows.html - Canvas, nodes, connections, zoom controls
 */

/* Canvas Enhancements */
.wf-canvas {
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #0a0e17 0%, #111827 100%);
}

.wf-canvas-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.wf-canvas-empty i {
    font-size: 72px;
    margin-bottom: 20px;
    color: rgba(139, 92, 246, 0.3);
}

.wf-canvas-empty .ce-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.wf-canvas-empty .ce-sub {
    font-size: 14px;
    line-height: 1.8;
}

/* Zoom Controls */
.wf-zoom-ctrl {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.wf-zoom-ctrl button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wf-zoom-ctrl button:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.wf-zoom-label {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px 0;
}

/* Minimap */
.wf-minimap {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 180px;
    height: 120px;
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Node Styling - Layout transitions only (main styling in workflow-styles.css) */
.wf-node.layout-transition {
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1), top 0.5s cubic-bezier(0.4, 0, 0.2, 1), all 0.2s;
}

/* Empty State Animation */
@keyframes floatUp {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
}

.wf-canvas-empty {
    animation: floatUp 3s ease-in-out infinite;
}

/* Apply to Canvas Button */
.wf-bp-apply-wrap {
    margin-top: 12px;
}

.wf-bp-apply-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.wf-bp-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 211, 153, 0.3);
}

.wf-bp-apply-btn i {
    font-size: 16px;
}

/* Sparklines for KPIs */
.wf-kpi-sparkline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    opacity: 0.4;
}

.wf-kpi-sparkline polyline {
    fill: none;
    stroke: var(--kpi-color);
    stroke-width: 2;
}

/* AI-suggested node highlight */
.wf-palette-item.ai-suggested {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.4);
    animation: pulse-suggest 1.5s ease-in-out infinite;
}

@keyframes pulse-suggest {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 0 12px 4px rgba(139, 92, 246, 0.2); }
}

/* Responsive */
@media (max-width: 1200px) {
    .wf-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wf-kpi-grid {
        grid-template-columns: 1fr;
    }

    .wf-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .wf-header-actions {
        flex-direction: column;
    }
}
