/* ----- Root theme ----- */
@import url("https://fonts.googleapis.com/css2?family=Crimson+Text&family=Open+Sans:wght@400;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

* {
  box-sizing: border-box;
  font-family: "Crimson Text", serif;
}

/* ----- Text style ----- */

.pretty-text {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px;
}
h1 {
  text-align: center;
}

.pretty-text p {
  text-align: justify;
}
.pretty-text p.big {
  text-indent: 3em;
}

.pretty-text .source {
  display: block;
  color: gray;
  font-size: 0.9em;
  margin: 0;
  padding: 0;
}

/* ----- Input style ----- */

.action-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 4px 8px;
}

.input-button {
  display: flex;
  align-items: center;
  background-color: rgba(120, 120, 120, 0.1);
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 3px;
  margin: 2px;
  padding: 4px 12px;
  font-weight: bold;
  cursor: pointer;
  outline: none;
  transition: all 200ms ease-out;
}
.input-button:hover {
  background-color: rgba(120, 120, 120, 0.2);
}
.input-button:active {
  background-color: rgba(120, 120, 120, 0.4);
}
.input-button:focus {
  border: 1px solid rgba(120, 120, 120, 0.6);
}

.selector {
  height: fit-content;
  border: 1px solid transparent;
  border-bottom: 1px solid gray;
  border-radius: 3px;
  margin: 2px;
  font-size: 1em;
  outline: none;
  cursor: pointer;
  transition: all 250ms ease-out;
}
.selector:hover,
.selector:focus {
  background: rgba(120, 120, 120, 0.1);
  border: 1px solid rgb(120, 120, 120);
}

.slide-wrapper {
  flex: 1;
  display: flex;
  align-items: baseline;
  padding: 0;
  margin: 4px;
  max-width: 250px;
  min-width: 120px;
}
.slide-wrapper label {
  padding: 0;
  margin: 0;
  margin-right: 4px;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 5px;
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.slider:hover {
  opacity: 1;
}
.slider:focus {
  opacity: 1;
  border: 1px solid rgba(120, 120, 120, 0.6);
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: gray;
  cursor: pointer;
}

/* ---- Header ----- */

header {
  position: fixed;
  z-index: 666;
  top: 0;
  right: 0;
}

#nav-open,
#nav-close {
  display: block;
  margin: 0;
  background: white;
  height: 32px;
  width: 32px;
  padding: 2px;
  outline: none;
  transition: all 200ms ease;
  border: none;
}
#nav-open {
  position: absolute;
  right: 100%;
  top: 0;
  box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.1);
  border-radius: 0;
  border-bottom-left-radius: 7px;
}
#nav-close {
  border-radius: 4px;
  margin: 0 auto;
}
#nav-open svg,
#nav-close svg {
  height: 100%;
  width: 100%;
}

#nav-open:hover,
#nav-open:focus,
#nav-close:hover,
#nav-close:focus {
  background-color: #eaeaea;
}

nav {
  width: fit-content;
  padding: 12px;
  background: #fefefe;
  box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 7px;
}
nav .wrapper {
  margin: 6px 0;
}
nav h4 {
  padding: 2px 4px;
  margin: 1px;
  font-size: 1.2em;
}
nav a {
  display: block;
  color: gray;
  text-decoration: none;
  border-radius: 4px;
  padding: 2px 4px;
  margin: 0;
  font-size: 1.1em;
  width: 130px;
}
nav a:hover {
  background-color: rgba(120, 120, 120, 0.07);
}

/* ----- Footer ----- */

footer {
  display: flex;
  height: 70px;
  background-color: black;
  color: white;
  justify-content: center;
  align-items: center;
}
footer a {
  text-decoration: none;
  color: white;
  margin: 4px;
  padding: 0;
}
footer svg {
  height: 100%;
  width: 100%;
}
footer .media-button {
  background: none;
  border-radius: 7px;
  border: none;
  color: white;
  padding: 2px;
  margin: 2px;
  height: 30px;
  width: 30px;
  outline: none;
  transition: 250ms ease-out;
}
footer .media-button:hover,
footer .media-button:focus {
  color: black;
  background: white;
}

/* ----- Reactive canvas ----- */

canvas {
  max-width: 100%;
}
