:root {
    accent-color: var(--accent-color);
    --border-radius: 15px;
    --border-radius-midi-clip: 10px;
    --timeline-bar-width: 50px;

    /* LIGHT THEMES */

    --primary: #dcdcdc;
    --shade-1: #e7e7e7;
    --shade-2: #5c5c5c;
    --shade-3: #fff;
    --shade-4: #939393;
    --shade-5: #ffffff80;
    --shade-6: #c8c8c8;
    --shade-7: #e0e0e0;
    --active-note: #000;
    --accent-note: var(--accent-color)/*#10b030*/;
}

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding: 5px;
    font-family: "Chakra Petch", sans-serif;
}

.colours.drop {
    cursor: crosshair;
}

/* ribbon */

.ribbon {
    width: 100%;
    background: var(--primary);
    padding: 10px;
    border-radius: var(--border-radius);
    border-bottom: 3px solid var(--accent-color);
    display: flex;
}

.ribbon-box {
    background: var(--shade-1);
    width: 100%;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-right: 15px;
}

.tempvol {
    display: flex;
    flex-direction: column;
    max-width: 300px;
}

/* timeline */

.timeline {
    margin-top: 5px;
}

.timeline-bars {
    background: var(--shade-2);
    width: 100%;
    height: 20px;
    display: flex;
    padding-left: 300px;
    border-radius: var(--border-radius-midi-clip);
    overflow-x: hidden;
}

.timeline-bars .mark {
    color: var(--shade-3);
    min-width: var(--timeline-bar-width);
}

.track {
    display: flex;
}

.track-controls {
    width: 300px;
    height: 90px;
    background: var(--primary);
    padding: 20px;
    border-radius: var(--border-radius);
}

.colour:first-child {
    border-radius: var(--border-radius-midi-clip) 0 0 var(--border-radius-midi-clip);
}

.colour:last-child {
    border-radius: 0 var(--border-radius-midi-clip) var(--border-radius-midi-clip) 0;
}

.colour {
    width: var(--timeline-bar-width);
    height: 90px;
    border-right: 1px dashed var(--shade-5);
}

/* midi editor */

.midi-editor {
    position: absolute;
    left: 5px;
    top: 310px;
    width: calc(100% - 10px);
    background: var(--primary);
    padding: 20px;
    border-radius: var(--border-radius);
}

.editor {
    display: flex;
    height: 300px;
    width: 100%;
    overflow: scroll;
    border:1px solid #939393;
}

.bar {
    width: var(--bar-width);
    height: 400px;
    border-right: 3px solid var(--shade-4);
    display: flex;
}
.column {
    width: calc(var(--bar-width) / 4);
    height: 399px;
    border: 1px solid var(--shade-6);
}
.note {
    width: calc(var(--bar-width) / 4);
    height: calc(400px / var(--notes));
    border: 1px solid var(--shade-7);
}
.active {
    background: var(--active-note) !important;
}
.accent {
    background: var(--accent-note) !important;
}
.portemento::after,
.column-0 .Bb.portemento::after, 
.column-0 .Ab.portemento::after,
.column-0 .Gb.portemento::after,
.column-0 .Eb.portemento::after,
.column-0 .Db.portemento::after {
    content: '∿';
    font-weight: bold;
    position: relative;
    top: -2px;
    left: 30px;
    color: var(--shade-3);
    /*border: 3px solid lightseagreen;*/
}

.column-0 .portemento::after,
.column-0 .Bb.portemento:hover::after, 
.column-0 .Ab.portemento:hover::after ,
.column-0 .Gb.portemento:hover::after ,
.column-0 .Eb.portemento:hover::after ,
.column-0 .Db.portemento:hover::after   {
    top: -23px;
}

/* NOTES */

.bar-0 {
    margin-left: 35px;
}

.column .C5:hover::before {
    content: 'C5';
}

.column .B4:hover::before {
    content: 'B4';
}

.column .Bb4:hover::before {
    content: 'Bb4';
}

.column .A4:hover::before {
    content: 'A4';
}

.column .Ab4:hover::before {
    content: 'Ab4';
}

.column .G4:hover::before {
    content: 'G4';
}

.column .Gb4:hover::before {
    content: 'Gb4';
}

.column .F4:hover::before {
    content: 'F4';
}

.column .E4:hover::before {
    content: 'E4';
}

.column .Eb4:hover::before {
    content: 'Eb4';
}

.column .D4:hover::before {
    content: 'D4';
}

.column .Db4:hover::before {
    content: 'Db4';
}

.column .C4:hover::before {
    content: 'C4';
}

.column .B3:hover::before {
    content: 'B3';
}

.column .Bb3:hover::before {
    content: 'Bb3';
}

.column .A3:hover::before {
    content: 'A3';
}

.column .Ab3:hover::before {
    content: 'Ab3';
}

.column .active {
    color: var(--shade-3);
}

.column-0 .active {
    color: #000;
}

.column-0 .note::before {
    position: relative;
    left: -42px;
    text-align: right;
    display: block;
    width: 35px;
}

.column-0 .C5::before {
    content: 'C5';
}

.column-0 .B4::before {
    content: 'B4';
}

.column-0 .A4::before {
    content: 'A4';
}

.column-0 .G4::before {
    content: 'G4';
}

.column-0 .F4::before {
    content: 'F4';
}

.column-0 .E4::before {
    content: 'E4';
}

.column-0 .D4::before {
    content: 'D4';
}

.column-0 .C4::before {
    content: 'C4';
}

.column-0 .B3::before {
    content: 'B3';
}

.column-0 .A3::before {
    content: 'A3';
}

.column-0 .Ab3::before {
    content: 'Ab3';
}

/* CONTROLS */
.controls, .colours {
    display: flex;
}

.controls button {
    width: 30px;
    height: 30px;
}

input:hover {
    cursor: pointer;
}

button {
    position: relative;
    height: 30px;
    padding: 5px 7px;
    margin: 5px 5px 10px 5px;
    background: #EEEEEE;
    border: 1px solid #9e9e9e;
    border-radius: 5px;
    box-shadow: 0px 5px 0px #9e9e9e;
}

button:hover {
    transform: translateY(2px);
    box-shadow: 0px 3px 0px #9e9e9e;
    cursor: pointer;
}

button.pressed, button:active {
    transform: translateY(3px);
    transform: translateY(3px);
    box-shadow: 0px 1px 0px #9e9e9e;
}

button.pressed {
    background: var(--accent-color);
    box-shadow: 0px 1px 0px var(--accent-color-dark);
    border: 1px solid var(--accent-color-dark);
}

#drawAccent {
    color: var(--accent-color);
}

#drawAccent.pressed {
    color: var(--shade-3);
}