:root {
  --primary-color:#8861bc;
  /* --secondary-color:#e8c9bc; */
  --field-color:#c58e78;
  --field-title:white;
  --text-color:white;
  --background-color:black;
  --font-size-some-text:200%;
}

body {
  background-color:var(--background-color);
  color:var(--text-color);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

#copyright {
  text-align:center;
  margin-top:2rem;
}

#qr-container {
  display:flex;
  justify-content:center;
  align-items:center;
}

#qr-container canvas, #qr-container img {
  background:white; /* explicitly use white for quiet zone */
  padding:.5rem; /* quiet zone */
  box-sizing:content-box;
}

#qr-vwrapper {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1rem;
}

#qr-hwrapper {
  position:relative;
  display:inline-flex;
  justify-content:center;
  align-items:center;
}

#qr-logo {
  position:absolute;
  width:3.5rem;
  height:auto;
  background:white; /* explicitly use white for quiet zone */
  padding:.1rem;
  border-radius:1rem;
  pointer-events:none;
}

#ec-level {
  cursor:grab;
}

#ec-level:active {
  cursor:grabbing;
}

h1 {
  text-align:center;
  font-weight: 400;
}

h2 {
  padding:1ex;
  margin:0;
  background-color:var(--primary-color);
  color:var(--text-color);
  border-top-left-radius:.5rem;
  border-top-right-radius:.5rem;
  font-weight: 400;
}

h3 {
  padding:1ex;
  margin:0;
  background-color:var(--field-color);
  color:var(--field-title);
  font-variant-caps:small-caps;
  border-top-left-radius:.5rem;
  border-top-right-radius:.5rem;
}

a {
  color:var(--text-color);
}

input[type='text'] {
  background-color:transparent;
  color:var(--text-color);
  border:none;
  padding:.25rem .5rem;
}

select {
  background-color:transparent;
  color:var(--text-color);
  border:none;
  font-size:calc(var(--font-size-some-text) - .5rem);
}

#sections {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
}

.section {
  border:1px solid var(--primary-color);
  margin-left:1.5rem;
  margin-right:0;
  border-radius:.5rem;
}

.field, .ec-field {
  margin:.5rem;
  margin-bottom:1rem;
  text-align:center;
  border:1px solid var(--field-color);
  border-radius:.5rem;
}

.field input, .field select {
  margin:.5rem;
}
.field input[type != 'checkbox'] {
  width:12rem;
}
.field select {
  width:12rem;
}

.field input {
  color:var(--text-color);
  background-color:transparent;
  border:none;
  text-align:center;
  font-size:var(--font-size-some-text);
}

.field input.text {
  width:85%;
}

.field input.number {
  width:4rem;
}

.field input.counter {
  width:2rem;
}

.field input.range {
  width:10rem;
  margin-bottom:0;
  cursor:grab;
}

.field div.range-label {
  font-size:var(--font-size-some-text);
}

.lap-timer .display {
  margin:.5rem;
  font-size:var(--font-size-some-text);
}

.lap-timer .cumulative-display {
  margin:.5rem;
}

.field input[type='checkbox'] {
  margin:1rem;
  transform:scale(1.5);
  cursor:pointer;
}

.counter-button, .lap-timer button {
  font-size:var(--font-size-some-text);
  cursor:pointer;
  user-select:none;
 /* -moz-user-select:none; */
  border:1px solid #303030;
  padding:.2rem .5rem;
  border-radius:.25rem;
  background-color:transparent;
  color:var(--text-color);
}

.lap-timer button {
  padding-top:.4rem;
  padding-bottom:.1rem;
  margin:0 .25rem;
}

.counter-button:hover .lap-timer button:hover {
  background-color:#303030;
}

.field img {
  width:100%;
  height:auto;
  cursor:zoom-in;
}

#popup {
  position:fixed;
  inset:0;
  background-color:rgb(0,0,0,.9);
  text-align:center;
  vertical-align:middle;
  cursor:zoom-out;
}

/* Get rid of the input type='number' spinners */
/* Chrome, Edge, Safari */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance:none;
    margin:0;
}

/* Firefox */
input[type=number] {
    -moz-appearance:textfield;
}

#buttons button {
  border:1px solid var(--primary-color);
  border-radius:.25rem;
  color:var(--text-color);
  background-color:var(--primary-color);
  font-size:var(--font-size-some-text);
  padding:1ex 1em;
  cursor:pointer;
  margin-bottom:1rem;
}

#buttons {
  margin-top:2rem;
  text-align:center;
}

button:hover {
  border-color:var(--text-color);
}

#sprites { display:none; }

.modal {
  display:none; /* Hidden by default */
  position:fixed;
  z-index:1000;
  left:5%;
  top:5%;
  width:90%;
  height:90%;
  overflow:auto; /* Enable scrolling if needed */
  display:flex;
  justify-content:center;
  align-items:center;
}

.modal-content {
  background-color:black;
  border:2px solid var(--text-color);
  padding:20px;
  border-radius:8px;
  text-align:center;
  position:relative;
  max-width:90%;
  max-height:90%;
  box-shadow:0 5px 15px rgba(0,0,0,0.3);
}

.close {
  position:absolute;
  top:10px;
  right:15px;
  font-size:var(--font-size-some-text);
  font-weight:bold;
  cursor:pointer;
  color:var(--text-color);
}
.close:hover {
  color:#f00;
}

.hidden {
  display:none;
}

@media only screen and (max-width: 992px) {
  #sections {
    display:block;
  }

  .section {
    border:none;
    padding:0;
    margin:0;
    margin-top:1rem;
  }

  .field {
    width:100%;
    margin:1rem 0;
  }

  .field select {
    width:100%;
    zoom:250%;
  }

  .field input[type='checkbox'] {
    zoom:200%;
  }

  .field select {
    font-size:inherit; /* don't get huge on mobile */
  }
}
