/**
 * Workflow Properties Panel Styles
 * Extracted from workflows.html - Property panel, form controls, node-specific styles
 */

/* ============== Human Tasks & Collaboration Styles ============== */

.wf-panel-section {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.wf-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wf-section-header .text-pink { color: #EC4899; }
.wf-section-header .text-warning { color: #F59E0B; }
.wf-section-header .text-info { color: #06B6D4; }

.wf-subsection {
    margin-top: 12px;
}

.wf-subsection-title {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wf-item-list {
    max-height: 200px;
    overflow-y: auto;
}

.wf-task-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wf-task-item:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
}

.wf-task-item .task-title {
    font-weight: 500;
    color: #fff;
    font-size: 13px;
}

.wf-task-item .task-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.wf-task-item .task-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.wf-task-item .task-badge.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #FBBF24;
}

.wf-task-item .task-badge.approved {
    background: rgba(52, 211, 153, 0.2);
    color: #34D399;
}

.wf-task-item .task-badge.rejected {
    background: rgba(248, 113, 113, 0.2);
    color: #F87171;
}

.wf-sla-alert {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.1) 0%, rgba(17, 24, 39, 0.8) 100%);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.wf-sla-alert.warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(17, 24, 39, 0.8) 100%);
    border-color: rgba(251, 191, 36, 0.3);
}

.wf-sla-alert .sla-title {
    font-weight: 500;
    color: #F87171;
    font-size: 12px;
}

.wf-sla-alert.warning .sla-title {
    color: #FBBF24;
}

.wf-comment-item {
    background: rgba(30, 41, 59, 0.4);
    border-left: 3px solid #06B6D4;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 0 8px 8px 0;
}

.wf-comment-item .comment-user {
    font-weight: 500;
    color: #06B6D4;
    font-size: 12px;
}

.wf-comment-item .comment-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin-top: 4px;
}

.wf-comment-item .comment-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

/* Consensus Session Styles */
.wf-consensus-item {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(17, 24, 39, 0.8) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.wf-consensus-item .consensus-topic {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
}

.wf-consensus-item .consensus-agents {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.wf-consensus-item .agent-vote {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.wf-consensus-item .agent-vote.approve { background: rgba(52, 211, 153, 0.3); color: #34D399; }
.wf-consensus-item .agent-vote.reject { background: rgba(248, 113, 113, 0.3); color: #F87171; }
.wf-consensus-item .agent-vote.pending { background: rgba(148, 163, 184, 0.3); color: #94A3B8; }

/* Agentic Node Special Styling */
.ic-agent_consensus, .ic-agent_debate, .ic-agent_review, .ic-agent_escalate {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.1) 100%) !important;
}

.ic-approval_form, .ic-approval_chain, .ic-task_assignment, .ic-collaboration_gate {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3) 0%, rgba(236, 72, 153, 0.1) 100%) !important;
}

.ic-quality_gate, .ic-data_validator, .ic-rollback_point {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(6, 182, 212, 0.1) 100%) !important;
}

.ic-metrics_capture, .ic-sla_checkpoint, .ic-anomaly_detector {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0.1) 100%) !important;
}

/* ============== Property Panel Enhancements ============== */

/* Form Preview Styles */
.form-preview-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-field {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 6px;
    font-size: 12px;
}

.preview-field i {
    color: #8B5CF6;
    font-size: 10px;
}

/* Chain Preview Styles */
.chain-preview-steps {
    padding-left: 8px;
    border-left: 2px solid rgba(236, 72, 153, 0.5);
}

.preview-step {
    font-size: 12px;
}

.preview-step .badge {
    font-size: 10px;
    min-width: 20px;
}

