:root {
    --gray: #626864;
    --gray: #686979;
    --lightgray: #949298;
    --darkgray: #212221;
    --verydarkgray: #141513;
    --green: forestgreen;
    --amber: rgb(245, 184, 20);
    --red: crimson;
    --blue: cornflowerblue;
    --palegreen: rgb(60, 200, 60);

    --textwhite: #bbb3c8;

    --headerheight: 90px;
    --documentationwidth: 290px;
    --pianoWidth: 30px;

    --editorstransition: 0.3s;
}

html, body {
	width: 100%;
	height: 100%;
	overflow:hidden;
	padding: 0;
	margin: 0;
}

body {
	font-size: 16px;
	font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier, Courier New, monospace, monospace, serif;
	color: var(--textwhite);
	background-color: black;
    transition: 2s;
    display: grid;
    /* grid-template-columns: auto 425px; */
    grid-template-columns: auto auto;
}

textarea, input, button, select {
	font-family: inherit;
	font-size: inherit;
}

div, section, span {
	box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
	outline: none !important;
	box-shadow: 0;
}


#picnic {
    transition: 0.7s;
    width: 100vw;
}

#picnic.docsopen {
    /* width: calc(100vw - var(--documentationwidth)); */
}

/* #documentation {
    font-family: Helvetica, Arial sans-serif;
    font-size: 1.1em;
    line-height: 144%;
    padding: 0;
    margin-top: 64px;
    overflow-y: scroll;
    transition: 0.7s;
    width: 0;
}

#documentation.docsopen {
    width: var(--documentationwidth);
} */

#documentation {

    background-color: var(--verydarkgray);
    font-size: 0.9em;
    /* line-height: 144%; */
    tab-size: 1;
    padding: 0;
    /* margin-top: 64px; */
    overflow-y: scroll;
    transition: 0.4s;
    width: 0;

    position: absolute;
    top: 60px;
    right: 0;
    height: calc(100% - 60px);
}

pre {
    font-family: Courier;
}

#documentation.docsopen {
    width: var(--documentationwidth);
}

#documentationbody {
    width: var(--documentationwidth);
    overflow: hide;
    padding: 0 18px 12px;
}

#documentationbody h2 {
    font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier, Courier New, monospace, monospace, serif;
    color: var(--gray);
    margin-top: 0px;
}



/* ******************   Header   ****************** */

/* ********* Menu Row ********* */

#menurow {
    padding: 10px 4px 16px;
    display: grid;
    grid-template-columns: 125px auto 34px;
}

/* *** Logo *** */

#logo {
    font-size: 1.5em;
    color: var(--gray);
	/* display: table; */
	/* width: 100%; */
    word-spacing: -0.3em;
    grid-column: 1 / 2;
    grid-row: 1;
}

#menuicon {
    display: inline-block;
    width: 30px;
    visibility: hidden;
}

/* *** Transport *** */

#transport {
    text-align: center;
    font-size: 1.05em;
    padding-top: 6px;
    word-spacing: .2em;
    grid-column: 2 / 3;
    grid-row: 1;
}

#play.on {
	color: var(--green);
}

#stop.on {
	color: var(--red);
}

#pause.on {
	color: var(--blue);
}

#update {
	color: slategray;
	padding-left: 12px;
}

#update.dirty {
	color: goldenrod;
}
#update.invalid {
	text-decoration: line-through;
    color: var(--variableRed);
    /*opacity: 0.5;*/
}

/* *** Hamburger *** */

#documentationbutton {
    /* font-size: 1.3em; */
    /* text-align: center; */
    position: absolute;
    top: 15px;
    right: 9px;
}

.hamburger {
	padding: 0;
	outline: none;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
}

.hamburger:hover {
    opacity: 1;
}

.hamburger:focus {
	outline: 0;
}

.hamburger-box {
    width: 26px;
}

.hamburger--spring .hamburger-inner,
.hamburger--spring .hamburger-inner:before,
.hamburger--spring .hamburger-inner:after
 {
	 background-color: var(--gray);
     width: 26px;
     height: px;
}

.hamburger--spring .hamburger-inner:before
 {
    top: 8px;
}

.hamburger--spring .hamburger-inner:after
 {
    top: 16px;
}

/* ********* Score Nav Row ********* */

#scorenavrow {
    display: grid;
    grid-template-columns: 116px auto 42px;
}

/* *** Score List *** */

#workslistcontainer {
	color: var(--blue);
    padding-left: 2px ;
    margin-top: 6px;
    margin-right: 12px;
}

