html {
    box-sizing: border-box;
    font: 11pt sans-serif;
}
html.waiting {
    pointer-events: none;
    cursor: wait;
}
body {
    overflow-x: hidden;
    margin: .5em;
    background: #AAA; /* anarchistic acronymics assosiations */
}

form {
    display: table;
    width: 100%;
    margin-bottom: .5em;
}

fieldset {
    display: table-cell;
    float: left;
    border: 2pt groove #CCC;
    margin: 0 .5em .5em .5em;
    padding: .5em;
    vertical-align: top;
}

fieldset:last-child-of-type {
    width: 100%;
}

fieldset legend {
    color: #555;
    text-shadow: 1px 1px white;
}

fieldset aside {
    font-size: smaller;
}

fieldset div {
    font-size: smaller;
}

input, select {
    font-size: 10pt;
}

form,
svg {
    -webkit-touch-callout: text;
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    margin: 0;
    padding: 0;
}

.svg-container {
    display: inline-block;
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* aspect ratio */
    vertical-align: top;
    overflow: hidden;
}

.svg-content-responsive {
    display: inline-block;
    position: absolute;
    padding: 10px;
}

svg {
    width: 100%;
    border: 1pt inset #AAA;
    margin: .5em;
    position: relative;
}

#workspace {
    background-color: #444;
    background-image: radial-gradient(#181819 2px, rgba(11, 11, 12, 0) 2px), radial-gradient(#181819 2px, rgba(11, 11, 12, 0) 2px), radial-gradient(rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0) 2px), radial-gradient(rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0) 2px);
    background-repeat: repeat, repeat, repeat, repeat;
    background-position: 0px 0px, 8px 8px, 0px 1px, 8px 9px;
    background-size: 16px 16px, 16px 16px, 16px 16px, 16px 16px;
}

.node {
    cursor: pointer;
    pointer-events: all;
    transition: opacity 0.75s linear;
}

.node.fadein {
    opacity: 1;
}

.node.fadeout {
    opacity: 0;
}

.node circle {
    fill: white;
    stroke-width: 1.5px;
    transform: scale(1.0);
}

.node circle:hover {
    stroke-width: 2.0px;
    transform: scale(2.0);
}

.node text {
    fill: white;
    font: 14px sans-serif;
    dominant-baseline: middle;
    pointer-events: none;
    opacity: 0.9;
}

.node text:hover,
.node:hover text {
    font: 28px sans-serif;
    font-weight: bold;
    stroke: black;
    opacity: 1.0;
}

.link {
    fill: none;
    stroke: tan;
    stroke-width: 1.5px;
    transition: opacity 0.75s linear;
}

.link.fadein {
    opacity: 1;
    transition-delay: 0.75s;
}

.link.fadeout {
    opacity: 0;
    transition: none;
}



/*** 
  DISPLAY 
***/

#control-panel,
#workspace {
    display: block;
    width: 100%;
}

#workspace {
    overflow-x: scroll;
}

#control-panel .exit-button,
#control-panel button, 
#control-panel select {
    height: 27px;
    padding: 3px 9px;
    margin: 0px;
    border-radius: 0px;
}

#control-panel input {
    height: 23px;
    position: relative;
    padding: 0px 6px;
    bottom: 1px;
    border: 1pt inset #ccc;
}

#control-panel button, 
#control-panel select {
    border: 1pt outset #CCC;
    font-size: inherit;
    background-color: inherit;
}

#control-panel select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#control-panel .exit-button {
    position: absolute;
    top: 6px; right: 6px;
    padding: 6px;
    margin: 6px;
    width: 27px;
    text-align: center;
    font-size: xx-large;
    font-weight: bold;
    border: 1pt outset #ccc;
}
#control-panel .exit-button:active {
    border-style: inset;
}

div#display {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 25%;
    left: 25%;
    margin: 0;
    padding: 5pt;
    width: 50%;
    min-height: .5em;
    max-height: 2em !IMPORTANT;
    background-color: #ABA;
    border: 2px outset #ABA;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 0 1em #ABA;
    opacity: 0.25; 
}
#display:focus,
#display:focus-within {
    opacity: 1.0 !IMPORTANT;
    z-index: 99;
}
#display:before {
    color: #FFFFED;
    background-color: #ABA;
    text-align: left;
    line-height: 1em;
    min-height: 1em;
    padding: 0pt 2pt;
    margin: 0;
    content: '▶ 'attr(title);
    display: block;
    width: 100%;
    height: 1em;
    cursor: move;
}
#display.display {
    max-height: 100% !IMPORTANT;
}
#display.display:before {
    content: '▼ 'attr(title);
}
#display div,
#display iframe {
    display: block;
    position: relative;
    vertical-align: bottom;
    overflow: scroll;
    margin: 5pt;
    margin-bottom: -2pt;
    text-align: center;
    float: none;
    clear: both;
    width: 100%;
    color: #DDD;
    background-color: white;
    font-size: 24pt;
    border: 2px inset #EFE;
    box-shadow: inset 0 0 8px 3px #CCC;
}
#display div {
    height: 0;
}
#display iframe {
    height: 100%;
    pointer-events: all;
}

test {
    display: block;
    z-index: 1000;
    position: absolute;
    top: 1.25em;
    border: 1pt inset #ABA;
    background-color: white;
    min-width: 100%;
    height: 100%;
    cursor: default;
    overflow: scroll;
}

/* Prevent the text contents of draggable elements from being selectable. */

/* -khtml-user-drag and -webkit-user-drag are required 
to make elements draggable in old WebKit 
*/

/***
[draggable] {
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -khtml-user-drag: element;
    -webkit-user-drag: element;
}
[draggable] iframe {        
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
}
***/
