/* see img/palette.png or http://paletton.com/#uid=54v0u0kllll5u++dqw0tgaFK-00 for color scheme */

body {
    margin: 0 5em;  /*center horizontally*/
    height: 100%;
    color: #1f0938;
    font-family: Times New Roman;  /* force similar-width characters across OS and browsers (hopefully) */
}

body.noscroll {
    overflow: hidden;
}

.waiting {
    cursor: progress !important;
}

#content {
    position: relative;
    margin: 0 auto;
    padding: 1em 0;
}

#pagenav {
    position: fixed;
    left: .5em;
    z-index: 12;
}

#pagenav a {
    text-decoration: none;
}

#pagenav p {
    display: flex;
    font-weight: bold;
    margin: 0;
    color: #1f0938;
    background: #e9d7ff;
    padding: .5em 1em;
    border-radius: 8px;
    box-shadow: 2px 2px 2px #1f0938;
    cursor: pointer;
    line-height: 24px;
}

#pagenav p img {
    display: inline-flex;
}

#pagenav > :first-child span {
    /*line-height: 24px;  /* height of the icon */
    margin-left: 1em;
}

#pagenav > :nth-child(2) {
    display: none;
}

#pagenav > :nth-child(2) > a > p {
    color: #e9d7ff;
    background-color: #896aad;
}

#pagenav > :nth-child(2) img {
    margin-right: .5em;
}

.horflex {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

#header.horflex {
    justify-content: space-between;
}

#footer .left, #footer .right {
    width: 50%;
    border-left: 10px solid #896aad;
    padding-left: .5em;
    padding-right: 2em;
}

#footer span {
    display: inline-block;
    margin-bottom: .4em;
}

#footer a {
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.headerimg {
    height: 60px;
}

.footerimg {
    max-height: 80px;
    max-width: 300px;
}

#content h2 { /* headline */
    color: #e9d7ff;
    background-color: #896aad;
    padding: .5em 0 .2em;
    margin: .2em 0;
    border-radius: 0 0 12px 12px;
}

.occludable {
    position: relative;  /* necessary for `position: absolute` in children to reference THIS element */
    min-height: 200px;  /* ensure there is enough space for the text */
}

.occluder {
    position: absolute;  /* aligns itself to nearest parent with `position: relative` */
    margin: 0 auto;
    z-index: 10;
    /* The `100%` dimension values work with this specific configuration but did not in a million others, and I have no idea why. */
    width: 100%;  
    height: 100%;
    background: rgba(215, 234, 255, 0.6);
    text-align: center;
    /* next three lines: center text vertically */
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.loadinganimation {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 8px solid #1f0938;
    border-right-color: transparent;  /* make one quarter of the element visually different */
    border-radius: 50%;
    box-shadow: 0 0 25px 2px #1f0938;
    animation: loadingspin 1s linear infinite;  /* name of the animation */
}

@keyframes loadingspin {
    from { transform: rotate(  0deg); opacity: 0.2; }
    50%  { transform: rotate(180deg); opacity: 1.0; }
    to   { transform: rotate(360deg); opacity: 0.2; }
}

#network-container {
    height: 560px;
}

h1, h2, h3, p {
    text-align: center;
}

table {
    margin: 0 auto;
    width: inherit;
    display: flex;
    justify-content: space-around;
}

td {
    text-align: center;
    vertical-align: middle;
    padding: 0.2em 0.4em 0.2em 0.4em;
}

select {
    display: block;
    width: 100%;
}

.smallfont {
    font: 10px sans-serif;
}

.hidden {
    display: none !important;
}

.helpfocus, .intlabel {
    font-weight: bold;
}

.intarrow {
    position: relative;
    height: 25px;
}

.arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-25%, -50%);
    border-left-width: 10px;
    border-left-style: solid;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.intlabel {  /*spans with text on interaction arrows*/
    text-align: center;
    display: block;
    opacity: .666;
}

