/**
 * A style based on SVG icons.
 */


@import "common";

node.ruleFlowState {
  shape         : url('svg/notask.svg');
  label: @name;
}

node.ruleFlowState:selected {
  shape         : url('svg/notask_h.svg');
}

node.ruleFlowState[taskType="RuleFlow.RuleTask"] {
  shape         : url('svg/rule.svg');
}

node.ruleFlowState[taskType="RuleFlow.RuleTask"]:selected {
  shape         : url('svg/rule_h.svg');
}

node.ruleFlowState[taskType="RuleFlow.FunctionTask"] {
  shape         : url('svg/function.svg');
}

node.ruleFlowState[taskType="RuleFlow.FunctionTask"]:selected {
  shape         : url('svg/function_h.svg');
}


node.pseudoState {
  label: "";
}

node.pseudoState[kind='join']:selected {
  shape         : url('svg/and_join_h.svg');
}

node.pseudoState[kind='join'] {
  shape         : url('svg/and_join.svg');
}

node.pseudoState[kind='fork'] {
  shape         : url('svg/and_split.svg');
}

node.pseudoState[kind='fork']:selected {
  shape         : url('svg/and_split_h.svg');
  label:"";
}

node.pseudoState[kind='choice'] {
  shape         : url('svg/or_split.svg');
}

node.pseudoState[kind='choice']:selected {
  shape         : url('svg/or_split_h.svg');
  label:"";
}

node.finalState {
  shape         : url('svg/stop_accepted.svg');
  label: "";
}

node.finalState:selected {
  shape         : url('svg/stop_accepted_h.svg');
}

node.pseudoState[kind="initial"] {
  shape         : url('svg/start.svg');
}

node.pseudoState:selected[kind="initial"] {
  shape         : url('svg/start_h.svg');
}

node {
  Anchor        : TopLeft;
  class         : ilog.views.sdm.graphic.IlvGeneralNode;
  shapeWidth    : 38;
  shapeHeight   : 38;
  label         : @name;
  labelAlignment: Center;
  labelColor    : black;
  labelPosition : Bottom;
  labelSpacing  : 2;
  labelZoomable : true;
  lineSpacing   : 0;
  maxLabelZoom  : 15;
  minLabelZoom  : .5;
  wordWrapMode 	: true;
  wordWrapChars   : " \t-,;";
  toolTipText   : @name;
  shape         : url('svg/blank.svg');
}

node:selected {
  shape         : url('svg/blank_h.svg');
}

node:expanded {
  foreground    : '240,240,240' ;
}

node:expanded:selected {
  foreground    : '240,220,220' ;
}

node:collapsed:collapsed:collapsed {
    shape         : url('svg/sub_graph.svg');
}

node.activity[CSSclass='anchor'] {
    shape         : url('svg/cross.svg');
}

node:collapsed:collapsed:selected {
  shape         : url('svg/sub_graph_h.svg');
}


node.workflow {
  shape         : url('svg/start.svg');
}

node.end {
  shape         : url('svg/stop.svg');
}

node.end[CSSclass='bad'] {
  shape         : url('svg/stop_rejected.svg');
}

node.end[CSSclass='result'] {
  shape         : url('svg/result.svg');
}

node.end[CSSclass='good'] {
  shape         : url('svg/stop_accepted.svg');
}

node.message[CSSclass='question'] {
  shape         : url('svg/question.svg');
}

node.message[CSSclass='warning'] {
  shape         : url('svg/warning.svg');
}

node.join {
  shape         : url('svg/or_join.svg');
}

node.join[join_type='AND join'] {
  shape         : url('svg/and_join.svg');
}


node.split {
  shape         : url('svg/split.svg');
}

node.split[split_type='XOR split'] {
  shape         : url('svg/or_split.svg');
}

node.split[split_type='AND split'] {
  shape         : url('svg/and_split.svg');
}

node.activity {
  shape         : url('svg/activity.svg');
}

node.activity[implementation="no"] {
  shape         : url('svg/manual_activity_2.svg');
}

node.activity[implementation="manual"] {
  shape         : url('svg/manual_activity.svg');
}

node.activity[implementation="applications"] {
  shape     : url('svg/activity.svg');
}

node.activity[implementation="workflow"] {
  shape     : url('svg/sub_activity.svg');
}

node.activity[route="true"] {
  shape     : url('svg/routing.svg');
}

node.participant {
  shape     : url('svg/human.svg');
}

node.participant[kind='resource'] {
  shape     : url('svg/move.svg');
}

node.participant[kind='role'] {
  shape     : url('svg/role.svg');
}

node.participant[kind='organisational_unit'] {
  shape     : url('svg/organisation.svg');
}

node.participant[kind='phone'] {
  shape     : url('svg/phone.svg');
}

node.participant[kind='mail'] {
  shape     : url('svg/mail.svg');
}

node.data {
  shape     : url('svg/data.svg');
}

node.application {
  shape     : url('svg/tool.svg');
}

node.workflow:selected {
  shape         : url('svg/start_h.svg');
}

node.end:selected {
  shape         : url('svg/stop_h.svg');
}

node.end:selected[CSSclass='result'] {
  shape         : url('svg/result_h.svg');
}

