@font-face {
  font-family: Acme;
  src: url("../fonts/Acme/Acme-Regular.ttf");
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(to left, rgba(255,255,255,0.5), rgba(255,255,255,1),rgba(255,255,255,0.5)),url(../img/mike-castro-demaria-AQIB4qsI8wI-unsplash.jpg) left center no-repeat fixed;
  background-size: cover;
  text-align: center;
  font-family: Acme, Roboto, Arial, sans-serif;
}

#content-wrapper {
  width: 1300px;
  margin: 0 auto;
}

.hidden { 
  display: none;
}

#page-title {
  font-size: 60px;
  padding: 10px 0;
  margin: 0 auto;
  background: white;
  height: 70px;
  width: 100%;
}

#midi-tutorial-buttons {
  position: absolute;
  top: 0;
  right: 0;
  margin: 10px;
}

#content-container {
  background: white;
  max-height: calc(100vh - 90px);
  position: relative;
}

#midi-tutorial-buttons button, 
button#undo-translation, 
button.tutorial,
button#translate-print,
button#close-device-disconnected,
#midi-configure-modal button {
  padding: 5px 10px;
  margin: 0 5px;
  font-family: 'Acme', Roboto, Arial, sans-serif;
  font-size: medium;
}

#translate-options  {
  position: absolute;
  top: 20px;
  right: 120px;
}
#hands-staff-translate-container button.tutorial {
  position: absolute;
  top: 20px;
  right: 20px;
}

button:hover {
  cursor: pointer;
}

/* NAVIGRATION */

/*
#navigation {
  position: sticky;
  top: 0;
  z-index: 5;
}
*/

.standard-div-styles {
  padding: 10px;
}

.standard-div-styles.light {
  color: black;
  /*background: #ddd;*/
}

.standard-div-styles.dark {
  color: white;
  background: #555;
}

.standard-div-styles h2 {
  padding: 10px;
  margin: 0 auto;
}

/* SOUND CONTROLS */ 

#piano-details {
  display: block;
}

#piano-and-controls details[open] {
  height: 400px;
}

#piano-and-controls details {
  height: 30px;
}

details[open] > summary {
    list-style-type: '▼ ';
}

details > summary {
    list-style-type: '▶ ';
    cursor: pointer;
    font-size: x-large;
}

#controls-container {
  display: flex;
  align-items: center;
}

#free-select {
  color: red;
}

.media-controls #midi-selection,
.media-controls #instrument-select {
  margin: 10px auto;
  display: block;
  font-size: medium;
}

.media-controls button {
  border-radius: 50%;
  height: 40px;
  width: 40px;
  padding: 0;
  margin: 5px;
  background: black;
  border: none;
  cursor: pointer;
}

#play-toggle {
  transform: scale(1.3);
}

.media-controls button.pressed {
  box-shadow: none;
}

.media-controls button:disabled {
  background: gray;
}

.media-controls button img {
  height: 30px;
}

.slider-wrapper {
  flex: 1;
}

.slider-value {
  display: inline;
}

.slider-controls {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  grid-template-areas:
    "label"
    "volume"
    "extra";
  align-items: start;
  flex: 1;
  max-width: 377px;
  margin: auto;
}

#song-controls { flex: 2; }

.slider-controls label {
  width: 50px;
}

#slider-song-label,
#slider-instrument-label {
  font-size: larger;
  margin: 0;
  width: 100%;
}

#slider-song-label, #slider-instrument-label {grid-area: label;}
#slider-song-volume, #slider-instrument-volume {grid-area: volume;}
#slider-song-tempo, #slider-instrument-octave {grid-area: extra;}
/*#slider-instrument-label {grid-area: instrument-label;}*/
/*#slider-instrument-volume {grid-area: instrument-volume;}*/
/*#slider-instrument-octave {grid-area: instrument-octave;}*/

.slider-block {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "label bar value";
  justify-items: center;
  align-items: center;
}

.slider-block p {
  margin: 0;
}

.slider-label {grid-area: label;}
.slider-bar {grid-area: bar;}
.slider-value {grid-area: value;}

/* KEYBOARD SECTION */

