/*
 * TunePad
 *
 * Michael S. Horn
 * Northwestern University
 * michael-horn@northwestern.edu
 * Copyright 2020, Michael S. Horn
 *
 * This project was funded by the National Science Foundation (grant DRL-1612619).
 * Any opinions, findings and conclusions or recommendations expressed in this
 * material are those of the author(s) and do not necessarily reflect the views
 * of the National Science Foundation (NSF).
 */
 :root {
   --dj-bg-color: #535563;
   --dj-header-color: #2e303f;
 }
 @keyframes turning {
   0%   { transform: rotate(15deg); }
   50%  { transform: rotate(0deg); }
   100% { transform: rotate(15deg); }
 }

#turn-tables {
  background-color: var(--dj-bg-color);
  /*border-radius: 10px 10px 0 0;*/
  border-radius: 10px;
  margin: 25px 0 0 25px;
  overflow: hidden;
  border-right: 2px solid #0003;
  border-left: 1px solid #fff3;
  max-width: 900px;
  width: calc(100vw - 200px);
}
.dj-waveforms {
  width: 100%;
  background-color: var(--dj-header-color);
  display: flex;
}
.dj-waveform-container {
  flex: 1;
  padding: 7px;
  padding-right: 25px;
  display: flex;
}
.dj-play-button {
  outline: none;
  border: none;
  width: 35px;
  color: #fff9;
  margin-right: 3px;
  background-color: transparent;
}
.dj-play-button.hidden { display: none; }
.dj-play-button:hover { color: white; }
.dj-play-button:active { color: #fff9; }

.dj-waveform-container:first-child {
  border-right: 2px solid #222;
}
.dj-waveform-container:nth-child(2) {
  border-left: 1px solid #777;
}
.dj-waveform-container svg {
  background-color: #0007;
  display: block;
}
.dj-container {
  flex: 1;
  display: flex;
  position: relative;
}
.dj-workspace {
  position: relative;
  flex: 1;
}
.dj-canvas {
  background-repeat: no-repeat;
  background-position: center;
  /*background-image: url('/assets/images/turn-tables.png');*/
  background-image: url('/assets/images/turn-tables.svg');
  background-size: contain;
  width: 100%;
  display: block;
}
.dj-svg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}
.dj-container rect.rubber-band {
  fill: white;
  fill-opacity: 0.2;
  stroke: white;
  stroke-width: 1px;
}
.dj-container rect.rubber-band.hidden {
  opacity: 0;
}
.dj-knobs {
  width: 100%;
  background-color: #0003;
  border-top: 2px solid #333;
  display: flex;
}
.dj-left-knobs, .dj-right-knobs {
  flex: 1;
  display: flex;
  padding: 5px;
}
.dj-left-knobs { border-right: 2px solid #222; }
.dj-right-knobs { border-left: 1px solid #777; }

.dj-knobs .ui-dial {
  display: flex;
  flex-direction: column;
  margin: 4px;
}
.dj-knobs .ui-dial .dial-track,
.dj-knobs .ui-dial .dial-track-fill {
  stroke: #777;
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: none;
}
.dj-right-knobs .ui-dial .dial-track-fill {  stroke: #ab7df6; }
.dj-left-knobs .ui-dial .dial-track-fill { stroke: #f6a550; }

.dj-knobs .ui-dial .label,
.dj-knobs .ui-dial .value {
  color: #fff;
  font-family: var(--main-font);
  font-weight: 400;
  font-size: 11px;
  min-width: 41px;
  user-select: none;
  line-height: 1.2em;
  text-align: center;
}

.dj-knobs .ui-dial .label { order: 2; }
.dj-knobs .ui-dial .value { order: 3; }

.dj-knobs .ui-dial .dial-pointer {
  stroke: #fff9;
  stroke-width: 4px;
}

.dj-container .dj-menu {
  fill: white;
  stroke: #fff3;
  stroke-width: 5px;
}
.dj-puck circle {
  fill: black;
  stroke: #fffc;
  stroke-width: 1px;
  /*filter : url(#dropshadow);*/
}
.dj-puck.loading {
  opacity: 0.5;
}
.dj-puck.selected circle { stroke-width: 3px; }
.dj-puck.bass circle { fill: var(--bass-color); }
.dj-puck.guitar circle { fill: var(--guitar-color); }
.dj-puck.marimba circle { fill: var(--marimba-color); }
.dj-puck.piano circle { fill: var(--piano-color); }
.dj-puck.drums circle,
.dj-puck.drumkit circle { fill: var(--drum-color); }
.dj-puck.error circle { fill: var(--error-color) !important; }

.dj-puck image.icon {
  pointer-events: none;
  user-select: none;
  transition: opacity 0.25s;
}
.dj-puck text.name {
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  text-anchor: middle;
  fill: white;
  /*filter : url(#dropshadow);*/
}
.dj-puck.grouped text.name {
  opacity: 0;
}
.dj-puck text.name:hover {
  text-decoration: underline;
}
.dj-puck text.menu-button,
.dj-puck text.dj-play-button {
  font-weight: 900;
  font-family: 'Font Awesome\ 5 Free';
  fill: white;
  font-size: 18px;
  text-anchor: middle;
  dominant-baseline: middle;
  /*filter : url(#dropshadow);*/
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  transition: opacity 0.25s;
}
.dj-puck text.dj-play-button {
  pointer-events: none;
  opacity: 0;
}
.dj-puck.muted text.dj-play-button { opacity: 1; }
/*
.dj-puck text.dj-play-button:active { opacity: 0.85; }
.dj-puck:hover text.dj-play-button { opacity: 1; }
.dj-puck.error text.dj-play-button { opacity: 0 !important; }
.dj-puck.dragging text.dj-play-button { opacity: 0 !important; }
*/
/*.dj-puck:hover image.icon { opacity: 0; }*/
.dj-puck.error:hover image.icon { opacity: 1; }
/*.dj-puck.dragging image.icon { opacity: 1 !important; }*/

.dj-puck text.menu-button { opacity: 0; }
.dj-puck.selected text.menu-button { opacity: 1; }
.dj-puck.grouped text.menu-button { opacity: 0; }
.dj-puck.dragging text.menu-button { opacity: 0; }


.dj-container .popup-menu {
  position: absolute;
  background-color: white;
  /*border: 1px solid #0001;*/
  border-radius: 8px;
  background: white;
  padding: 8px 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 3px 3px 5px #0005;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.dj-container .popup-menu.hidden {
  display: none;
}
.dj-container .popup-menu:hover {
  cursor: pointer;
}
.dj-container .popup-menu ul {
  list-style: none;
  padding: 0;
}
.dj-container .popup-menu ul:after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-width: 10px;
  border-style: solid;
  border-color: transparent #FFFFFF transparent transparent;
  top: 20px;
  left: -20px;
}
.dj-container .popup-menu li {
  min-width: 110px;
  line-height: 150%;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: normal;
  color: #3C4E60;
  outline: none;
  border: none;
  padding: 5px 20px 5px 10px;
  white-space: nowrap;
  position: relative;
  text-align: left;
}
.dj-container .popup-menu li.hidden {
  display: none;
}
.dj-container .popup-menu li:hover {
  background-color: rgba(0, 0, 0, 0.15);
}
.dj-container .popup-menu li:active {
  background-color: rgba(0, 0, 0, 0.2);
}
.dj-container .popup-menu li.disabled {
  opacity: 0.4;
}
.dj-container .popup-menu li.disabled:hover {
  background-color: transparent !important;
}
.dj-container .popup-menu li.disabled:active {
  background-color: transparent !important;
}
.dj-container .popup-menu li i.fas {
  width: 2.5em;
  text-align: left;
}
.dj-container .popup-menu li.separator {
  border-top: 1px solid #0005;
  margin: 10px;
  height: 2px;
}

/* CROSS FADER */
.dj-cross-fader {
  width: 22%;
  border-right: 2px solid #222;
  border-left: 1px solid #777;
  padding: 10px 5px;
}
.dj-cross-fader svg {
  display: block;
  border: 2px solid #fff8;
  border-radius: 10px;
  background-color: #222430;
  overflow: hidden;
}
.dj-tempo .slider-track,
.dj-cross-fader .slider-track {
  stroke: #222430;
  stroke-width: 3;
}
.dj-tempo .slider-tick,
.dj-cross-fader .slider-tick {
  stroke: white;
  stroke-opacity: 0.5;
  stroke-width: 1;
}
.dj-tempo .slider-tick.strong,
.dj-cross-fader .slider-tick.strong {
  stroke-opacity: 1.0;
  stroke-width: 1;
}

.dj-tempo .slider-knob,
.dj-cross-fader .slider-knob {
  fill: black;
  stroke: white;
  stroke-opacity: 0.4;
}
.dj-tempo {
  width: 6%;
  height: 50%;
  position: absolute;
  right: 5px;
  top: 5px;
  z-index: 10;
  border: 2px solid #fff8;
  border-radius: 10px;
  background-color: #222430;
  overflow: hidden;
  padding-top: 5px;
}
.dj-tempo .label {
  color: #fffc;
  font-size: 11px;
  text-align: center;
  margin: 0 auto 5px auto;
  font-weight: 700;
  user-select: none;
  position: relative;
  top: -5px;
}
.dj-tempo .slider-value {
  fill: #fffa;
  font-size: 8px;
  font-weight: bold;
  text-anchor: middle;
  dominant-baseline: middle;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.dj-tempo .slider-value.indicator {
  font-size: 15px;
  fill: #ffdf00;
}
#dj-wave-left .dj-waveform { fill: #f6a550; }
#dj-wave-right .dj-waveform { fill: #ab7df6; }

.dj-waveform-container .beat-line {
  stroke: white;
  stroke-opacity: 0.2;
}
.dj-waveform-container .beat-line.bar {
  stroke-opacity: 0.4;
}
.dj-waveform-container .playhead {
  stroke: gold;
  stroke-width: 2;
}
.dialog.dj-editor {
  max-width: 900px;
  margin: 30px 0;
  height: calc(100vh - 60px);
  overflow-y: auto;
  font-size: inherit;
}
.dj-gadget-container {
  padding-bottom: 200px;
  margin-right: 25px;
}
.dj-gadget-container .gadget-container {
  margin: 35px 25px;
  text-align: left;
  font-size: inherit;
  line-height: normal;
}
.dj-gadget-container .record-button {
  display: none;
}
.dj-gadget-container .toolbar.top-bar button,
.dj-gadget-container .toolbar.top-bar .menu-button {
  display: none;
}
.dj-gadget-container .toolbar.top-bar .reload-button {
  display: block;
}
