/* ==========================================
   WORKFLOW MOCKUP (Hero Canvas)
   File separato per il mockup nella hero
   ========================================== */

.editor-window {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    overflow: hidden;
    width: 480px;
    flex-shrink: 0;
}

/* Header finestra con sfondo grigio */
.editor-window-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #e8eaed;
    border-bottom: 1px solid #d0d0d0;
}

.editor-window-header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.editor-window-header span:nth-child(1) { background: #ff5f56; }
.editor-window-header span:nth-child(2) { background: #ffbd2e; }
.editor-window-header span:nth-child(3) { background: #27c93f; }

/* Canvas con puntini FISSI */
.workflow-canvas {
    position: relative;
    width: 480px;
    height: 280px;
    padding: 10px;
    box-sizing: border-box;
    background-color: #f8f9fc;
    background-image: radial-gradient(circle, #d0d0d0 1px, transparent 1px);
    background-size: 16px 16px;
}

/* Wrapper interno che contiene tutti i nodi e FLUTTUA */
.wf-nodes-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: float-nodes 4s ease-in-out infinite;
}

@keyframes float-nodes {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Nodo generico */
.wf-node {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    font-size: 11px;
    overflow: visible;
}

/* ==========================================
   NODO START - Stile come l'editor reale
   ========================================== */
.wf-start {
    left: 15px;
    top: 75px;
    width: 120px;
    background: white;
    border: 2px solid #34a853;
    border-radius: 12px;
}

.wf-start-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

/* Icona play blu come nell'editor */
.wf-start-icon {
    width: 22px;
    height: 22px;
    background: #4285f4;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.wf-start-icon::after {
    content: '';
    border: 5px solid transparent;
    border-left: 8px solid white;
    margin-left: 2px;
}

.wf-start-header span {
    font-weight: 700;
    color: #333;
    font-size: 13px;
}

.wf-start-body {
    padding: 8px 10px;
    color: #888;
    font-size: 9px;
}

.wf-start-btn {
    margin: 0 8px 8px 8px;
    padding: 8px;
    background: #34a853;
    color: white;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ==========================================
   NODI STEP
   ========================================== */
.wf-step {
    width: 140px;
    background: white;
    border: 2px solid #4285f4;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

.wf-step-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: white;
    font-weight: 700;
    font-size: 10px;
    border-radius: 10px 10px 0 0;
}

.wf-step-header.black { 
    background: linear-gradient(135deg, #1a1a2e, #333); 
}

.wf-step-header.green { 
    background: linear-gradient(135deg, #00a67e, #34d399); 
}

.wf-step-icon {
    width: 16px;
    height: 16px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

.wf-step-body {
    padding: 8px 10px;
    color: #666;
    font-size: 9px;
    line-height: 1.4;
}

/* Posizioni dei nodi Step */
.wf-step-1 {
    left: 175px;
    top: 25px;
}

.wf-step-2 {
    left: 175px;
    top: 77px;
}

/* ==========================================
   NODO BUFFER
   ========================================== */
.wf-buffer {
    position: absolute;
    left: 355px;
    top: 100px;
    width: 100px;
    background: white;
    border: 2px dashed #f39c12;
    border-radius: 12px;
    padding: 8px;
}

.wf-buffer-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #333;
    font-size: 10px;
    margin-bottom: 4px;
}

.wf-buffer-icon {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    border-radius: 4px;
}

.wf-buffer-body {
    color: #999;
    font-size: 8px;
}

/* ==========================================
   CONNETTORI SVG
   ========================================== */
.wf-connectors {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.wf-connectors path {
    fill: none;
    stroke-width: 2;
}

.wf-connectors .connector-blue {
    stroke: #4285f4;
}

.wf-connectors .connector-orange {
    stroke: #f39c12;
    stroke-dasharray: 6 4;
}

/* ==========================================
   PALLINI DI CONNESSIONE
   ========================================== */
.wf-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
}

.wf-dot.green { background: #34a853; }
.wf-dot.blue { background: #4285f4; }
.wf-dot.orange { background: #f39c12; }

/* ==========================================
   RESPONSIVE - Scale proporzionale
   ========================================== */
@media (max-width: 1100px) {
    .editor-window {
        transform: scale(0.85);
        transform-origin: top right;
    }
}

@media (max-width: 950px) {
    .editor-window {
        transform: scale(0.75);
        transform-origin: top right;
    }
}

@media (max-width: 850px) {
    .editor-window {
        transform: scale(0.65);
        transform-origin: top center;
    }
}

@media (max-width: 768px) {
    .editor-window {
        display: none;
    }
}