#keyboard {
  display: flex;
  justify-content: center;
  min-width: 900px;
  overflow-x: auto;
}

.piano-key {
  cursor: pointer;
  border-radius: 0 0 5px 5px;
  font-size: 20px;
}

.white-key {
  padding: 150px 2px 0;
  margin: 0;
  height: 200px;
  width: 50px;
}

.black-key {
  background: black;
  color: white;
  padding: 90px 2px 0;
  margin: 0 -13px;
  height: 130px;
  width: 26px;
  z-index: 2;
}

.white-key:hover {background: #fff;}
.black-key:hover {background: #444;}

.white-key.pressed {
  background: #DD88DD;
}

.lyric-row .selected {
  background: #DD88DD;
}

.black-key.pressed {
  background: #990099;
}

#mid-C-label {
  font-size: 15px;
}

/* SONG LYRICS */

#song-lyrics-container {
  padding: 10px;
}

#song-window {
  display: block;
  margin: auto;
}

.lyric-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.lyric { 
  width: 60px;
  border-color: black;
  border-width: 1px;
  margin-bottom: 50px;
  font-size: x-large
}

/* HANDS LAYOUT */

#hands-button-container {
  position: relative;
  width: 570px;
  margin: auto;
}

#hands-key-layout p {
  position: absolute;
  border: solid 1px black;
  margin: 0;
  padding: 2px;
  border-radius: 5px;
}

#left-5 { top: 116px; left: 44px; }
#left-4 { top: 72px; left: 80px; }
#left-3 { top: 46px; left: 130px; }
#left-2 { top: 64px; left: 190px; }
#left-1 { top: 176px; left: 250px; }
#right-1 { top: 174px; right: 250px; }
#right-2 { top: 68px; right: 190px; }
#right-3 { top: 48px; right: 136px; }
#right-4 { top: 66px; right: 84px; }
#right-5 { top: 110px; right: 44px; }

/* GRAND STAFF */

#grand-staff-container {
  position: relative;
  width: 1000px;
  margin: -20px auto -130px auto;
}

#grand-staff-container p {
  position: absolute;
  border: solid 1px black;
  margin: 0;
  padding: 2px;
  border-radius: 50%;
  height: 22px;
  width: 30px;
  font-size: 18px;
}

#grand-staff-canvas {
  z-index: -1;
}

#grand-staff-container .selected {
  background-color: #DD88DD;
}


#D3 { display: none; }
#E3 { top: 342px; left: 130px; }
#F3 { top: 325px; left: 170px; }
#G3 { top: 312px; left: 210px; }
#A3 { top: 295px; left: 250px; }
#B3 { top: 282px; left: 290px; }
#C4 { top: 265px; left: 330px; }
#D4 { top: 222px; left: 370px; }
#E4 { top: 205px; left: 410px; }
#F4 { top: 192px; left: 450px; }
#G4 { top: 175px; left: 490px; }
#A4 { top: 162px; left: 530px; }
#B4 { top: 145px; left: 570px; }
#C5 { top: 132px; left: 610px; }
#D5 { top: 115px; left: 650px; }
#E5 { top: 102px; left: 690px; }
#F5 { top: 85px; left: 730px; }
#G5 { top: 72px; left: 770px; }
#A5 { top: 55px; left: 810px; }
#B5 { top: 42px; left: 850px; }

/* TRANSLATE */

#key-signatures {
  display: flex;
  flex-flow: row wrap;
  gap: 10px;
  align-content: left;
  grid-area: key-sigs;
  overflow-y: auto;
}

#key-signatures.restricted{
  display: none;
}

#key-signatures .key-signature {
  flex: 1;
  max-width: 200px;
  height: 150px;
  margin: 0 auto;
}

#key-signatures .key-signature:hover {
  background: white;
  cursor: pointer;
}

#key-signatures canvas {
  max-width: 200px;
}

#key-signatures .key-selected { 
  background: #ccc;
  color: black;
  font-weight: 800;
  border: solid 1px black;
}

.hide-staffs #staffs canvas {
  display: none;
}
.hide-staffs .translated {
  height: 50px;
}
.stamp {
  font-size: 32px;
  margin: 0;
  width: 50px;
  display: inline-block;
}

