@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');

:root {
  font-size: 10px;
  --text-color: rgb(242, 242, 242);
  --text-color-off: rgba(242, 242, 242, 0.25);
  --black: #121212;
  --dark-grey: #1f1f1f;
  --purple: #bb86fc;
  --navy-blue: #5600e8;
  --error: #ff7888;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--black);
}

header {
  margin-top: 5rem;
  display: grid;
  padding: 0 7rem;
  grid-template-columns: repeat(12, 1fr);
  background: var(--dark-grey);
}

h1 {
  font-family: 'poppins';
  color: var(--text-color);
  font-size: 3.6rem;
  margin: 0;
  grid-column: 4/10;
  align-self: center;
  justify-self: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  max-width: 160rem;
  margin: auto;
  margin-bottom: 5rem;
}

.note-creation-container {
  grid-column: 3/11;
  margin-top: 5rem;
  background: var(--dark-grey);
  height: 20rem;
  border-radius: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 2rem;
}

#note-input {
  color: var(--text-color);
  background: none;
  outline: none;
  border: none;
  font-family: 'lato';
  font-size: 1.6rem;
  grid-column: 1/3;
  align-self: start;
  height: 10rem;
  resize: none;
}

.color {
  width: 4rem;
  height: 4rem;
  background-color: #fff;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
}

.color:focus {
  outline: 0;
}

.colors-container {
  align-self: end;
  display: flex;
  gap: 1rem;
}
#color1 {
  background-color: #556b2f;
  border: solid 0.3rem #fff;
}

#color2 {
  background-color: #cd5c5c;
  border: solid 0.1rem #fff;
}

#color3 {
  background-color: #9932cc;
  border: solid 0.1rem #fff;
}

#color4 {
  background-color: #483d8b;
  border: solid 0.1rem #fff;
}

#color5 {
  background-color: #b8860b;
  border: solid 0.1rem #fff;
}

#color6 {
  background-color: #3c1414;
  border: solid 0.1rem #fff;
}

#color7 {
  background-color: #708090;
  border: solid 0.1rem #fff;
}

.btn {
  color: var(--text-color);
  font-family: 'lato';
  height: 4rem;
  width: 10rem;
  background: var(--navy-blue);
  outline: none;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.6rem;
  cursor: pointer;
  align-self: end;
  justify-self: end;
}

.btn i {
  font-size: 1.2rem;
  margin-left: 0.5rem;
}

.btn:active {
  transform: scale(0.98);
}

.btn.delete {
  grid-column: 3/12;
  width: 15rem;
  margin-top: 5rem;
}

.error {
  margin-top: 1rem;
  text-align: center;
  grid-column: 1/13;
  justify-self: center;
  color: var(--error);
  font-family: 'lato';
  font-size: 1.6rem;
  visibility: hidden;
  height: 2rem;
}

.nest {
  grid-column: 2/12;
  border-image: url(assets/border.svg) 25% repeat;
  border-image-width: 1rem;
  margin-top: 1.5rem;
  padding: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: 10rem;
  align-items: flex-start;
}

.note {
  display: grid;
  width: 20rem;
  min-height: 20rem;
  padding: 1rem;
  text-justify: justify;
  grid-template-columns: 1fr 30px;
  grid-template-rows: 1fr 30px;
}

.note .note-text {
  margin: 0;
  padding: 0;
  font-size: 1.6rem;
  font-family: 'lato';
  color: var(--text-color);
  word-wrap: break-word;
  grid-column: 1/3;
}

.note .note-text.hidden {
  display: none;
}

.note textarea {
  font-size: 1.6rem;
  font-family: 'lato';
  background-color: #f6f6f6;
  height: 15rem;
  resize: none;
  grid-column: 1/3;
}

.icons-container {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.edit {
  width: 1.7rem;
  color: #fff;
  font-size: 1.7rem;
  cursor: pointer;
  grid-column: 1/2;
  grid-row: 2/3;
  align-self: end;
  justify-self: end;
}

.edit.active {
  transform: scale(1.2);
}

.trash {
  width: 1.7rem;
  color: #fff;
  font-size: 1.7rem;
  cursor: pointer;
  grid-column: 2/3;
  grid-row: 2/3;
  align-self: end;
  justify-self: end;
}

@media (max-width: 750px) {
  .grid {
    grid-template-columns: repeat(6, 1fr);
    padding: 0 5rem;
  }
  h1 {
    font-size: 2.4rem;
  }
  header {
    padding: 0 2rem;
    margin-top: 2rem;
  }
  .note-creation-container {
    height: 25rem;
    grid-column: 1/7;
  }
  .colors-container {
    justify-self: center;
    grid-column: 1/3;
    width: 100%;
    gap: 0;
    justify-content: space-between;
  }
  #add-note {
    margin-top: 1rem;
    grid-column: 1/3;
    width: 100%;
  }
  .btn.delete {
    grid-column: 5/7;
  }
  .nest {
    grid-column: 1/7;
  }
}

@media (max-width: 500px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 2rem;
  }
  header {
    padding: 0;
    margin-top: 2rem;
  }
  .logo-container {
    display: flex;
    justify-content: center;
    grid-column: 1/13;
    background: var(--navy-blue);
  }
  h1 {
    grid-column: 1/13;
    margin: 3.2rem 0;
  }
  .note-creation-container {
    grid-column: 1/3;
  }
  .colors-container {
    flex-wrap: wrap;
  }
  .color {
    width: 3rem;
    height: 3rem;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
  }
  .btn.delete {
    grid-column: 1/3;
    justify-self: center;
  }
  .nest {
    grid-column: 1/3;
    justify-content: center;
  }
}
