body {
  overflow-x: hidden;
}

body:not(.debug) .lil-gui {
  display: none;
}

canvas#wave {
  width: 100%;
}

#art_main {
  flex: 1;
}

#art_main canvas {
  width: 100%;
  --aspect-ratio: 1/1;
}

h2 {
  text-align: center;
  color: #ccc;
}

h3 {
  text-align: center;
  color: #ccc;
}

p {
  text-align: center;
  color: #888;
}

.extras {
  color: #888;
}

#record,
#stop_recording {
  font-size: 1.5rem;
  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 icon,
#stop_recording icon {
  background: #711;
  border-radius: 50%;
  padding: 0.5em;
  transition: all 250ms;
}

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

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

#stop_recording:hover icon {
  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 #top_info,
body.empty:not(.recording) #wave_wrapper #wave_bounds {
  display: none;
}

#rec_btn_wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

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_label {
  position: absolute;
  color: #fff;
  opacity: 0.5;
  font-size: 0.75rem;
  padding: 0.5em;
  padding-right: 0.75em;
  top: 0em;
  transform: translateX(-100%);
  white-space: nowrap;
}

#wave_bounds .ptr {
  cursor: pointer;
  position: absolute;
  top: 20%;
  bottom: 20%;
  width: 2px;
  font-size: 1.5vh;
  background: #fff2;
  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_info {
  margin: 0;
  position: absolute;
  top: 1em;
  left: 1em;
  color: #fff4;
  padding: 0;
}

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

.poster {
  margin: 25pt;
  position: relative;
}

.poster canvas {
  display: none;
  padding: 2.5pt;
  background: linear-gradient(45deg, #000, #222);
  box-shadow: #888 0 0 0.5rem 0.5rem;
}

.poster .views {
  display: flex;
  flex-direction: row;
  aspect-ratio: 4/1;
}

.poster .views canvas {
  cursor: pointer;
  box-shadow: none;
  padding: 0;
}

body[item-type="Print"] .views {
  display: none;
}

body[item-type="Print"] canvas#print {
  display: inherit;
}

body[item-type="Bar"] .views canvas,
body[item-type="Ring"] .views canvas,
body[item-type="Pendant"] .views canvas {
  display: inherit;
}

canvas#gold {
  box-shadow: none;
  padding: 0;
}

body[item-type="Bar"] canvas#gold,
body[item-type="Ring"] canvas#gold,
body[item-type="Pendant"] canvas#gold {
  display: inherit;
  aspect-ratio: 5/4;
}

@media (orientation: portrait) {
  body[item-type="Bar"] canvas#gold,
  body[item-type="Ring"] canvas#gold,
  body[item-type="Pendant"] canvas#gold {
    aspect-ratio: 4/5;
  }
}

.progress {
  height: 0;
  z-index: 1;
  position: absolute;
  top: 40%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress span {
  width: 8rem;
  color: #ccc;
  font-size: 0.5em;
  overflow: clip;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress .outer {
  width: 8rem;
  border: 0.1em solid #ccc;
  border-radius: 0.2em;
  padding: 0.15em;
}

.progress .inner {
  border: 0.1em solid #ccc;
  border-radius: 0.1em;
}

#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;
}

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

button.small_btn.debug {
  color: #f80;
}

button.small_btn:hover {
  opacity: 1.0;
}

body.empty #buy_buttons {
  display: none;
}

canvas#volumetric {
  width: 100%;
}

.checkout {
  color: #ccc;
  margin: 2em 75pt;
}

.checkout p {
  text-align: left;
  padding: 0;
}

#price {
  text-align: center;
}

#usd {
  font-weight: bold;
  color: #ccc;
}

.vh_layout {
  display: flex;
  flex-direction: column;
}

.settings {
  color: #888;
  margin: 0 75pt;
  border-spacing: 0;
  font-size: 1.2em;
}

@media(orientation: landscape) {
  .vh_layout {
    flex-direction: row;
  }

  .settings {
    margin-top: 25pt;
    margin-left: 0;
    margin-right: 25pt;
    display: inline;
  }
}

.settings tr {
  height: 4em;
}

.settings tr:not(:last-child) td {
  border-bottom: 0.1em solid #333;
}

.settings td {
  padding: 0;
  margin: 0;
}

.settings td:first-child {
  text-align: right;
  padding-right: 1em;
}

.settings input {
  color: #ccc;
  font-size: 1em;
  background: #000;
  border: none;
}

.settings #audio_name {
  border: 0.2em solid #888;
  border-radius: 0.5em;
  padding: 0.5em;
  width: -moz-available;
  width: -webkit-fill-available;
}

.settings input[type="checkbox"] {
  width: 1em;
  height: 1em;
}

.select {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5em;
}

.select>input {
  cursor: pointer;
  width: -moz-available;
  width: -webkit-fill-available;
}

.select>span {
  color: #888;
  border: 0.2em solid #888;
  border-radius: 0.5em;
  padding: 0.5em;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}

.select>span.debug {
  color: #840;
}

.select>span.active {
  color: #000;
  border-color: #ccc;
  background: #ccc;
}

.settings #fg_color,
.settings #brush_size,
.settings #ink_style {
  cursor: pointer;
}

.settings tr.debug td:first-child {
  color: #840;
}

.wave_info {
  position: relative;
  height: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 0 0.25rem;
}

.wave_info > span {
  flex: 1;
}

.wave_info.bottom {
  top: -3rem;
}

.wave_info button {
  height: 2rem;
  background: none;
  padding: 0;
  border-radius: 0;
  margin: 0.5rem;
  font-size: 1em;
  mix-blend-mode: difference;
}

.wave_info button.debug {
  font-size: 0.5em;
}

#play_sound,
#stop_sound,
#brightness_more,
#zoom_in {
  font-size: 1.5em;
}

body.playing #play_sound {
  display: none;
}

body:not(.playing) #stop_sound {
  display: none;
}

body[item-type="Bar"] tr:not(.bg-bar),
body[item-type="Pendant"] tr:not(.bg-pendant),
body[item-type="Ring"] tr:not(.bg-ring) {
  display: none;
}

body[item-type="Print"] tr:not(.bg-print) {
  display: none;
}

p.details {
  display: none;
}

body[item-type="Print"] p.details.bg-print {
  display: inherit;
}

p.details.bg-ring,
p.details.bg-pendant {
  display: inherit;
  text-align: center;
}
