@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
:root {
  font-size: 16px;
}

@media(max-width: 300px) {
   :root {
    font-size: 12px;
  }
}

* {
  box-sizing: border-box;
}

h1 {
  text-align: center;
  margin-top: .3em;
  margin-bottom: .2em;
}

h2 {
  text-align: center;
  /* margin-top: 1rem; */
  /* Doesn't seem to do anything */
  padding-top: 1rem;
  margin-bottom: .25rem;
  text-align: center;
}

h3 {
  text-align: center;
  margin-top: 0;
  padding-top: 0;
  margin-bottom: .4rem;
}

h4 {
  text-align: center;
  margin-top: 0;
  padding-top: 0;
  margin-bottom: .6rem;
}

body {
  background-color: #f5f5f5;
  font-family: 'Roboto', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* justify-content: center; */
  height: 100vh;
  margin: 0;
  /* padding: 2.5rem; */
  /* doesn't seem to do anything*/
}

canvas {
  border: 2px solid steelblue;
  background-color: white;
}

.toolbox {
  background-color: steelblue;
  border: 1px solid slateblue;
  display: flex;
  width: 804px;
  padding: .7rem;
}

@media(max-width: 810px) {
  canvas {
    width: 95%;
  }
  .toolbox {
    width: 95%;
  }
}

.toolbox>* {
  background-color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  height: 50px;
  height: 75px;
  width: 50px;
  margin: 0.2rem;
  padding: 0.25rem;
  cursor: pointer;
}

@media(max-width: 400px) {
  .toolbox>* {
    width: 13%;
    height: 50px;
  }
}

.toolbox>*:last-child {
  margin-left: auto;
}

.tool-container {
  display: flex;
  flex-direction: column;
}

.tool-with-slider-container {
  position: relative;
  height: 75px;
}

@media(max-width: 400px) {
  .tool-with-slider-container {
    width: 13%;
    height: 50px;
  }
}

.tool {
  width: 100%;
}

.tool-label {
  font-size: 8px;
}


/* Using absolute positioning for eraser slider contents. Don't know why setting height alone doesn't do it - was displacing out of container. */

#eraser {
  height: 40%;
  width: 90%;
  position: absolute;
  top: 5%;
}

#eraser.active {
  opacity: 0.5;
}

.slider-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 55%;
}

#eraser-label {
  position: absolute;
  top: 78%;
}

@media(max-width:390px) {
  #eraser-label {
    font-size: 8px;
  }
}

@media(max-width:345px) {
  #eraser-label {
    font-size: 6px;
  }
}

@media(max-width:310px) {
  #eraser-label {
    font-size: 4px;
  }
}

.slider {
  width: 100%;
  height: 3px;
  margin: 2px;
  background: #d3d3d3;
  outline: none;
}

.tool-label {
  font-size: 10px;
}