.buttonlike {
    white-space: nowrap;
    color: #1f0938;
    opacity: .3;
    padding: .5em;
    background-color: #e9d7ff;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    box-shadow: 2px 2px 2px #1f0938;
    cursor: pointer;
}

.buttonfacsimile {
    white-space: nowrap;
    font-size: small;
    color: #1f0938;
    padding: .12em .5em;
    background-color: #e9d7ff;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    box-shadow: 2px 2px 2px #1f0938;
    cursor: text;
}

.buttonlike:not(.disabledbuttonlike):hover {
    font-weight: bold;
    opacity: 1;
}

.disabledbuttonlike {
    box-shadow: none;
    cursor: not-allowed;
}

.vertflex {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    text-align: center;
}

.cl_node {
    height: 25px;
    box-shadow: 2px 2px 2px #1f0938;
}

.legend_class .cl_node {
    width: 40px;
    margin: 0 auto;
}

.colorstripe {
    width: 100%;
    height: 30px;
}

.legend {
    height: 100%;
    font-size: 14px;
}

.legend_class .horflex {
    justify-content: space-between;
    height: 50%;
    padding: 0 1em;
}

.legend .skew15 {
    transform: skewX(15deg);
}

.legend .border6 {
    border-radius: 6px;
}

.legend .border050 {
    width: 25px;
    border-radius: 50%;
}

/* For phenotypes, see https://jtauber.github.io/articles/css-hexagon.html for a tutorial on hexagons. */

.legend_color > div {
    width: 255px;
    margin: 0 auto;
}

.legend_color span {
    line-height: 25px;  /* giving a value centers text vertically */
}

.legend_color input[type=range] {
    margin: 0;
    padding: 0;
    width: 127px;
}

.legend_color label {
    font-weight: bold;
}

.legend_color label[id^=csfix] {
    font-size: small;
    background-color: whitesmoke;
    position: absolute;
    top: -1.5em;
}

.legend_color label[id^=csfixmin] {
    left: .2em;
}

.legend_color label[id^=csfixmax] {
    right: .2em;
}

.stashed-away {  /* use to position an element out of sight without affecting its clientHeight/clientWidth attributes */
    position: fixed;  /* position stays relative to viewport */
    top: -5000px;
    left: -5000px;
}

.cywrapper {
    position: relative;  /* necessary for absolute positioning of child elements */
    display: block;
    width: 100%;
}

.cywrapper:before {  /* force 4:3 aspect ratio for .cywrapper content */
    content: "";
    display: block;
    margin-top: 75%;
}

.cy {
    border-style: solid;
    border-color: #1f0938;
}

/* The canvases affect cytoscape.js's viewports. */
.cy, .cy div, .cy canvas {
    border-radius: 25px 0px 25px 25px;  /*rounded corners*/
    /* anchor on all four container sides */
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.unmarked {  /* for qtip buttons; echoes the style of selected nodes */
    border: 2px solid #1f0938;
    border-radius: 3px;
}

.column {  /*can be used for table-like multi-column arrangements, e.g. the menu parts or the legend parts*/
    flex: 1 1 auto;
}

.bordered {
    border: 2px solid #1f0938;
    border-radius: .4em;
}

/* mainmenu */
.mainmenu {
    height: 250px;
    display: block;
}

.menuwrapper {
    height: inherit;
    display: flex;  /*use together with .column in the children*/
}

.mainmenu p {
    margin: 0;
}

.mainmenu p + p {
    margin-top: 1.5em;
}

.simplewrapper {
    color: #e9d7ff;
    border-style: solid;
    border-width: 4px 4px 0px 0px;
    border-color: #896aad;
    border-radius: 15px 15px 20px;
}

.colect { /*container for node color selection (left third of mainmenu)*/
    width: calc(100% - 575px);
    position: relative;  /* needed for absolute positioning of child elements (e.g. "Unselect all" buttonlike) */
    background-color: #896aad;
    border-radius: 12px 0px 0px 12px;
}

.selleg { /*container for spotlight and legend (middle third of mainmenu)*/
    width: 575px;  /*needs space for select2 dropdowns*/
    color: #1f0938;
    background-color: #e9d7ff;
    border-radius: 0px 12px 0px 0px;
    text-align: center;
}

.selleg h4 {
    margin: 0;
}

.netman { /*container for network manipulation options (right third of mainmenu)*/
    width: 250px;
    background-color: #896aad;
    border-radius: 0px 0px 15px 12px;
    position: relative;
}

.selsubgraphs {
    min-width: 210px;  /* keep "No regulatory subnetworks" fully visible */
}

.legend {
    height: 150px;
    -webkit-border-radius: 0 0 25px 25px;
    -moz-border-radius: 0 0 25px 25px;
    border-radius: 0 0 25px 25px;
    /* distribute children, with surrounding space */
    display: flex;
    justify-content: space-around;
}

.legend hr {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    padding: 1px 0;
    margin: 0;
    opacity: .4;
}

.select2-selection__choice {
    color: #1f0938;
    background-color: #e9d7ff !important;
}

#downloads > ul > li {
    margin: .15em 0;
}

