* {
    padding: 0;
    margin: 0;
}


/*
 * Note that the next few styles are used in menu.js (function style()),
 * and it depends on the order in which they appear in this file.
 */

.line {  /* all lines and arcs will inherit this */
    stroke: #000;
    fill-opacity: 0;
}

.hz_line {  /* for lines with style "hz_line" */
    stroke-width: 0.5;
}

.vt_line {  /* for lines with style "vt_line" */
    stroke-width: 0.5;
}

.nodedot {
    opacity: 0.5;
    fill: #00F;
}

.box {  /* not referenced in menu.js, but inherited by any box (nodeboxes too) */
    stroke: #000;
    stroke-width: 0.5;
}

.text {  /* all texts inherit this */
    font-family: sans-serif;
    user-select: none;
}

.nodebox {
    fill: #ffffff00;  /* make node boxes transparent by default */
}

.collapsed {
    fill-opacity: 0.3;
    fill: #EEE;
    stroke: #000;
    stroke-width: 0.4;
}


/* The foreground nodes (the ones that the mouse "feels") */

.fg_node {
    opacity: 0;
    fill: #222;
}

.fg_node:hover {
    opacity: 0.05;
}


.search {
    opacity: 0.3;
}

#div_tree {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
}

#div_aligned {
    display: none;
    position: absolute;
    right: 0px;
    width: 25%;
    height: 100%;
    touch-action: none;
}

#div_aligned_grabber {
    position: absolute;
    left: 0;
    height: 100%;
    z-index: 2;
    background-color: lightgray;
    width: 15px;
    cursor: ew-resize;
    opacity: 0;
}

#div_aligned_grabber:hover {
    opacity: 0.5;
}

#div_aligned_svg {
    background-color: white;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.dotted {
    stroke-dasharray: 4;
}

#div_scale {
    position: absolute;
    background-color: #FFFC;
    width: 180px;
    height: 30px;
    left: 15px;
    bottom: 0;
    stroke: #000;
    stroke-width: 1.5;
    font-family: sans-serif;
    font-size: 12px;
    overflow: hidden;
}

#div_legend {
    position: absolute;
    background: white;
    resize: both;
    z-index: 3;
    width: 300px;
    overflow-y: auto;
    border-style: solid;
    border-color: #CCC;
    border-width: 2px;
    border-radius: 4px;
}


/* Minimap-related */

#div_minimap {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    background-color: #FFF;
    visibility: hidden;
    touch-action: none;
    border-style: solid;
    border-width: 2px;
    border-color: #DDD;
    border-radius: 4px;
}

#div_visible_rect {
    position: absolute;
    border-style: solid;
    border-width: 1px;
    border-color: gray;
    border-radius: 4px;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.1);
    cursor: grab;
    touch-action: none;
}

#div_menu {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
}

#div_contextmenu {
    position: absolute;
    z-index: 4;
    visibility: hidden;
    border: 1px solid #AAA;
    background-color: white;
}

#div_info {
    position: absolute;
    z-index: 4;
    visibility: hidden;
    border-style: solid;
    border-color: #DDD;
    border-width: 2px;
    border-radius: 10px;
    box-shadow: 3px 3px 3px #DDD;
    background-color: white;
    padding: 10px 25px 10px 10px;
    user-select: text;
}

.info_button {
    position: absolute;
    top: 3px;
    right: 5px;
    padding: 1px 3px;
    border-style: hidden;
    background-color: #FFF0;
}

.info_button:hover {
    background-color: #EEE;
}

.ctx_button {
    width: 100%;
    cursor: pointer;
    padding: 3px 15px;
    border-style: hidden;
    text-align: left;
    background-color: white;
}

.ctx_button:hover {
    background-color: #88F;
    color: white;
}

.ctx_label {
    padding: 3px 10px;
    text-align: left;
    background-color: #EEE;
    font-family: sans-serif;
    font-size: 0.8em;
}

hr {
    border: 0;
    height: 1px;
    background-color: #333;
}

kbd {  /* from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd */
    background-color: #EEE;
    border-radius: 3px;
    border: 1px solid #B4B4B4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .2),
                0 2px 0 0 rgba(255, 255, 255, .7) inset;
    color: #333;
    display: inline-block;
    font-size: .85em;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    white-space: nowrap;
}


/*
 * Theming for tweakpane. Based on the "light" preset at
 * https://cocopon.github.io/tweakpane/theming/
 */

:root {
    --tp-base-font-family: sans-serif;
    --tp-base-background-color: hsla(0, 0%, 96%, 1.00);
    --tp-base-shadow-color: hsla(0, 0%, 0%, 0.1);
    --tp-button-background-color: hsla(0, 0%, 80%, 1.00);
    --tp-button-background-color-active: hsla(0, 0%, 65%, 1.00);
    --tp-button-background-color-focus: hsla(0, 0%, 70%, 1.00);
    --tp-button-background-color-hover: hsla(0, 0%, 75%, 1.00);
    --tp-button-foreground-color: hsla(230, 10%, 30%, 1.00);
    --tp-container-background-color: hsla(0, 0%, 50%, 0.20);
    --tp-container-background-color-active: hsla(0, 0%, 65%, 0.20);
    --tp-container-background-color-focus: hsla(0, 0%, 60%, 0.20);
    --tp-container-background-color-hover: hsla(0, 0%, 55%, 0.20);
    --tp-container-foreground-color: hsla(230, 10%, 30%, 1);
    --tp-groove-foreground-color: hsla(230, 15%, 30%, 0.1);
    --tp-input-background-color: hsla(230, 15%, 30%, 0.1);
    --tp-input-background-color-active: hsla(231, 15%, 45%, 0.10);
    --tp-input-background-color-focus: hsla(230, 15%, 40%, 0.10);
    --tp-input-background-color-hover: hsla(231, 15%, 35%, 0.10);
    --tp-input-foreground-color: hsla(230, 10%, 30%, 1.00);
    --tp-label-foreground-color: hsla(230, 10%, 30%, 0.7);
    --tp-monitor-background-color: hsla(230, 15%, 30%, 0.1);
    --tp-monitor-foreground-color: hsla(230, 10%, 30%, 0.5);
    user-select: none;  /* to avoid flickering using the aligned grabber */
}

.tp-rotv {
    font-weight: bold !important;
}

.tp-fldv.tp-cntv.tp-fldv-cpl {
    margin-bottom: 4px;  /* leave some space between submenus */
}

/* Tabs */
button.tp-tbiv_b {
    cursor: pointer;  /* have the cursor as a pointer in the tabs too */
}
