/*
 * Copyright (c) Mike Lischke. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

/*
 * This file contains all default CSS rules for the light vscode them, used for various diagrams and graphs.
 * Use the "antlr4.customCSS" setting in vscode to specify your own file, if you like to override some rules.
 *
 * Most of the appearance is defined here, while only some adjustments for the dark theme exist in dark.css.
 * This style sheet is also used for exported svg files.
 */


/* ATN graphs */

.transition {
    fill: none;
    stroke: #AAA;
    stroke-width: 2px;
}

.marker {
    fill: #999;
    stroke: none;
}

.stateLabel {
    font: bold 11pt "Helvetica Neue", Arial, sans-serif;
    fill: white;
    text-anchor: middle;
    pointer-events: none;
}

.stateTypeLabel {
    font: bold 7pt monospace;
    fill: #EEE;
    text-anchor: middle;
    pointer-events: none;
}

.linkLabel {
    font: 9pt monospace;
    fill: #606060;
    text-anchor: middle;
    pointer-events: none;
    white-space: pre;
}

.linkLabel > .heading {
    fill: cornflowerblue;
    font-weight: 800;
}

.linkLabel > .predicate {
    fill: gray;
    font-weight: 400;
    font-size: 7pt
}

.state {
    stroke: #505050;
    stroke-width: 3px;
    cursor: move;
    pointer-events: all;
    /*filter: url(#black-glow);*/
}

.state.BASIC {
    fill: #AAA;
}

.state.START {
    fill: #36bde0;
}

.state.BSTART {
    fill: #f39900;
}

.state.PBSTART {
    fill: #98c000;
}

.state.SBSTART {
    fill: #607dbd;
}

.state.TSTART {
    fill: #ffd300;
}

.state.STOP {
    fill: #2baa5b;
}

.state.BEND {
    fill: #c2c269;
}

.state.SLBACK {
    fill: #608b4e;
}

.state.SLENTRY {
    fill: #a260cb;
}

.state.PLBACK {
    fill: #517979;
}

.state.LEND {
    fill: #9b90c3;
}

.state.RULE {
    fill: #b73645;
}

.state.RULE.recursive {
    fill: #36bde0;
}


/* Railroad diagrams */

/* The connection lines. */
svg.railroad-diagram path {
    stroke-width: 2;
    stroke: darkgray;
    fill: rgba(0, 0, 0, 0);
}

/* All text except comments. */
svg.railroad-diagram text {
    font: bold 12px Hack, "Source Code Pro", monospace;
    text-anchor: middle;
    fill: #404040;
}

/* Comment text */
svg.railroad-diagram text.comment {
    font: italic 10px Hack, "Source Code Pro", monospace;
    fill: #404040;
}

/* The terminal boxes. */
svg.railroad-diagram g.terminal rect {
    stroke-width: 2;
    stroke: #404040;
    fill: rgba(200, 200, 200, 1);
}

svg.railroad-diagram g.non-terminal rect {
    /* The non-terminal boxes. */
    stroke-width: 2;
    stroke: #404040;
    fill: rgba(255, 255, 255, 1);
}

/* Multiple choice text, not working atm. */
svg.railroad-diagram text.diagram-text {
    font-size: 12px Hack, "Source Code Pro", monospace;
    fill: red;
}

/* Multiple choice text, not working atm. */
svg.railroad-diagram path.diagram-text {
    stroke-width: 1;
    stroke: red;
    fill: red;
    cursor: help;
}

/* Multiple choice text, not working atm. */
svg.railroad-diagram g.diagram-text:hover path.diagram-text {
    fill: #f00;
}

/* Call graphs */

.node {
    font: 200 10px "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.link {
    stroke: #000;
    stroke-opacity: .2;
    fill: none;
    pointer-events: none;
}

.module-1 {
    fill: #0ca9fd;
}

.module-2 {
    fill: #63bf8d;
}

.module-3 {
    fill: #ff8801;
}

.module-4 {
    fill: #b9fc34;
}

.module-5 {
    fill: #90e0e0;
}

.module-6 {
    fill: #b4a3f5;
}

.module-7 {
    fill: #f92672;
}

.module-8 {
    fill: #e9e901;
}

.module-9 {
    fill: #83be69;
}

.module-10 {
    fill: #f1d18c;
}

.node:hover {
    fill: #000;
}