.citation {
    max-width: 960px;
    margin: 1em auto;
}

/* instruction "pop-up" elements */
.instructionbox {
    position: absolute;
    max-width: 250px;
    opacity: .2;
    z-index: 3;
}

.instructionbox:hover {
    opacity: 1;
}

.instructionbox.left {
    left: -4.5em;  /* move left into the body's 5em margin */
}

.instructionbox.right {
    right: -4.5em;  /* move right into the body's 5em margin */
}

.instructions {
    display: inline-block;
    color: #e9d7ff;
    background-color: #4d2d73;
    padding: .6em;
    border-radius: 8px;
}

.instructions a {
    color: #eee;
}

.instructionbox > img {
    position: absolute;
    height: 100%;
    max-height: 25px;
    top: 10%;
}

.instructionbox.left .instructions {
    box-shadow: -2px 2px 2px #4d2d73,
                -2px -2px 2px #4d2d73;
}

.instructionbox.right .instructions {
    box-shadow: 2px 2px 2px #4d2d73,
                2px -2px 2px #4d2d73;
}

.instructionbox.left > img {
    right: 0;  /* move to parent's right border */
    transform: translateX(100%);  /* move own width to the right */
}

.instructionbox.right > img {
    left: 0;  /* move to parent's left border */
    transform: translateX(-100%)
                scaleX(-1);    /* move own width to the left, then flip horizontally */
}

#instructionblocker {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0px;
    left: 0px;
    z-index: 15;
    background: transparent;
}

#instructiondetails {
    position: absolute;
    width: 70%;
    max-width: 960px;
    height: 70%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #896aad;
    border-radius: 5%;
    box-shadow: 0 0 100vw 20vw #1f0938;
    text-align: center;
}

#instructiondetails p {
    text-align: justify;
}

#instructiondetails h3 {
    padding: .5em 0;
    margin: .5em 0 0;
}

#instructiondetails > :first-child {
    position: relative;
    height: calc(100% - 5.5em);  /* leave space for button */
    overflow-y: auto;
    margin: 2em 1.5em 1em;
    padding: 0 2em;
    color: #1f0938;
    background: rgba(255, 255, 255, .8);
}

#instructiondetails section ul,
#instructiondetails section ol {
    width: 80%;
    margin: 1em auto;
    text-align: left;
}

#instructiondetails section img {
    max-width: 80%;
    margin: 1em auto;
}

#instructiondetails section .horflex img {
    max-width: 95%;  /* allow more space for images in multi-column arrangements */
}

#instructiondetails section a {
    text-align: center;  /* for images in <a> elements */
}

#instructiondetails li + li {
    margin-top: .5em;
}

#inst-toc + ol {
    text-align: left;
    font-weight: bold;
}
