/* WorkflowStep Widget Styles */
.workflow-step-widget {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.workflow-step-widget:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.workflow-step-widget.selected {
    border-color: #0d6efd;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.2);
}

/* Header-Bereich (lila/violett) */
.workflow-step-header {
    background: linear-gradient(135deg, #6f42c1 0%, #8e44ad 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    position: relative;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.step-key {
    font-size: 0.85rem;
    opacity: 0.9;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}

.assigned-badge {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #28a745;
    background: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Content-Bereich (weiß) */
.workflow-step-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-info-row {
    font-size: 0.9rem;
    line-height: 1.4;
}

.step-info-row strong {
    color: #495057;
    font-weight: 600;
}

.condition-code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #495057;
    display: inline-block;
    margin-left: 8px;
}

.interaction-badge {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.interaction-message {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #ffc107;
    border-radius: 0 4px 4px 0;
}

.parameter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.param-badge {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.3);
}

.command-badge {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

/* Footer-Bereich */
.workflow-step-footer {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-radius: 0 0 12px 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .workflow-step-widget {
        margin-bottom: 16px;
    }
    
    .workflow-step-header {
        padding: 14px 16px;
        min-height: 70px;
    }
    
    .step-title {
        font-size: 1rem;
    }
    
    .step-key {
        font-size: 0.8rem;
    }
    
    .workflow-step-content {
        padding: 16px;
        gap: 10px;
    }
    
    .workflow-step-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-edit, .btn-delete {
        padding: 12px 16px;
    }
    
    .parameter-badges {
        gap: 6px;
    }
    
    .param-badge, .command-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

@media (max-width: 576px) {
    .workflow-step-header {
        padding: 12px 14px;
        min-height: 65px;
    }
    
    .step-title {
        font-size: 0.95rem;
    }
    
    .workflow-step-content {
        padding: 14px;
    }
    
    .workflow-step-footer {
        padding: 10px 14px;
    }
}

/* Animation für neue Widgets */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.workflow-step-widget {
    animation: slideInUp 0.3s ease-out;
}

/* Hover-Effekte für bessere UX */
.workflow-step-widget .step-info-row:hover {
    background: rgba(0, 123, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    margin: -4px -8px;
}

.condition-code:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* Accessibility */
.workflow-step-widget:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.btn-edit:focus, .btn-delete:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .workflow-step-widget {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .workflow-step-content {
        background: #2d3748;
    }
    
    .workflow-step-footer {
        background: #1a202c;
        border-top-color: #4a5568;
    }
    
    .condition-code {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .interaction-message {
        background: #4a5568;
        color: #cbd5e0;
    }
    
    .step-info-row strong {
        color: #e2e8f0;
    }
}