#translated-output { grid-area: output; }
#stamps-stafss { grid-area: stamps; }
#staffs {
  grid-area: staff;
  overflow-y: auto;
}

#stamps-staffs button {
  height: 55px;
}

#translate-container {
  display: grid;
  grid-template-columns: 220px 323px 1fr;
  grid-template-rows: 1fr 8fr;
  grid-template-areas:
    "restricted restricted restricted"
    "key-sigs stamps output"
    "key-sigs staff staff"
    "key-sigs staff staff";
}

#translate-tab-content-unrestricted { 
  grid-area: restricted
}
#translate-container.hidden {
  display: none;
}

.restricted { 
  display: none;
}
.complete-tier .restricted { 
  display: block;
}

.unrestricted { 
  display: block;
}

.complete-tier .unrestricted {
  display: none;
}

#translated-output {
  margin: 0 auto 0 30px;
}

.translated {
  padding: 0;
  overflow-wrap: break-word;
  width: 1000px;
  height: 0px;
  font-family: monospace;
  font-size: xx-large;
  line-height: 1.5;
  text-align: left;
  max-height: 156px;
  overflow-y: visible;
  margin: 0 0 0 180;
}

.translated-note {
  padding: 0px;
  display: inline-block;
  width: 50px;
  margin-top: 20px;
}

/* Tabs */

.tab-labels {
  display: inline-block;
  width: 33%;
  margin: 0;
  padding: 20px 0;
  font-size: x-large;
  border-radius: 20px 20px 0 0;
}

.tab-labels:hover {
  background: #ddd;
  cursor: pointer;
}

#hands-staff-translate-container {
  position: relative;
  height: 70px;
  margin-top: 50px;
}

.tab-target {
  position: absolute;
  top: 60px;
  left: 0;
  background: white;
  width: 100%;
  box-sizing: border-box;
  background: #eee;
  overflow-y: auto;
}

#hands-staff-translate-container .tab-target {
  height: calc(100vh - 550px); /* 90 (header) + 400 (hide/show & piano controls) + 70 (tabs) - 10 (padding)*/
}

.hide-piano-controls #hands-staff-translate-container .tab-target {
  height: calc(100vh - 180px); /* 90 (header) + 30 (hide/show) + 70 (tabs) - 10 (padding)*/
}

.tab-labels.selected {
  background: #eee;
}

/*modal*/

.modal {
  position: fixed;
  z-index: 2; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  background-color: rgba(0,0,0,0.4); 
}

.modal-content {
  box-sizing: border-box;
  background-color: white;
  margin: 30vh auto;
  border: 1px solid #888;
  width: fit-content;
  padding: 20px;
  box-shadow: 10px 10px 20px #333;
  font-size: larger;
  max-width: 50vw;
  overflow-y: auto;
}

#midi-configure-content {
  padding-bottom: 30px;
}

#midi-device-status-wrapper {
  border: solid 1px black;
  border-radius: 10px;
  padding: 10px;
  background: #eee;
  margin: 20px;
}

#midi-device-status-wrapper p {
  margin: 0;
}

#midi-device-status-wrapper hr {
  border-top: 1px solid #aaa;
  margin: 10px 80px;
}

select#output-midi {
  font-size: large;
}

/* Tutorial Modal */

#tutorial-modal .modal-content {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  max-height: calc(100vh - 100px);
  width: 800px;
  margin: 50px auto;
}

#tutorial-modal-content {
  text-align: left;
}

#tutorial-modal-content h3 {
  text-align: center;
}

#tutorial-modal details {
  border: solid 1px #ccc;
  padding: 10px;
  border-radius: 10px;
  background: #eee;
}

/* disconnect modal */

#device-disconnected { 
  background: #FF8888;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  box-shadow: 0 0 10px black;
  font-size: x-large;
  height: 130px;
}

#print-area {
  display: none;
}

@media print {
  /* All your print styles go here */
  body {
    background: white;
  }
  #content-wrapper, canvas {
    display: none !important;
  }
  #print-area {
    display: block !important;
  }
  
  .translated {
    height: 75px;
  }

}
