@font-face {
  font-family: DancingScript;
  src: url(./DancingScript-Regular.ttf);
}

body:not(.debug) .dg.ac {
  display: none;
}

canvas#wave {
  width: 100%;
}

canvas#disk {
  position: relative;
  width: 100%;
}

p {
  text-align: center;
}

.extras {
  color: #888;
}

#record,
#stop_recording {
  z-index: 1;
  background: #211;
  border: 1px solid #322;
  padding: 0.5em;
  border-radius: 2.5em;
  font-family: monospace;
  transition: all 250ms;
}

#stop_recording span {
  padding: 0 0.5em;
}

#record img,
#stop_recording img {
  background: #711;
  border-radius: 50%;
  padding: 0.5em;
  transition: all 250ms;
}

#record:hover {
  background: #311;
  padding: 0.3em;
}

#record:hover img {
  padding: 0.7em;
  background: #911;
}

#stop_recording:hover img {
  background: #911;
}

#stop_recording {
  display: none;
}

body.recording #stop_recording {
  display: inherit;
}

body.recording #record {
  display: none;
}

#upload,
#play_sound,
#download_image,
#download_audio {
  text-align: center;
  cursor: pointer;
}

#wave_wrapper {
  margin: 0;
}

body.empty:not(.recording) #wave_wrapper {
  display: none;
}

#rec_btn_wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
  padding-bottom: 1rem;
}

body.recording #wave_bounds {
  display: none;
}

#wave_bounds {
  height: 0;
  position: relative;
}

#wave_bounds>* {
  position: absolute;
  top: 0;
}

canvas#wave,
#wave_bounds>* {
  height: 4rem;
}

#wave_start {
  left: 0;
  width: 25vw;
  background: #000c;
}

#wave_end {
  right: 0;
  width: 25vw;
  background: #000c;
}

#wave_end #wave_label {
  position: absolute;
  color: #fff;
  opacity: 0.5;
  border-radius: 0.5em;
  font-size: 0.75rem;
  padding: 0.5em;
  left: 3em;
  top: 0em;
  transform: translateX(-100%);
  white-space: nowrap;
}

#wave_bounds .ptr {
  cursor: pointer;
  position: absolute;
  top: calc(50% - 0.5em);
  font-size: 1.5vh;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background: #888;
  display: flex;
  align-items: center;
  user-select: none;
  transition: all 250ms;
}

@media(orientation:landscape) {
  #wave_bounds .ptr {
    font-size: 1.5vh;
  }
}

#wave_bounds .ptr span {
  width: 100%;
  text-align: center;
  font-weight: 900;
}

#wave_bounds .ptr:hover {
  background-color: #fff !important;
}

#wave_bounds .ptr.left {
  right: 0;
}

#wave_bounds .ptr.right {
  left: 0;
}

#top_info, #bottom_info {
  z-index: 1;
  position: relative;
  height: 0;
  font-size: 0.75rem;
}

#audio_name {
  font-family: DancingScript;
  font-size: 1rem;
  margin: 0;
  padding: 1rem;
  position: absolute;
  bottom: 0;
  left: 0;
  color: #ccc;
  opacity: 0;
}

#audio_name:focus {
  outline: 1px solid var(--fg-main);
  opacity: 1;
  background: #000;
}

#audio_name * {
  display: inline;
}

#audio_name br {
  display: none;
}

#audio_info {
  margin: 0;
  position: absolute;
  top: 2em;
  right: 0;
}

body:not(.debug) #audio_info {
  display: none;
}

#art_main_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

#art_main {
  position: relative;
  display: inline-block;
}

@media(orientation:landscape) {
  #art_main_wrapper {
    flex-grow: 1;
  }

  canvas#disk {
    max-width: 100vh;
  }

  #settings {
    flex: 0 0 20em;
  }
}

svg.progress {
  width: 10%;
  margin: 45%;
}

body.empty #canvas_and_config {
  display: none;
}

#gallery {
  display: flex;
  flex-direction: row;
  display: none;
}

#gallery canvas {
  width: 25%;
  height: auto;
  aspect-ratio: 1.0;
}

#img_info {
  position: relative;
  height: 0;
  z-index: 1;
}

#download_image {
  position: absolute;
  right: 0.5em;
  bottom: 0.5em;
}

body:not(.debug) #download_image {
  display: none;
}

#wave_play_info {
  position: relative;
  height: 0;
}

#play_sound {
  position: absolute;
  left: 0;
  bottom: 0;
  bottom: 0.5em;
}

#download_audio {
  position: absolute;
  right: 0.5em;
  bottom: 0.5em;
}

button.small_btn {
  font-size: 0.5rem;
  padding: 0.5em 1em;
  margin: 0.5em;
  border-radius: 1em;
  background-color: #222;
  opacity: 0.5;
  transition: all 250ms;
}

button.small_btn:hover {
  opacity: 1.0;
}

#settings {
  padding: 1em;
}

.setting2:first-child {
  display: none;
}

.setting2 {
  user-select: none;
  padding: 0.5em 0;
  margin: 0.75em 0;
}

.setting2 .top {
  display: flex;
  flex-direction: row;
  color: #ccc;
  padding: 0 0.5em;
}

.setting2.debug .top {
  color: #888;
}

.setting2 .spacer {
  flex: 1;
}

.setting2 .b {
  color: #444;
  background: #111;
  border: 2px solid #181818;
  border-radius: 20%;
  width: 1em;
  height: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.setting2 .b:hover {
  color: #fff;
}
.setting2 .dec {
  margin-right: 0.75em;
}
.setting2 .inc {
  margin-left: 0.75em;
}

body.empty #buy_buttons {
  display: none;
}

#canvas_and_config {
  display: flex;
  flex-direction: row;
}

@media(orientation:portrait) {
  #canvas_and_config {
    flex-direction: column-reverse;
  }

  canvas#disk {
    width: 100%;
  }
}
