body {
    margin: 0;
    padding: 0;
    background: #222;
    font-family: sans-serif;
    font-size: 16px;
    color: white;

    /* prevent two finger swipe navigating forward/back */
    overscroll-behavior: none;
}

h1 {
    text-align: center;
}

hr {
    border: 0px;
    height: 2px;
    background: #444;
}

a:link {
    color: #F00;
    text-decoration: none;
}
a:hover {
    color: #F00;
    text-decoration: underline;
}
a:visited
{
    color: #A00;
    text-decoration: none;
}

div.layout
{
    display: flex;
    flex-flow: column;
    height: 100%;
}

div.logotext
{
    display: inline-block;
    margin: 10px;
    text-align: center;
    color: #F00;
    font-size: 22;
    font-weight: bold;
    cursor: default;
    user-select: none;
    -moz-user-select: none;
}

div.logotext
{
    display: inline-block;
    margin: 10px;
    text-align: center;
    color: #F00;
    font-size: 22;
    font-weight: bold;
    cursor: default;
    user-select: none;
    -moz-user-select: none;
}

div.top_bar
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    background: #333;
}

div.top_menu
{
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
}

div.top_buttons
{
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
}

div.menu_button, a.menu_link:link, a.menu_link:visited
{
    display: inline-block;
    margin: 4px;
    padding: 4px;
    color: #FFF;
    text-align: center;
    font-size: 18;
    font-family: sans-serif;
    cursor: pointer;
    user-select: none;
    -moz-user-select: none;
}

div.menu_button:hover, a.menu_link:hover
{
    background: #F00;
    text-decoration: none;
}

div.tabcontent
{
    flex-grow: 1;

    padding-left: 10px;
    padding-right: 10px;

    /* Limit the width of text tabs */
    margin: auto;
    max-width: 900;
}

/****************************************************************************/

/* Project title display/edit box on the main page */
#project_title {
    border: none;
    border-color: transparent;
    background: none;
    color: white;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    outline: none;
    margin-top: 22px;
    margin-bottom: 10px;
}

#top_buttons_div {
    width: 100%;
    margin: 12px auto;
    display: flex;
    justify-content: center;
    /*border: 2px solid white;*/
}

#grid_cont
{
    display: flex;
    justify-content: center;
    margin: 12px auto;
}

#row_names_div {
    display: inline-block;
    padding: 2px;
}

#pat_div {
    display: inline-block;
    width: 680px;
    border: 1px solid #555;
    padding: 2px;
    overflow-x: scroll;
    white-space: nowrap
}

#buttons_div {
    margin: 12px auto;
    display: flex;
    justify-content: center;
}

#controls_div {
    width: 800px;
    margin: 12px auto;
    padding: 0px;
    display: flex;
}

.button {
    margin: 0px 6px;
}

div.patsel_btn
{
    display: inline-block;
    border: 1px solid white;
    background: #222;
    width: 18;
    margin-left: 2;
    margin-right: 2;
}

div.patsel_btn_on
{
    display: inline-block;
    border: 1px solid red;
    background: #111;
    color: red;
    width: 18;
    margin-left: 2;
    margin-right: 2;
}

div.patsel_btn_queue
{
    display: inline-block;
    border: 1px solid #0F0;
    background: #131;
    color: #0F0;
    width: 18;
    margin-left: 2;
    margin-right: 2;
}

div.row_name_cont
{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;

    height: 18px;
}

div.row_name_text
{
    margin: 0px;
    padding: 0px;

    font-size: 10px;
}

div.note
{
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 2px;
    background-color: rgb(150, 0, 0);
}

div.note_on
{
    background-color: rgb(255, 0, 0);
}

div.note_light
{
    background-color: rgb(255, 255, 255);
}

div.shiftup
{
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 2px;
    background-color: rgb(139, 64, 0);
}

div.shiftup_on
{
    background-color: rgb(255, 153, 0);
}

div.shiftdn
{
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 2px;
    background-color: rgb(128, 128, 0);
}

div.shiftdn_on
{
    background-color: rgb(255, 255, 0);
}

div.accent
{
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 2px;
    background-color: rgb(0, 139, 0);
}

div.accent_on
{
    background-color: rgb(0, 255, 0);
}

div.slide
{
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 2px;
    background-color: rgb(0, 51, 128);
}

div.slide_on
{
    background-color: rgb(0, 102, 255);
}

div.sustain
{
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 2px;
    background-color: rgb(61, 0, 102);
}

div.sustain_on
{
    background-color: rgb(153, 0, 255);
}

/****************************************************************************/

/* Modal dialog box */
.dialog {
    z-index:3;
    width: 400px;

    /* Center in the browser window */
    position: fixed;
    top: 50%;
    left: 50%;
    /* bring your own prefixes */
    transform: translate(-50%, -50%);

    background-color: #666;
    border: 2px solid #AAA;
    padding: 10px;
    font-family: monospace
}

.dialog_title {
    font-size: 24px;
    font-family: sans-serif;
    text-align: center;
    margin-top: 4px;
    margin-bottom: 10px;
}

/* Div to space out form elements vertically */
.form_div {
    margin-top: 6;
    margin-bottom: 6;
}

.form_btn {
    margin-top: 4;
    margin-right: 4;
}

.form_link {
    margin-top: 6;
    margin-bottom: 6;
    color: #FA0;
}

.form_error {
    display: none;
    margin-top: 6;
    margin-bottom: 6;
    padding-bottom: 2;
    color: #F00;
    background: #333;
    text-align: center;
    font-size: 18px;
}

/* Invisible overlay div to hide dialog background */
.overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: rgba(0,0,0,0.80);
    z-index: 2;
}