.styledselectcontainer {
    /* width: 100%; */
    position: relative;
	float: left;
}
.styledselectcontainer:after {
    top: 35%;
    right: 0px;
    border: solid transparent;
    content: " ";
    position: absolute;
    pointer-events: none;
    border-top-color: inherit;
    border-width: 7px;
    background: black;
}

.styledselect {
    margin: 0;
	font-size: inherit;
	width: 100%;
	color: inherit;
    border: none;
    box-shadow: none;
    background-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 22px;
}


/* *** Section Tabs *** */

#subsectiontabs {
    /* width: 100%; */
	display: flex;
    /* flex-wrap: wrap; */
    flex-grow: 1;
    flex-basis: 0;
    white-space: nowrap;
    overflow: hidden;
}

#subsections {
    /* width: 100%; */
    /* max-width: 100%; */

	font-size: 0.85em;
	/* float: left; */
    /* margin-top: 8px; */
    user-select: none;
}

.subsection {
    width: 100%;
    min-width: 0;
    user-select: none;
}

.subsection, .subsectionsubmitbuttons {
	font-size: 0.85em;
	text-align: center;
	padding: 6px 4px;
	border: 2px solid var(--darkgray);
    color: var(--amber);
    background-color: black;
	display: inline-block;
	flex: 1 1 auto;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
}

.subsectionsubmitbuttons {
    border-radius: 0 0 10px 10px;
    border-radius: 10px;
    margin-left: 4px;
}

#subsectionedittoggle {
    border-radius: 10px 10px 0 0;
    transition: var(--editorstransition);
}

.subsection.last {
    color: var(--blue);
	/* flex: 1; */
}

.selectedtab {
	background-color: var(--darkgray);
}

.runningtab {
	color: var(--palegreen);
}

/* *** Add/Edit Buttons *** */

#addsubsection {
	/* width: 100%; */
    /* clear: both; */
    position: relative;

}

#subsectioneditors {
    position: absolute;
    z-index: 1000;
    top: 28px;
    right: 0px;
    font-size: 0.9em;
    display: grid;
    /* display: none; */
    grid-template-columns: auto auto auto auto auto auto;
    opacity: 0.0;
    transition: var(--editorstransition);
    height: 0px;
    overflow: hidden;
}

#subsectioneditors.show {
    /* display: grid; */
    opacity: 1.0;
    height: 33px;
    top: 38px;
}

.subsectionsubmitbuttons {
	font-weight: bold;
	padding: 4px 8px 1px;
	font-size: 1.2em;
    color: var(--green);
    float: right;
    width: 43px;
    /* margin-top: 2px; */
}

.subsectionsubmitbuttons div {
    /* margin-top: 2px; */
    /* padding: 4px 8px 3px; */
}

#subsectionsubmitrename {
    /* margin-top: 4px; */
    padding: 1px 8px 4px;
}

.subsectionsubmitbuttons.light {
    border-color: var(--gray);
}

#newsubsectionname {
	color: var(--amber);
    width: 180px;
	height: 27px;
	background: black;
    border: 2px solid var(--gray);
    /* border-radius: 10px; */
	padding-left: 4px;
    padding-right: 2px;
    margin-top: 0px;
    margin-right: 4px
}

#newsubsectionname.fade::placeholder  {
    color: var(--gray);
    opacity: 0.6;
    transition: 2s;
}

#newsubsectionname.flash::placeholder  {
    color: var(--amber);
    opacity: 1;
    transition: 0;
}


/* ******************   Main   ****************** */


#picniceditor{
    display: grid;
    grid-template-rows: auto 100px;
    grid-template-columns: auto 60% var(--pianoWidth);

}

#score, #piano {
    opacity: 1;
    transition: var(--editorstransition);
}

#score.dim, #piano.dim {
    opacity: 0.4;
}

/* ********* Score ********* */

#score {
    overflow-y: scroll;
    grid-row: 1 / 3;
    grid-column: 1 / 3;

}

#score.docsopen {
    height: 300px;
}

#editor {
    /* width: calc(100% - var(--pianoWidth)); */
    height: calc(100vh - var(--headerheight));
    /* height: calc(100vh - 800px); */
    /* position: absolute; */
    /* top: var(--headerheight);
    left: 0;
    bottom: 0;
    transition: 0.7s; */

}

#editor.nosee {
    visibility: hidden;
}

.ace_search {
    top: initial !important;
    bottom: 0;
}

.ace_mobile-menu {
    display: none !important
}

.ace_gutter, .ace_gutter-layer {
    /* width: 40px !important */
}

.ace_gutter-cell {
    /* padding-left: 8px; */
}