/* Property Panel Inputs Enhancement */
.wf-prop-group .input-group-sm .form-control,
.wf-prop-group .input-group-sm .form-select {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.wf-prop-group .input-group-sm .form-control:focus,
.wf-prop-group .input-group-sm .form-select:focus {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.wf-prop-group .input-group-sm .input-group-text {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

/* Dark theme for all form controls in properties panel */
#tabConfigure .form-control,
#tabConfigure .form-select,
.wf-props-panel .form-control,
.wf-props-panel .form-select {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

#tabConfigure .form-control:focus,
#tabConfigure .form-select:focus,
.wf-props-panel .form-control:focus,
.wf-props-panel .form-select:focus {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
    color: #fff;
}

#tabConfigure .form-control::placeholder,
.wf-props-panel .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Fix dropdown option colors (for native select) */
#tabConfigure .form-select option,
.wf-props-panel .form-select option {
    background: #1e293b;
    color: #fff;
}

/* Form labels */
#tabConfigure .form-label,
.wf-props-panel .form-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
}

/* Form text/hints */
#tabConfigure .form-text,
.wf-props-panel .form-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

/* Input group text */
#tabConfigure .input-group-text,
.wf-props-panel .input-group-text {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
}

/* AI Suggest Button */
.btn-outline-purple {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.4);
    background: transparent;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.btn-outline-purple:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #a78bfa;
    color: #c4b5fd;
}
.btn-outline-purple:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-outline-purple .spinner-border {
    width: 12px;
    height: 12px;
    border-width: 2px;
}

/* AI Suggestion Box */
.wf-ai-suggestion {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
}
.wf-ai-suggestion .suggestion-event {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    padding: 4px 10px;
    margin: 4px 0;
    cursor: pointer;
    transition: all 0.2s;
}
.wf-ai-suggestion .suggestion-event:hover {
    background: rgba(139, 92, 246, 0.35);
    border-color: #a78bfa;
}
.wf-ai-suggestion .suggestion-event .event-name {
    font-weight: 500;
    color: #e0e7ff;
}
.wf-ai-suggestion .suggestion-event .confidence {
    font-size: 10px;
    color: #34d399;
    background: rgba(52, 211, 153, 0.2);
    padding: 1px 6px;
    border-radius: 10px;
}
.wf-ai-suggestion .suggestion-reason {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    margin-top: 6px;
}

/* Colored Section Headers */
.prop-section-hdr {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Agentic node header */
#propsAgentConsensus .prop-section-hdr,
#propsAgentDebate .prop-section-hdr,
#propsAgentReview .prop-section-hdr,
#propsAgentEscalate .prop-section-hdr {
    border-bottom-color: rgba(139, 92, 246, 0.3);
}

/* Human task node header */
#propsApprovalForm .prop-section-hdr,
#propsApprovalChain .prop-section-hdr,
#propsTaskAssignment .prop-section-hdr,
#propsCollaborationGate .prop-section-hdr {
    border-bottom-color: rgba(236, 72, 153, 0.3);
}

/* Quality node header */
#propsQualityGate .prop-section-hdr,
#propsDataValidator .prop-section-hdr,
#propsRollbackPoint .prop-section-hdr {
    border-bottom-color: rgba(6, 182, 212, 0.3);
}

/* Analytics node header */
#propsMetricsCapture .prop-section-hdr,
#propsSlaCheckpoint .prop-section-hdr,
#propsAnomalyDetector .prop-section-hdr {
    border-bottom-color: rgba(245, 158, 11, 0.3);
}

/* Range slider enhancement */
.wf-prop-group .form-range {
    appearance: none;
    height: 6px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 3px;
}

.wf-prop-group .form-range::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #8B5CF6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.4);
}

/* Text muted help text */
.wf-prop-group .text-muted.small {
    font-size: 11px;
    line-height: 1.4;
    padding: 8px;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 6px;
    margin-top: 8px;
}

/* Multi-select styling */
.wf-prop-group select[multiple] {
    background: rgba(30, 41, 59, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.wf-prop-group select[multiple] option {
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 4px;
}

.wf-prop-group select[multiple] option:checked {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(139, 92, 246, 0.2));
}

/* Form check enhancement */
.wf-prop-group .form-check-input {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.wf-prop-group .form-check-input:checked {
    background-color: #8B5CF6;
    border-color: #8B5CF6;
}

.wf-prop-group .form-check-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}
