* {
  box-sizing: border-box;
}

/* LIGHT */

.theme-light {
  color: #333;
  background-color: #fff;
}

.theme-light a {
  color: slateblue;
  text-decoration: none;
  /*border-bottom: 1px solid slateblue;*/
}

.theme-light nav {
  background-color: rgba(255, 255, 255, 0.38);
}

.theme-light nav a {
  color: #777;
  text-decoration: none;
}

.theme-light nav a:hover {
  color: #aaa;
}

.theme-light button {
  border: 1px solid slateblue;
  color: slateblue;
}

.theme-light select {
  border: 1px solid slateblue;
  color: slateblue;
}

.theme-light #mode {
  color: #ddd;
}

.theme-light #sidebar-container {
  background-color: #fff;
}

.theme-light #footer {
  color: #aaa;
}

/* DARK */

.theme-dark {
  color: #aaa;
  background-color: #333;
  /*background-color: #262626; */
}

.theme-dark a {
  color: mediumslateblue;
}

.theme-dark nav {
  background-color: rgba(51, 51, 51, 0.40);
}

.theme-dark nav a {
  color: #aaa;
  text-decoration: none;
}

.theme-dark nav a:hover {
  color: #777;
}

.theme-dark button {
  border: 1px solid #aaa;
  color: #aaa;
}

.theme-dark select {
  border: 1px solid #aaa;
  color: #aaa;
}

.theme-dark #mode {
  color: mediumslateblue;
}

.theme-dark #sidebar-container {
  background-color: transparent;
}

.theme-dark #footer {
  color: #777;
}

body {
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Avenir', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.03em;
}

a {
  text-decoration: none;
  line-height: normal;
  padding-bottom: 0px;
}

#mode {
  position: absolute;
  top: 10px;
  right: 30px;
  font-family: HelveticaNeue-CondensedBold,Futura-Medium,-apple-system,'Arial Rounded MT Bold',system-ui,Ubuntu,sans-serif,'Arial Unicode MS','Zapf Dingbats','Segoe UI Emoji','Segoe UI Symbol',Noto Color Emoji, NotoColorEmoji,EmojiSymbols,Symbola,Noto,'Android Emoji',AndroidEmoji,'lucida grande',tahoma,verdana,arial,AppleColorEmoji,'Apple Color Emoji';
  font-size: 32px;
  cursor: pointer;
}

#app {
  display: grid;
  max-width: 100vw;
  max-height: 100vh;
  min-height: 100vh;
  grid-template-rows: 60px 1fr 60px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0 0px;
}

#app nav {
  display: grid;
  justify-content: flex-start;
  align-content: center;
  height: 100%;
  position: sticky;
  top: 0px;
  padding-left: 30px;
  grid-auto-columns: auto;
  grid-auto-flow: column;
  grid-column-gap: 30px;
}

#app h1 {
  font-size: 40px;
  font-weight: normal;
  font-family: 'Avenir';
}

#header {
  display: grid;
  grid-auto-columns: auto;
  grid-auto-flow: column;
  grid-column-gap: 30px;
  width: 100%;
  align-content: center;
  justify-content: flex-start;
  height:auto;
  padding: 20px 30px;
}

#header h3 {
  padding: 0;
  font-weight: 300;
  font-size: 24px;
  line-height: normal;
  margin: auto 0;
  color: #777;
}

#content {
  display: grid;
  max-width: 100%;
  font-size: 20px;
  line-height: 30px;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.03em;
}

.container {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  grid-column-gap: 20px;
  margin-top: 30px;
  padding: 0px 30px;
}

.side-wrapper {
  display: grid;
  width: 100%;
  margin-left: auto;
  align-items: flex-start;
  margin-bottom: auto;
  padding: 20px;
}

.side-container {
  display: grid;
  margin-left: auto;
  grid-row-gap: 20px;
  width: 100%;
  height: auto;
}

.gallery-container {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 30px;
  padding: 0px 30px;
}

#gallery-images-output {
  display: grid;
  justify-content: center;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.gallery-img-container {
  display: grid;
  align-content: flex-start;
  grid-auto-rows: auto;
}

.gallery-img {
  max-width: 100%;
  height: auto;
}

#output-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(auto, 1fr));
  grid-auto-rows: auto;
  grid-gap: 20px;
  align-content: flex-start;
}

#images-output {
  display: grid;
  justify-content: center;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

#canvas {
  max-width: 100%;
  height: auto;
  max-height: 93vh;
}

#result-img {
  max-width: 100%;
  height: auto;
}

#sidebar-wrapper {
  display: grid;
  width: 100%;
  margin-left: auto;
  max-width: 350px;
  min-width: 350px;
  align-items: flex-start;
  margin-bottom: auto;
  padding: 20px;
}

#sidebar-container {
  display: grid;
  margin-left: auto;
  grid-row-gap: 20px;
  width: 100%;
  height: auto;
}

#sidebar {
  display: grid;
  grid-auto-rows: auto;
  grid-row-gap: 20px;
  min-height: 50px;
}

#download-link {
  display: inline-block;
  margin-top: 30px;
  margin-right: auto;
}

.upload {
  font-weight: 400;
  font-size: 38px;
  line-height: 20px;
}
.wrapper {
  display: grid;
  grid-template-columns: auto auto auto;
  align-content: flex-start;
  justify-content: flex-start;
  grid-template-rows: auto;
  grid-auto-flow: column;
  grid-column-gap: 10px;
  max-width: 100%;
}

.row {
  display: block;
  margin-bottom: auto;
  margin-right: 3px;
  font-size: 25px;
  line-height: normal;
}

.button-wrapper {
  display: grid;
  align-items: flex-start;
  margin-top: 30px;
  margin-bottom: auto;
}


#footer {
  display: grid;
  position: sticky;
  bottom: 0px;
  padding-bottom: 20px;
  padding-right: 30px;
  align-content: flex-end;
  text-align: right;
  justify-content: flex-end;
  font-size: 15px;
  letter-spacing: 0.08em;
  font-weight: 300;
}

select {
  font-size: 18px;
  border: none;
  border-radius: 0;
  background-color: transparent;
  padding: 4px 6px;
  font-family: 'Avenir';
  font-weight: 300;
  width: 100%;
  max-width: 300px;
  min-width: auto;
  margin: auto 0;
}

button {
  font-size: 18px;
  border: none;
  border-radius: 0;
  background-color: transparent;
  padding: 6px 8px;
  font-family: 'Avenir';
  font-weight: 300;
  letter-spacing: 0.04em;
  width: 100%;
}

button:focus {
  outline: none;
}

button:hover {
  cursor: pointer;
}

@media all and (max-width: 700px) {

  .container {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    grid-row-gap: 20px;
    padding: 0 20px;
  }

  #sidebar-wrapper {
    margin: 0 auto;
    max-width: 400px;
    min-width: auto;
  }
/*
  #mode {
    top: auto;
    bottom: 20px;
    left: 20px;
  }
  */

}