.ace_scroller {
    /* padding-top: 8px !important;
    margin-left: 8px !important; */
}

.ace_autocomplete > .ace_scroller {
    padding: 4px 4px;
    /* overflow-y: scroll; */
}

#arrow_keys {
    margin-top: 18px;
    width: 100%;
    text-align: center;
    /* position: inherit; */
}

#auto_select_toggle.on {
    color: var(--verydarkgray);
    background-color: var(--textwhite);
}

.arrow_keys_button {
    margin: 0 4px;
    padding: 8px 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--textwhite);
}

#copy_button.flash, #paste_button.flash {
    color: var(--verydarkgray);
    background-color: var(--textwhite);
}


/* ********* Piano Keyboard ********* */

#piano {
    width: var(--pianoWidth);
    height: calc(100vh - var(--headerheight));
    background-color: var(--darkgray);
    overflow-y: scroll;
    font-size: 0.7em;
    user-select: none;
    grid-row: 1 / 3;
    grid-column: 3 / 4;
}

#pianokeyboard {
    width: var(--pianoWidth);
	color: var(--green);
	white-space: nowrap;
    clear: both;
}

#pianokeyboard > span  {
    padding: 5px 5px;
    background-color: #293029;
    float: left;
    clear: both;
    border: 1px solid var(--darkgray);
    width: 100%;
}

#pianokeyboard > span.blackkey {
    /* padding: 1px 5px; */
    background-color: black;
    /* width: 75%; */
    /* margin-left: 25%; */
}

#pianokeyboard > span.root {
    border: 1px solid var(--green);
	color: var(--palegreen);
}

.grayed {
	color: rgba(60, 200, 60, 0.07);
}

.blackkey.grayed {
    color: rgba(60, 200, 60, 0.13);
}


/* ********* Console ********* */

#picnicconsole {
    padding: 8px;
    margin: 8px;
	font-size: 0.9em;
    color: var(--red);
    border: 1px solid var(--red);
    background-color: var(--verydarkgray);
    grid-row: 2 / 3;
    grid-column: 2 / 3;
}

#picnicconsoletext {
    display: table-cell;
    vertical-align: middle;
}

#picnicconsole.fade  {
    opacity: 0;
    transition: 2s;
}

#picnicconsole.flash  {
    opacity: .75;
    transition: 0;
}

/* ******************   Documentation   ****************** */



/* ***************************** */
/* ********* Utilities ********* */
/* ***************************** */

/* ********* Sundry ********* */

.hide {
	display: none;
}

.pointy {
    cursor: pointer;
}

.noselect {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ********* Tooltip ********* */

.tooltip {
    position: relative;
    display: inline;
}

.tooltip.center, .tooltip.right {
	padding-left: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    transition-delay: 1.2s;
}

.tooltip .tooltiptext {
	font-size: 0.7em;
	visibility: hidden;
	top: 150%;
	color: var(--textwhite);
    padding: 6px 8px;
    border-radius: 3px;
    position: absolute;
    z-index: 1;
	white-space: nowrap;
	background-color: var(--gray);
}

.tooltip.left .tooltiptext {
    left: -4px;
}

.tooltip.center .tooltiptext {
    left: 8px;
}

.tooltip.right .tooltiptext {
    right: -4px;
}

.tooltip .tooltiptext::after {
    content: " ";
    position: absolute;
    bottom: 100%;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent var(--darkgray) transparent;
}

.tooltip.left .tooltiptext::after, .tooltip.center .tooltiptext::after {
	left: 3px;
}

.tooltip.right .tooltiptext::after {
	right: 3px;
}

/* *********   Tablet   ********* */

/* a media querie for  */


@media only screen and (max-width: 820px) and (hover: none) {

    #editor {
        height: 568px;
    }

    #piano {
        height: 320px;
    }

}

/* *********   Phone   ********* */

@media only screen and (max-width: 500px) and (hover: none)  {

    #menurow {
        grid-template-columns: 100px auto 34px;
    }

    #logo {
        font-size: 1.2em;
        word-spacing: -0.3em;
    }

    #menuicon {
        width: 24px;
    }

    #editor {
        height: 320px;
    }

    #piano {
        height: 320px;
    }

}

@media only screen and (max-width: 400px) and (hover: none)  {

    #menurow {
        grid-template-columns: 100px auto 34px;
    }

    #logo {
        font-size: 1.1em;
        word-spacing: -0.3em;
    }

    #menuicon {
        width: 20px;
    }

    #transport {
        text-align: center;
        font-size: 0.92em;
        padding-top: 6px;
        word-spacing: .15em;
    }

}