* {
  border: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-family: "Inter", sans-serif;
  
  --background-primary: #F4F5FB;
  --background-secondary: #FFFFFF;
  
  --color-brand: #CA3884;
  --color-brand-hover: #A52C6B;
  --color-danger: #C93847;

  --content-primary: #080B12;
  --content-secondary: #374151;
  --content-tertiary: #9CA3AF;
  --always-white: #FFFFFF;

  --border-primary: #D1D5DB;
  --border-hover: #B9C2D0;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-primary);
  display: flex;
  justify-content: center;
}

#app {
  display: flex;
  max-width: 627px;
  width: 100%;
  flex-direction: column;
  margin-inline: 25px;
}

header {
  display: flex;
  justify-content: center;
  margin-bottom: 3.9rem;
  
  & img {
    height: 3rem;
  }
}

main {
  

  & .add-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    & .text {
      width: 70%;
      border-radius: 12px;
      padding-inline: 18px;
      font-size: 16px;
      border: 1px solid var(--border-primary);
      padding-block: 0.7rem;

      &:hover {
        border: 1px solid var(--border-hover);
      }

      &:focus {
        outline: none;
        border: 1px solid var(--background-secondary);
      }
    }

    & button {
      padding-block: 0.7rem;
      width: 30%;
      border-radius: 12px;
      background-color: var(--color-brand);
      color: var(--always-white);
      font: 400 16px/20px var(--font-family);
      cursor: pointer;
    }
  }
}


.items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 40px;
  color: var(--content-secondary);
  font-size: 16px;

  & .item {
    background-color: #FFFFFF;
    display: flex;
    gap: 8px;
    border-radius: 12px;
    align-items: center;
    padding-left: 12px;

    height: 49px;

    & .trash {
      margin-left: auto;
      margin-right: 20px;
      cursor: pointer;
    }
  }
}

.error {
  display: flex;
  align-items: center;
  background-color: var(--color-danger);
  color: var(--background-primary);
  gap: 8px;
  padding-left: 12px;
  border-radius: 12px;

  margin-top: 36px;
  margin-bottom: 80px;


  & .delete-small{
    margin-left: auto;
    margin-right: 20px;
    cursor: pointer;
  }
}

.error {
  display: none;
  gap: 8px;
  width: 100%;
  
  & p {
    display: inline-block;
  }

}

@media screen and (max-width: 460px){

  h1#title {
    font-size: 22px;
  }

  .add-item {
    flex-direction: column;
    gap: 20px;
  }

  main .add-item .text {
    width: 100%;
  }

  main .add-item button {
    width: 100%;
  }
  
}