/* Drawflow Dark Theme - Matches Org1 Design System */

/* Main container */
.drawflow {
    background: #0f0f10 !important;
    background-image: 
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px) !important;
    background-size: 20px 20px !important;
}

/* Nodes */
.drawflow .drawflow-node {
    background: #1a1a1b !important;
    border: 2px solid #2d2d2f !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    color: #e5e5e5 !important;
    transition: all 0.3s ease !important;
}

.drawflow .drawflow-node:hover {
    border-color: #4f46e5 !important;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3) !important;
}

.drawflow .drawflow-node.selected {
    background: #1e1e1f !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* Node title */
.drawflow .drawflow-node .title-box {
    background: #2d2d2f !important;
    border-bottom: 1px solid #3d3d3f !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 10px 15px !important;
    border-radius: 10px 10px 0 0 !important;
}

/* Node body */
.drawflow .drawflow-node .box {
    padding: 15px !important;
    color: #d1d1d1 !important;
    font-size: 13px !important;
}

/* Connection points */
.drawflow .drawflow-node .input,
.drawflow .drawflow-node .output {
    background: #4f46e5 !important;
    border: 2px solid #1a1a1b !important;
    width: 14px !important;
    height: 14px !important;
    transition: all 0.2s ease !important;
}

.drawflow .drawflow-node .input:hover,
.drawflow .drawflow-node .output:hover {
    background: #6366f1 !important;
    transform: scale(1.2) !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.6) !important;
}

/* Connection lines */
.drawflow .connection .main-path {
    stroke: #4f46e5 !important;
    stroke-width: 3px !important;
    fill: none !important;
}

.drawflow .connection .main-path:hover {
    stroke: #6366f1 !important;
    stroke-width: 4px !important;
}

.drawflow .connection.selected .main-path {
    stroke: #818cf8 !important;
    stroke-width: 4px !important;
}

/* Connection points on lines */
.drawflow .connection .point {
    stroke: #4f46e5 !important;
    stroke-width: 2 !important;
    fill: #1a1a1b !important;
}

.drawflow .connection .point:hover {
    fill: #6366f1 !important;
}

/* Node types - Different colors for different node types */
.drawflow .drawflow-node.node-type-input {
    border-color: #10b981 !important;
}

.drawflow .drawflow-node.node-type-input .title-box {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
}

.drawflow .drawflow-node.node-type-process {
    border-color: #3b82f6 !important;
}

.drawflow .drawflow-node.node-type-process .title-box {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
}

.drawflow .drawflow-node.node-type-output {
    border-color: #f59e0b !important;
}

.drawflow .drawflow-node.node-type-output .title-box {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
}

.drawflow .drawflow-node.node-type-decision {
    border-color: #8b5cf6 !important;
}

.drawflow .drawflow-node.node-type-decision .title-box {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%) !important;
}

/* Delete button */
.drawflow .drawflow-delete {
    background: #dc2626 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.drawflow .drawflow-delete:hover {
    background: #ef4444 !important;
    transform: scale(1.05) !important;
}

/* Zoom controls */
.drawflow-zoom {
    position: absolute !important;
    bottom: 20px !important;
    right: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    z-index: 10 !important;
}

.drawflow-zoom button {
    background: #1a1a1b !important;
    border: 2px solid #2d2d2f !important;
    color: #e5e5e5 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-center !important;
    font-size: 18px !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
}

.drawflow-zoom button:hover {
    background: #2d2d2f !important;
    border-color: #4f46e5 !important;
    transform: scale(1.1) !important;
}

/* Mini-map */
.drawflow-minimap {
    position: absolute !important;
    bottom: 20px !important;
    left: 20px !important;
    width: 200px !important;
    height: 150px !important;
    background: #1a1a1b !important;
    border: 2px solid #2d2d2f !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    z-index: 10 !important;
}

/* Context menu */
.drawflow-context-menu {
    background: #1a1a1b !important;
    border: 2px solid #2d2d2f !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    padding: 8px 0 !important;
}

.drawflow-context-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.drawflow-context-menu li {
    padding: 10px 20px !important;
    color: #e5e5e5 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.drawflow-context-menu li:hover {
    background: #2d2d2f !important;
    color: #ffffff !important;
}

/* Node badges */
.node-badge {
    display: inline-block !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    margin-top: 5px !important;
    text-transform: uppercase !important;
}

.node-badge.badge-success {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #10b981 !important;
}

.node-badge.badge-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #f59e0b !important;
}

.node-badge.badge-error {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

.node-badge.badge-info {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6 !important;
}

/* Loading state */
.drawflow-loading {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-align: center !important;
    color: #9ca3af !important;
}

.drawflow-loading .spinner {
    border: 3px solid #2d2d2f !important;
    border-top-color: #4f46e5 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    animation: spin 1s linear infinite !important;
    margin: 0 auto 10px !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .drawflow-zoom {
        bottom: 10px !important;
        right: 10px !important;
    }
    
    .drawflow-minimap {
        display: none !important;
    }
}

