* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
}

body {
  counter-reset: section;
  /* Set a counter named 'section', and its initial value is 0. */
}

header.launch-screen {
  margin-block: .5em;
  padding-inline: 4em;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.wrapper {
  display: none;
}

.launch-screen p {
  font-size: 1.2rem;
}

#start-app {
  min-width: 10rem;
  padding: 2rem 2rem;
}

.dropzone {
  border: 1px solid black;
  padding: 16px;
}

button:disabled ~ .hide-after-start, button:disabled:has(+ .hide-after-start) {
  display: none;
}

button#start-app[role="switch"] {
  display: block;
  margin: 20px;
  padding: 4px 4px 8px 8px;
  border: 0 solid #005a9c;
  border-radius: 5px;
  background-color: white;
  color: black;
}

button#start-app[role="switch"]:hover, button#start-app[role="switch"]:focus {
  outline: 3px blue;
  outline-offset: 1px;
  outline-style: dashed;
}

button[role="switch"] .label {
  display: block;
  text-align: center;
}

button[role="switch"] svg {
  display: inline-block;
  width: 36px;
  height: 20px;
  forced-color-adjust: auto;
  position: relative;
  top: 4px;
}

button[role="switch"] svg rect {
  fill-opacity: 0;
  stroke-width: 2;
  stroke: currentcolor;
}

button[role="switch"] svg rect.off {
  display: block;
  stroke: currentcolor;
  fill: currentcolor;
  fill-opacity: 1;
}

button[role="switch"][aria-checked="true"] svg rect.off {
  display: none;
}

button[role="switch"] svg rect.on {
  display: none;
}

button[role="switch"][aria-checked="true"] svg rect.on {
  color: green;
  display: block;
  stroke-color: currentcolor;
  fill: currentcolor;
  fill-opacity: 1;
}

button[role="switch"] span.off {
  display: inline-block;
}

button[role="switch"] span.on {
  display: none;
}

button[role="switch"][aria-checked="true"] span.off {
  display: none;
}

button[role="switch"][aria-checked="true"] span.on {
  display: inline-block;
}

button[role="switch"]:focus,
button[role="switch"]:hover {
  padding: 2px 2px 6px 6px;
  border-width: 2px;
  outline: none;
  background-color: #def;
  cursor: pointer;
}


h2::before {
  counter-increment: section;
  /* Increment the value of section counter by 1 */
  content: "#" counter(section) ": ";
  /* Display counter value in default style (decimal) */
}

.wrapper {
  height: 100%;
  flex-direction: column;
  padding-inline: 16px;
}

h1,
h2 {
  font-size: 2rem;
  font-weight: normal;
  padding: 0.5rem 0 0 0;
}

span,
p {
  font-size: 1.8rem;
}

.main-controls {
  padding: 0.5rem 0;
}

canvas {
  display: block;
  margin-bottom: 0.5rem;
  width: 100%;
  height: 60px;
}

#buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#buttons button {
  font-size: 1rem;
  padding: 1rem;
  width: calc(50% - 0.25rem);
}

button.classic {
  font-size: 1rem;
  background: #0088cc;
  text-align: center;
  color: white;
  border: none;
  transition: all 0.2s;
  padding: 0.5rem;
}

button {
  font-size: 1rem;
  text-align: center;
  border: none;
  transition: all 0.2s;
  padding: 0.5rem;
}

button:disabled {
  cursor: not-allowed;
  background: grey;
}

button#send-clips {
  background: black;
  color: white;
}

button:hover:not(:disabled),
button:focus:not(:disabled) {
  cursor: pointer;
  box-shadow: inset 0px 0px 10px rgba(255, 255, 255, 1);
  background: #0ae;
}

button:active {
  box-shadow: inset 0px 0px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(2px);
}

/* Make the clips use as much space as possible, and
 * also show a scrollbar when there are too many clips to show
 * in the available space */
.sound-clips {
  flex: 1;
  overflow: auto;
}

section,
article {
  display: block;
}

.clip {
  padding-bottom: 1rem;
}

audio {
  width: 100%;
  display: block;
  margin: 1rem auto 0.5rem;
}

.clip p {
  display: inline-block;
  font-size: 1rem;
}

.clip button {
  font-size: 1rem;
  float: right;
}

.clip a {
  display: inline-block;
  margin-block: 24px;
}

.counting {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

#recording-counter {
  color: #0088cc;
  font-variant-numeric: tabular-nums;
  font-size: 1.8rem;
}

button.delete {
  background: #f00;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

/* Checkbox hack to control information box display */

label {
  font-size: 3rem;
  position: absolute;
  top: 2px;
  right: 3px;
  z-index: 5;
  cursor: pointer;
  background-color: black;
  border-radius: 10px;
}

input[type="checkbox"] {
  position: absolute;
  top: -100px;
}

aside {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  transition: 0.3s all ease-out;
  background-color: #efefef;
  padding: 1rem;
}

aside p {
  font-size: 1.2rem;
  margin: 0.5rem 0;
}

aside a {
  color: #666;
}

/* Toggled State of information box */
input[type="checkbox"]:checked~aside {
  transform: translateX(0);
}

/* Cursor when clip name is clicked over */
.clip p {
  cursor: pointer;
}

/* Adjustments for wider screens */
@media all and (min-width: 800px) {

  /* Don't take all the space as readability is lost when line length
     goes past a certain size */
  .wrapper {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
  }
}