/* variables */
:root {
  --main-font: "Montserrat", sans-serif;
  --main-color: #fe9c75;
  --black: #212121;
  --gray: #604823;
  --white: #fff;
  --red: #b50000;
}

/* global styles */

html {
  box-sizing: border-box;
  font-size: 62.5%; /* 1rem = 10px */
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  font-family: var(--main-font);
  font-size: 1.6rem;
  line-height: 1.8;
}

[class$="__heading"] {
  margin: 2rem 0;
}

[class$="__container"] {
  max-width: 120rem;
  width: 90%; /* cuando el ancho sea menos de 1200px va a ocupar el 90% */
  margin: 0 auto; /* centra el contenedor */
}

/* header */

.header__form {
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 468px) {
  .header__form {
    margin-top: 10rem;
  }
}

.form {
  width: 90%;
  max-width: 100%;
}

@media (min-width: 468px) {
  .form {
    width: 60rem;
  }
}

.form__label {
  display: block;
  font-weight: 600;
}

.note-textarea {
  resize: none;
  width: 100%;
  height: 15rem;
  border-radius: 1.5rem;
  padding: 1rem;
}

.header__buttons {
  max-width: 100%;
  display: flex;
  gap: 2rem;
}

@media (min-width: 468px) {
  .header__buttons {
    width: 60rem;
  }
}

.header__button {
  width: 100%;
  height: 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 1rem;
  border-style: hidden;
  background-color: var(--black);
  color: var(--white);
  font-weight: 600;
}

.header__button:hover {
  cursor: pointer;
}

.header__button-logo {
  height: 2.5rem;
}

/* main */
.notes {
  margin-top: 6rem;
  margin-bottom: 6rem;
}

.notes__heading {
  font-size: 3.5rem;
}

@media (min-width: 468px) {
  .notes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 27rem);
    gap: 4rem;
  }
}

.note {
  background-color: var(--main-color);
  border-radius: 1.8rem;
  padding: 1.5rem 3rem;
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease-in;
}

.note:hover {
  transform: scale(1.02);
}

@media (min-width: 468px) {
  .note {
    margin-bottom: 0;
  }
}

.note__text {
  font-weight: 600;
  word-wrap: break-word; /* hace que el texto se muestre en varias líneas en lugar de extenderse horizontalmente.*/
}

.note__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note__date {
  color: var(--gray);
  font-size: 1.8rem;
}

.note__btn-delete {
  background-color: var(--black);
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border-style: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.note__btn-delete:hover {
  cursor: pointer;
}

.note__btn-delete-logo {
  height: 3rem;
  color: var(--white);
}

/* error message  */

.header__error-message {
  margin-top: 3rem;
  background-color: var(--red);
  width: 100%;
  padding: 1rem;
  border-radius: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--white);
}

@media (min-width: 468px) {
  .header__error-message {
    width: 60rem;
  }
}