node.end:selected[CSSclass='bad'] {
  shape         : url('svg/stop_rejected_h.svg');
}

node.end:selected[CSSclass='good'] {
  shape         : url('svg/stop_accepted_h.svg');
}

node.message:selected[CSSclass='question'] {
  shape         : url('svg/question_h.svg');
}

node.message:selected[CSSclass='warning'] {
  shape         : url('svg/warning_h.svg');
}

node.join[join_type='XOR join']:selected {
  shape         : url('svg/or_join_h.svg');
}
node.join:selected {
  shape         : url('svg/or_join_h.svg');
}

node.join[join_type='AND join']:selected {
  shape         : url('svg/and_join_h.svg');
}


node.split:selected {
  shape         : url('svg/split_h.svg');
}

node.split[split_type='XOR split']:selected {
  shape         : url('svg/or_split_h.svg');
}

node.split[split_type='AND split']:selected {
  shape         : url('svg/and_split_h.svg');
}

node.activity:selected {
  shape         : url('svg/activity_h.svg');
}

node.activity[implementation="no"]:selected {
  shape         : url('svg/manual_activity_2_h.svg');
}

node.activity:selected[implementation="manual"] {
  shape         : url('svg/manual_activity_h.svg');
}

node.activity[implementation="applications"]:selected {
  shape     : url('svg/activity_h.svg');
}

node.activity[implementation="workflow"]:selected {
  shape     : url('svg/sub_activity_h.svg');
}

node.activity[route="true"]:selected {
  shape     : url('svg/routing_h.svg');
}

node.participant:selected {
  shape     : url('svg/human_h.svg');
}

node.participant[kind='resource']:selected {
  shape     : url('svg/move_h.svg');
}

node.participant[kind='role']:selected {
  shape     : url('svg/role_h.svg');
}

node.participant[kind='organisational_unit']:selected {
  shape     : url('svg/organisation_h.svg');
}

node.participant[kind='phone']:selected {
  shape     : url('svg/phone_h.svg');
}

node.participant[kind='mail']:selected {
  shape     : url('svg/mail_h.svg');
}

node.data:selected {
  shape     : url('svg/data_h.svg');
}

node.application:selected {
  shape     : url('svg/tool_h.svg');
}

link {
  class            : ilog.views.sdm.graphic.IlvGeneralLink;
  mode             : MODE_GRADIENT;
  lineWidth        : 2;
  minimumLineWidth : 2;
  maximumLineWidth : 2;
  lineJoin         : JOIN_ROUND;
  arrowMode        : ARROW_FILL;
  endCap           : CAP_ROUND;
  oriented         : true;
  foreground       : 135,206,235 ;
  arrowColor       : black;
  arrowRatio       : "2";
  toolTipText      : @id;
  label            : @condition ;
}

link:selected {
  foreground : '206,99,0';
  arrowColor : '206,99,0';
  mode       : "MODE_NEON";
  lineWidth  : 4
  maximumLineWidth  : 4;
  arrowRatio : 1;
}

link.tool_link, link.manual_link, link.data_link {
  NodeSideForOrigin : Any;
  NodeSideForDestination : Horizontal;
}

link.color1 {
  foreground : 221,160,221 ; // plum
}
link.color2 {
  foreground : 152,251,152; // pale green
}
link.color3 {
  foreground : 127,255,212; // aquamarine
}
link.color4 {
  foreground : 255,192,203; // pink
}
link.color5 {
  foreground : 255,160,122; // light salmon
}

link.transition.good[condition] { 
  decorationPositions[0] : 0.2;
  decorations[0] : @#label;
}
link.transition.bad[condition] { 
  decorationPositions[0] : 0.3;
  decorations[0] : @#label;
}

#label {
  class   : ilog.views.sdm.graphic.IlvPowerLabel;
  IlvRect : 0,0,40,20;
  label   : @condition;
  Anchor  : Center;
  marginX : 5;
  marginY : 5;
  foreground : black;
  backgroundGraphic : @#rectBG;        
  antialiasing      : true ;
}

#rectBG {
  class : ilog.views.sdm.graphic.IlvGraphicFactories$Rectangle;
  IlvRect : 0,00,40,20;
  foreground : white ;
  background : white ;
}

#rectBG.good {
  foreground : blue;
}

#rectBG.bad {
  foreground : red ;
}


link.start_transition {
  lineStyle : 4,4;
  endCap    : CAP_BUTT;
  curved    : .65;
}

link.subflow_reference {
  lineStyle : 8,4;
  endCap    : CAP_BUTT;
  curved    : .65;
}

link.manual_link, link.tool_link, link.data_link {
  lineStyle  : 1,10;
  foreground : #FEFEFE;
  endCap     : CAP_ROUND;
  oriented   : false;
  curved     : 0.8;
}

link.manual_link:selected, link.tool_link:selected, link.data_link:selected {
  lineStyle  : 1,10;
  foreground : #FE0000;
  endCap     : CAP_ROUND;
  oriented   : false;
  curved     : 0.8;
}

link.tool_link {
  lineStyle : 4,4;
  lineWidth : 2;
  endCap : CAP_BUTT ;
}

link.data_link {
  endCap : CAP_SQUARE ;
}

link.transition {
  label            : @guard;
}