.node:hover,
.node-source,
.node-target {
    font: 700 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
    cursor: pointer;
}

.node-source {
    fill: #ff5711;
}

.node-target {
    fill: #45aa73;
}

.link-source,
.link-target {
    stroke-opacity: 1;
    stroke-width: 2px;
}

.link-source {
    stroke: #3dcd92;
}

.link-target {
    stroke: #ff5711;
}

@keyframes fadeOut {
    0% {
        stroke-opacity: 0.2;
    }

    100% {
        stroke-opacity: 0.075;
    }
}

@keyframes fadeIn {
    0% {
        stroke-opacity: 0.075;
    }

    100% {
        stroke-opacity: 0.2;
    }
}

.link-dimmed {
    stroke-opacity: 0.075;
}


/* Parse trees */
.tree-node {
    stroke-width: 2;
    stroke: #C0C0C0;
    fill: rgba(255, 255, 255, 1);
}

.tree-root {
    stroke-width: 2;
    fill: #7db6dd;
    stroke: #7db6dd;
}

.tree-leaf {
    cursor: default;
    stroke-width: 2;
    fill: rgba(160, 171, 136, 1);
    stroke: rgba(117, 119, 91, 1);
}

.tree-error {
    stroke-width: 2;
    fill: #dd8f7d;
    stroke: rgba(188, 106, 122, 1);
}

.tree-node text {
    cursor: default;
    font: 16px "Helvetica Neue", sans-serif;
    fill: rgba(41, 41, 41, 1);
    stroke: none;
}

.tree-leaf text,
.tree-root text,
.tree-error text {
    font: 16px "Helvetica Neue", sans-serif;
    fill: #ffffff;
    stroke: none;
}

.tree-link {
    stroke-width: 2px;
    fill: none;
    stroke: rgba(128, 128, 128, 1);
}

g .token-value {
    fill: #404040;
    stroke: none;
    font: 14pt "Source Code Pro", "Hack", "Consolas", "Andale Mono", monospace;
}

g .token-range {
    fill: rgba(0, 77, 98, 1);
    stroke: none;
    font: 8pt "Source Code Pro", "Hack", "Consolas", "Andale Mono", monospace;
}

.saveSVGButton {
    background-image: url(./save-svg-light.svg);
    width: 32px;
    height: 32px;

    margin-left: 8px;

    background-position: center;
    background-repeat: no-repeat;
}

.saveHTMLButton {
    background-image: url(./save-html-light.svg);
    width: 32px;
    height: 32px;

    background-position: center;
    background-repeat: no-repeat;
}

.headerIcon {
    width: 90px;
    height: 90px;
    margin-top: 20px;

    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.rrdIcon {
    background-image: url(./rrd-light.svg);
}

.atnIcon {
    background-image: url(./atn-light.png);
}

g .rrd-warning {
    stroke: orange;
}

g .rrd-predicate {
    stroke: rgba(23, 159, 255, 0.5);
}

.atn-graph-color {
    color: crimson;
}

.rrd-graph-color {
    color: rgba(10, 188, 80, 1);
}

.call-graph-color {
    color: rgba(255, 191, 15, 1);
}

.call-graph-save-image {
    background: url('../misc/save-svg-light.png');
    vertical-align: middle;
    margin-left: 5px;
    width: 24px;
    height: 24px;
    display: inline-block;
    cursor: pointer;
}

.parse-tree-color {
    color: rgba(49, 112, 212, 1);
}

.parse-tree-save-image {
    background: rgba(49, 112, 212, 1) url('../misc/save.png');
    vertical-align: middle;
    margin-left: 5px;
    width: 24px;
    height: 24px;
    display: inline-block;
    cursor: pointer;
}

.switch label {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.switch input {
    display: none;
}

.switch > span {
    display: inline-block;
    top: 3px;
    transition: left 0.2s;
}

.switch-border {
    height: 12px;
    width: 24px;
    position: relative;
    border: 1px solid rgba(49, 112, 212, 0.75);
    background-color: rgba(49, 112, 212, 0.75);
    border-radius: 3.5em;
}

.switch-handle-top {
    width: 12px;
    height: 12px;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    background-color: white;
    border-radius: 2.5em;
    transition: left 0.2s;
}

.switch input:checked ~ .switch-handle-top {
    top: 0;
    left: 12px;
}
