/* Стили для визуального редактора workflow в стиле Jira */

.workflow-editor-modal {
    z-index: 10000;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.workflow-editor-open {
    overflow: hidden !important;
}

.workflow-editor-content {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.workflow-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.workflow-editor-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.workflow-editor-actions {
    display: flex;
    gap: 10px;
}

.workflow-editor-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.workflow-editor-sidebar {
    width: 350px;
    background: #f5f5f5;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 20px;
}

.workflow-properties {
    margin-bottom: 30px;
}

.workflow-properties h3,
.workflow-status-list h3,
.workflow-transitions-list h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.workflow-status-list,
.workflow-transitions-list {
    margin-top: 30px;
}

.workflow-status-item,
.workflow-transition-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.workflow-status-item:hover,
.workflow-transition-item:hover {
    border-color: #2196F3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.workflow-status-item.selected,
.workflow-transition-item.selected {
    border-color: #2196F3;
    background: #E3F2FD;
}

.status-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

.status-info {
    flex: 1;
    min-width: 0;
}

.status-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.status-id {
    font-size: 12px;
    color: #757575;
}

.status-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    color: #757575;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f0f0f0;
    color: #2196F3;
}

.transition-info {
    flex: 1;
    min-width: 0;
}

.transition-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.transition-path {
    font-size: 12px;
    color: #757575;
}

.transition-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.transitions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.transitions-header span {
    font-weight: 600;
    color: #333;
}

.workflow-editor-canvas-container {
    flex: 1;
    position: relative;
    background: #fafafa;
    overflow: hidden;
}

.workflow-canvas-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    display: flex;
    gap: 5px;
    align-items: center;
    background: #fff;
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.workflow-zoom-info {
    margin-left: 10px;
    font-size: 12px;
    color: #757575;
    min-width: 50px;
    text-align: center;
}

#workflow-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
    background: #fafafa;
}

#workflow-canvas:active {
    cursor: grabbing;
}

/* Стили для форм */
.workflow-editor-sidebar .form-group {
    margin-bottom: 15px;
}

.workflow-editor-sidebar .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.workflow-editor-sidebar .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.workflow-editor-sidebar .form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .workflow-editor-sidebar {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .workflow-editor-content {
        width: 100vw;
        height: 100vh;
    }

    .workflow-editor-body {
        flex-direction: column;
    }

    .workflow-editor-sidebar {
        width: 100%;
        max-height: 40vh;
    }

    .workflow-editor-canvas-container {
        height: 60vh;
    }
}

