:root {
    --ui-main-color: #4e4e7e;
    --ui-neutral-color: gray;
    --ui-on-color: green;
    --ui-highlight-color: orange;

    --checked-bg-color: #4e4e7e;
    --checked-bga-color: rgba(78, 78, 126, .4);
    --checked-fg-color: #EEE;
}

/* dark mode, yes please */
body {
    background-color: Canvas;
    color: CanvasText;
    color: #CCC;
    color-scheme: light dark;
    padding: 1em;
}


/* Control panel for state */
.voiceEventControlPanel {
    border-radius: 5px;
    display: flex;
    line-height: 2em;
    margin-bottom: 2em;
}
.voiceEventControl {
    display: grid;
    align-items: center; /* Aligns items vertically */
    line-height: 2em;
    margin: 0em 1em;
}


/* visualize the current state of speech event */
.voiceEventVisualizers {
    margin-top: 2em;
}
.voiceEventVisualizer {
    display: block;
    margin-top: 1em;
    border: .2em solid var(--ui-main-color);
    border-radius: 5px;
}
.voiceEventVisualizer .header {
    display: block;
    padding: .5em;
    background-color: var(--ui-main-color);
}
.voiceEventVisualizer .content {
    display: block;
    padding: .5em;
}



/* On mouse-over */
.btn {
    border: none;
    background-color: var(--ui-main-color);
    padding: 7px 14px;
    font-size: 16px;
    cursor: pointer;
    display: inline-block;
    border-radius: 5px;
}
/* On mouse-over */
.btn:hover {
    transform: translateY(-1px) translateX(-1px); 
    box-shadow: 1px 1px 4px rgba(240, 240, 232, 0.24);
}
/* On mouse-down */
.btn:active { 
    box-shadow: 0px 0px 4px rgba(255, 123, 232, 0.24); 
    transform: translateY(0px) translateX(0px); 
} 

.success {color: green;}
.info {color: dodgerblue;}
.warning {color: orange;}
.danger {color: red;}
.default {color: black;}

.pill { display: inline-flex; flex-direction: row; }
.pill input[type='radio'] { display: none; }
.pill > .pill-button { display: inline-block; }
.pill > .pill-button > label { border: solid 1px #666; cursor: pointer; display: block;  padding: 0 .5em; padding-bottom: 1px; }
.pill > .pill-button > input[type='radio']:checked + label { background: var(--checked-bg-color); color: var(--checked-fg-color); }
.pill > .pill-button:hover > label { background-color: var(--checked-bga-color); box-shadow: inset 0 0 8px rgba(255, 255, 255, .2); }
.pill > .pill-button:hover > input[type='radio']:checked + label { box-shadow: none; }
.pill > .pill-button:first-child > label { border-radius: 5px 0 0 5px; }
.pill > .pill-button:not(:first-child) > label { border-left: none; }
.pill > .pill-button:last-child > label { border-radius: 0 5px 5px 0; }



/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--ui-neutral-color);
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--ui-on-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--ui-on-color);
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/** code **/

code { 
    display: inline;
    background: #333;
    padding: 0.2em;
    border-radius: 5px;
    white-space: pre-wrap;
}
code.block {
    display: block;
    padding: 0.5em;
    padding-bottom: 1.5em;
}

code .token.tagfix  { color: gray; }
code .token.tag  { color: salmon; }
code .token.attr { color: lightblue; }
code .token.logic { color: aqua; }
code .token.func   { color: lightgreen; }

code .token.key    { color: lightblue; }
code .token.string { color: orange; }
code .token.int    { color: lightgreen; }
code .token.bool   { color: lightgreen; }
code .token.punctuation { color: yellow; }