@charset "utf-8";
/* This stylesheet is based on the CSS Preset at https://codepen.io/bofrede/pen/qBaroyQ
and divided into sections as defined by SMACSS. http://smacss.com/ */

/** || Load WebFonts **/

:root {
  --base-color: #848593;
}

/** || Layout Rules **/

#synth,
#super_powers > div {
  display: flex;
  justify-content: center;
  padding: 0.5em 1em;
}

main h2,
aside h2 {
  text-align: center;
  margin: 0 0 0.6em 0;
  padding-bottom: 0.4em;
  border-bottom: 1px solid #333;
}

.switch {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  align-self: center;
  gap: 1em 0.5em;
}
.switch label {
  text-align: right;
  line-height: 90%;
}

section > div > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

section > div > div > div:has(datalist) {
  display: flex;
  gap: 0.3em;
}

#logoPanel {
  display: flex;
  justify-content: flex-end;
  gap: 0 1em;
  padding: 1em;
}

#power_led {
  margin: 0 auto 0 0;
}

#fileOperations {

}

#model {
  align-self: flex-end;
  font-size: 23pt;
  line-height: 20pt;
}

#super_powers:not([open]) {
  padding: 0.2em 0.5em;
}
#super_powers summary {
  padding: 0.3em 1em;
}

#midi {
  margin-right: auto;
}

/** || Module Rules **/

section {
  flex-shrink: 1;
  flex-grow: 0;
  padding: 1em;
}

section > div,
#fileOperations {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-auto-flow: column;
  gap: 1em;
  justify-items: center;
}

.stacked,
.stacked > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  .led {
    margin: 0;
  }
}

#fileOperations {
  grid-auto-flow: row;
  gap: 0.3em;
  margin-right: auto;
}

section#env > div {
  grid-template-columns: repeat(5, auto);
}

input[type="range"] {
  direction: rtl;
  writing-mode: vertical-lr;
  height: 180px;
}

datalist {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

/** || State Rules **/

.led {
  display: inline-block;
  width: 15px;
  height: 6px;
  margin: 10px 0;
  background-color: #500000;
}
.connected #power_led,
.led:has(~ input[type="checkbox"]:checked) {
  background-color: #e00;
  box-shadow: 0 0 5px 1px #e00;
}

/** || Theme Rules **/

body {
  background-color: #333;
  color: #fff;
}

select {
  color: #000;
}

main,
aside {
  position: relative;
}

main::after,
aside::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -3;
  filter: contrast(40%) brightness(80%);
  background: url(/images/noise_bg.svg), var(--base-color);
}

input[type="radio"],
input[type="range"] {
  accent-color: #AE7749;
}

#modulator input[type="range"],
#mixer input[type="range"] {
  accent-color: #809A6D;
}

input[name="vco_pulse_width_source"],
input[name="mixer_sub_osc_type"],
input[name="amplifier_voltage"],
input[name="envelope_trigger"],
input[name="portamento_mode"] {
  accent-color: #AA0;
}

#synth section + section,
#super_powers section + section {
  border-left: 1px solid #333;
}

#EnvelopeVisualizer svg {
  outline: 1px solid #00000080;
}

#container > div {
  border: 5px outset;
}
