/* Genmapper CSS */
/**** Basic elements ****/
body{
  font: 15px sans-serif;
  margin: 0px;
}

button {
    background-color: steelblue;
    border: none;
    color: white;
    padding: 10px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

button img {
  width: 32px;
  height: 32px;
}

rect{
  fill:white;
}

h2{
  font-size:18px;
}

h3{
  font-size:16px;
  margin:0;
  padding:0;
  border: 0;
}

p {
  margin-top:0.3eM;
}

/**** Main page with templates links ****/
.box-template {
  margin: 20px;
  flex-grow: 1;
  flex-shrink: 1;
  border: solid black 2px;
  padding: 10px
}

.box-template:hover {
  opacity: 0.6;
}

/**** Left menu ****/
#left-menu{
  width:60px;
  float:left;
  margin: 5px;
}

#left-menu button{
  width:60px;
  border-top: 3px solid #ddd;
  border-left: 3px solid #ddd;
  border-bottom: 3px solid #bbb;
  border-right: 3px solid #bbb;
  padding: 10px 10px;
}

#left-menu button:hover{
  background-color: lightskyblue;
}

#left-menu p{
  width:60px;
  color: steelblue;
  margin: 5px;
  margin-top: 15px;
  border: 0px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 18px;
  font-weight: bold;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 60px;
    top: 0px;
    background-color: #f9f9f9;
    min-width: 100px;
    z-index: 1;
    padding: 0;
    border: 0;
    margin: 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

#lang-selector ul li{
  display: block;
}

#lang-selector ul li button {
  min-width: 100px;
  padding: 10px 10px 10px 10px;
}

.current-lang {
  color: #000;
  font-weight: bold;
}

/**** Modal windows ****/
.intro, .edit-group, .alert-message {
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.7);
}

.intro {
  display: none;
}

.intro--active{
  /* must be defined after .intro */
  display: block;
}

.edit-group {
  display: none;
}

.edit-group--active {
  /* must be defined after .edit-group */
  display: block;
}

.alert-message {
  display: none;
  z-index: 2;
}

.alert-message--active {
  /* must be defined after .alert-message */
  display: block;
}

#intro-content, #edit-group-content, #alert-message-content {
  border: double black 5px;
  padding: 25px;
  background: whitesmoke;
  position: relative;
  background-color: #fefefe;
  margin: 30px auto;
}

#intro-content {
  width: 80%;
  max-width: 800px;
}

#alert-message-content {
  max-width: 400px;
}

#edit-buttons {
  height: 60px;
  padding-top: 10px;
}

#edit-group-content {
  max-width: 400px;
}

#edit-group-content table {
  width: 100%;
  padding: 0px;
  border-collapse: collapse;
}

#edit-group-content td.left-field {
  vertical-align: top;
  width: 60%;
  padding-left: 20px;
  text-indent: -20px;
}

#edit-group-content td.right-field {
  vertical-align: top;
  padding-left: 5px;
  padding-bottom: 2px;
}

#edit-group-content h1{
  margin: 0 0 7px 0;
}

#edit-group-content button {
  width: 25%;
  height: 50px;
  border: 3px solid #ddd;
  padding: 5px 5px;
  float: left;
}

.close-alert {
  border: 3px solid #ddd;
}

#edit-group-content button:hover,
#intro-content button.cancel:hover,
.close-alert:hover {
  border: 3px solid #bbb;
  color: black;
  opacity: 0.8;
}

#intro-content button.cancel{
  border: 3px solid #ddd;
  padding: 5px 5px;
}

#edit-group-content button#edit-cancel, #intro-content button.cancel{
  float: right;
  background-color: #888;
  height: 2em;
  width: 2em;
  padding: 0;
}

#intro-content button.ok{
  background-color: #4CAF50; /* Green */
  border: none;
  color: white;
  padding: 15px 32px;
  font-size: 16px;
}

#edit-group-content input[type=text] {
  font-family: sans-serif;
  font-size: 14px;
  padding: 0px 2px;
  border-width: 2px;
  width: calc(100% - 8px);
}

#edit-group-content input[type=checkbox],
#edit-group-content input[type=radio] {
  margin: 0 .5em 0 0;
}

#edit-group-content #edit-parent {
  font-size: 14px;
  padding: 0px 0px 0px 4px;
  margin: 0;
}

#edit-submit{
  /* background-color: steelblue; */
  background-color: #4CAF50;
}

#edit-delete{
  background-color: red;
}

/**** SVG ****/
#genmapper-graph {
  float: left;
  width: calc(100% - 71px);
  height: 100%;
}

#genmapper-graph-svg {
  background: whitesmoke;
  height: 100%;
}


.addNode rect{
  fill: #b3ffb3;
}

.addNode {
  display: none;
}

.addNode:hover rect {
  fill:lime;
}

.removeNode rect{
  fill: lightsalmon;
}

.removeNode {
  display: none;
}

.removeNode:hover rect {
  fill:red;
}

.node text {
  font: 15px sans-serif;
  text-anchor: middle;
}

.node:hover > rect, .node:hover > line {
  fill: lightskyblue;
}

.node:hover g.addNode, .node:hover g.removeNode {
  display: block;
}

.node--active text, .link-text--active {
  stroke: black;
  fill: black;
}

.node--inactive text, .link-text--inactive {
  stroke: #000;
  fill: #000;
  opacity: 0.4;
}

.node--inactive image {
  opacity: 0.4;
}

.node--inactive > rect, .node--inactive > line {
  stroke: #ddd;
}

.link {
  fill: none;
  stroke: #ccc;
  stroke-width: 2px;
}

.link-text {
  text-anchor: middle;
}

.invisible-rect {
  fill-opacity:0;
  stroke-opacity:0;
}
