/*
 * XDSMjs
 * Copyright 2016-2020 Rémi Lafage
 */

.node text {
  font-size: medium;
}

.edge text {
  font-size: small;
}

/** XDSM v1 ***************************************************/

/* Special hidden first component */
.xdsm .driver {
  visibility: hidden;
}

.xdsm .node {
  stroke: black;
  stroke-width: 1px;
}

/** XDSM v1 */
.xdsm .optimization {
  fill: #ccf;
}

.xdsm .lp_optimization {
  fill: #ccf;
}

.xdsm .analysis {
  fill: #cfc;
}

/* Forward compatibility */
.xdsm .implicit_analysis {
  fill: #9fccc9;
}

.xdsm .mdo {
  fill: #fcc;
}

/* Forward compatibility */
.xdsm .sub-optimization {
  fill: #fcc;
}

.xdsm .function {
  fill: #f2ccd9;
}

/* Forward compatibility */
.xdsm .implicit-function {
  fill: #f2ccd9;
}

.xdsm .mda {
  fill: #ffe5cc;
}

/* Forward compatibility */
.xdsm .group {
  fill: #ffe5cc;
}

/* Forward compatibility */
.xdsm .implicit-group {
  fill: #ffe5cc;
}

.xdsm .metamodel {
  fill: #fffccc;
}

.xdsm .doe {
  fill: #fffccc;
}

/* Text Default */
.xdsm text {
  fill: black;
  stroke: none;
  font-family: Arial, sans-serif;
}

/* Title */
.xdsm g.title text {
  display: block;
  margin: 0.67em 0;
  font-size: 1em;
  font-weight: bold;
}

.xdsm g.title rect {
  fill: none;
}

.xdsm tspan.sub {
  font-size: small;
}

.xdsm tspan.sup {
  font-size: small;
}

/* Data */
.xdsm .dataInter polygon {
  fill: #e5e5e5;
  stroke: black;
  stroke-width: 1px;
}

.xdsm .dataIO polygon {
  fill: #fff;
  stroke: black;
  stroke-width: 1px;
}

/* Dataflow */
.xdsm g.dataflow {
  fill: none;
  stroke: grey;
  stroke-width: 8px;
}

/* Workflow */
.xdsm g.workflow {
  fill: none;
  stroke: black;
  stroke-width: 2px;
}

/** XDSM v2 ***************************************************/

.xdsm2 .driver {
  visibility: hidden;
}

.xdsm2 .node {
  stroke: black;
  stroke-width: 1px;
}

.xdsm2 .optimization {
  fill: #a0cbe8;
}

.xdsm2 .sub-optimization {
  fill: #a0cbe8;
}

/* Deprecated: use optimization */

.xdsm2 .lp_optimization {
  fill: #a0cbe8;
}

/* Deprecated: use sub-optimization */

.xdsm2 .mdo {
  fill: #a0cbe8;
}

.xdsm2 .doe {
  fill: #a0cbe8;
}

.xdsm2 .function {
  fill: #8cd17d;
}

.xdsm2 .implicit-function {
  fill: #ff9d9a;
}

/* Deprecated: use function */
.xdsm2 .analysis {
  fill: #8cd17d;
}

.xdsm2 .mda {
  fill: #ffbe7d;
}

.xdsm2 .metamodel {
  fill: #f1ce63;
}

.xdsm2 .group {
  fill: #8cd17d;
}

.xdsm2 .implicit-group {
  fill: #ff9d9a;
}

/* Text Default */
.xdsm2 text {
  fill: black;
  stroke: none;
  font-family: Arial, sans-serif;
}

/* Title */
.xdsm2 g.title text {
  display: block;
  margin: 0.67em 0;
  font-size: 1em;
  font-weight: bold;
}

.xdsm2 g.title rect {
  fill: none;
}

.xdsm2 tspan.sub {
  font-size: small;
}

.xdsm2 tspan.sup {
  font-size: small;
}

/* Data */
.xdsm2 .dataInter polygon {
  fill: #e5e5e5;
  stroke: black;
  stroke-width: 1px;
}

.xdsm2 .dataIO polygon {
  fill: #fff;
  stroke: black;
  stroke-width: 1px;
}

/* Dataflow */
.xdsm2 g.dataflow {
  fill: none;
  stroke: grey;
  stroke-width: 8px;
}

/* Workflow */
.xdsm2 g.workflow {
  fill: none;
  stroke: black;
  stroke-width: 2px;
}

/* Tooltip */
div.xdsm-tooltip {
  position: absolute;
  text-align: center;
  padding: 10px;
  background: lightsteelblue;
  border: 0;
  border-radius: 8px;
  pointer-events: none;
}

/* Info */
div.optpb {
  position: absolute;
  padding: 10px;
  background: #ccf;
  border: 0;
  border-radius: 8px;
  font-size: 150%;
}

sub,
sup {
  /* Specified in % so that the sup/sup is the right size relative to the surrounding text */
  font-size: 75%;

  /* Zero out the line-height so that it doesn't interfere with the positioning that follows */
  line-height: 0;

  /* Where the magic happens: makes all browsers position the sup/sup properly, relative to the surrounding text */
  position: relative;

  /* Note that if you're using Eric Meyer's reset.css, this is already set and you can remove this rule */
  vertical-align: baseline;
}

sup {
  /* Move the superscripted text up */
  top: -0.5em;
}

sub {
  /* Move the subscripted text down, but only half as far down as the superscript moved up */
  bottom: -0.5em;
}

/* Version button */
label#xdsm-version-label {
  margin: 0 5px 0 50px;
  font-weight: bolder;
  font-size: 24px;
  font-family: Arial, sans-serif;
}

select#xdsm-version-toggle {
  display: table-cell;
  vertical-align: top;
  font-weight: bolder;
  font-size: 20px;
  font-family: Arial, sans-serif;
}

.subxdsm-link:hover {
  text-decoration: underline;
}
