body {
    margin: 0;
    padding: 0;
    
    font-family: Oswald, Helvetica, sans-serif;
    font-weight: 300;
    
    background: #23223D;
    color: white;
}

a {
    color: white;
    text-decoration: none;
}

#main-container {
    display: flex;
    
    height: 100%;
    
    flex-direction: column;
}

#tabs-container {
    display: flex;
    justify-content: space-around;
        
    flex-basis: 40px;
    flex-grow: 0;
    flex-shrink: 0;
}

.tab {
    display: flex;
    
    flex-grow: 1;
    justify-content: space-between;
    
    margin: 0 2.5px;
    padding: 0 10px;
    
    overflow: hidden;
    
    align-items: center;
    
    background: rgba(0, 0, 0, 0.4);
}

.tab:first-child {
    margin-left: 5px;
}

.tab:last-child {
    margin-right: 5px;
}

.tab p {
    margin: 0;
    padding: 0;
}

.current-tab {
    background: rgba(255, 255, 255, 0.2);
}

.add-tab {
    flex-grow: 0;
}

#tools-container {
    display: flex;
    align-items: center;
    
    flex-basis: 40px;
    flex-grow: 0;
    flex-shrink: 0;
    
    padding: 0 20px;
    
    box-sizing: border-box;
    
    background: rgba(0, 0, 0, 0.4);
}

#tools-container .si {
    font-size: 1.4em;
}
 
#matrix-container {
    flex-grow: 1;
    flex-shrink: 1;
}


#sequencer-matrix {
    width: 100vw;
    height: calc(100vh - 80px);
    
    margin: 0;
    padding: 0;
    
    table-layout: fixed;
}

#sequencer-matrix td {
    padding: 5px;
    
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.bar-even {
    /*background: #161528;*/
    background: rgba(0, 0, 0, 0.2);
}

#sequencer-matrix .master-cell {
    display: flex;
    
    height: 100%;
}

#sequencer-matrix .cell {
    flex-grow: 1;
    
    display: flex;
    
    align-items: center;
    justify-content: center;
        
    background: #2E2D4C;
}

#sequencer-matrix .cell:not(:first-child) {
    margin-left: 3px;
}

#sequencer-matrix .cell:not(:last-child) {
    margin-right: 3px;
}

#sequencer-matrix .cell.current-beat {
    background: #3E3D67;
}

#sequencer-matrix .cell.on {
    background: #616098;
}

#sequencer-matrix .cell .note-name {
    visibility: hidden;
    
    color: rgba(255, 255, 255, 0.3);
    
    pointer-events: none;
}

#sequencer-matrix .cell:hover .note-name {
    visibility: visible;
}

#playback-controls a:not(:last-child) {
    margin-right: 10px;
}

a.disabled-true {
    pointer-events: none;
    color: rgba(255, 255, 255, 0.1);
}

.control-group {
    padding-right: 15px;
    margin-right: 10px;
    
    border-right: 2px solid white;     
}

.control-form legend {
    color: white;
    border-bottom: 2px solid white;
}

.control-form input[type=text],
.control-form input[type=number],
.control-form input[type=submit],
.control-form select,
.control-form button {
    margin: 0;
    
    padding: 2px 6px;
    
    font-family: Oswald, Helvetica, sans-serif;
    font-size: 11pt;
    
    background: transparent;
    color: white;
    
    border: 2px solid white;
    border-radius: 0;
}

.control-form label:not(:first-of-type) {
    margin-left: 10px;
}


.control-form input.short {
    width: 70px;
}

.control-form input.hidden {
    display: none;
}

.control-form button:hover {
    background: rgba(255, 255, 255, 0.4);
}

.settings-popup {
    position: absolute;
    
    left: 0;
    bottom: 40px;
    
    width: 100%;
    /* height: 50vh; */
    
    padding: 20px 20px;
    
    box-sizing: border-box;
    
    background: rgba(0, 0, 0, 0.5);
}

.settings-popup-section h3 {
    margin: 0;
    padding: .3em 0;
    margin-bottom: .5em;
    
    border-bottom: 2px solid white;
    
    font-size: 16px;
}

#matrix-popup {
    display: flex;
    
    justify-content: space-around;
}

#matrix-popup > .control-form {
    flex-grow: 0;
    flex-shrink: 1;
    
    margin: 0 10px;
}

#instrument-selection {
    flex-grow: 1;
    flex-shrink: 0;
    
    margin: 0 10px;
}

#adsr-envelope {
    height: 150px;
    
    flex-grow: 1;
    flex-shrink: 0;
    
    margin: 10px 0;
    
    border: 2px solid white;
}

#adsr-envelope polyline {
    stroke: white;
    stroke-width: 1px;
    
    fill: none;
}

#adsr-control {
    flex-grow: 0;
    flex-shrink: 0;
}


#mixer-popup {
    display: flex;
    
    height: calc(100% - 80px);
}

#master-channel {
    margin-left: auto;
    
    flex-grow: 0;
    flex-shrink: 0;
}

.channel-strip {
    display: flex;
    
    flex-direction: column;
    
    margin: 0 5px;
    padding: 10px;
    
    text-align: center;
    
    border: 2px solid white;
}

.channel-strip p {
    margin: 5px 0;
}

.channel-strip-selected {
    background: rgba(255, 255, 255, 0.2);
}

.mixer-slider {
    flex-grow: 1;
    
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    background: white;
}

.mixer-slider::-webkit-slider-thumb {
    width: 5px;
    height: 20px;
    
    -webkit-appearance: none;
    background: white;
}

.mixer-slider:focus {
    outline: none;
}

.mute-button {
    margin: 0;
    margin-bottom: 5px;
}


.flex-container {
    display: flex;
}
