* {
  margin: 0px;
  padding: 0px;
}

a {
  text-decoration: none;
}

ol, ul {
  list-style: none;
}

#app {
  display: flex;
}

/* sidebar document list */
#sidebar-header {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  &:hover {
    cursor: pointer;
    background-color: #EBEBEA;
  }
}

#header-close {
  width: 34px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;

  > div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 5px;

    &:hover {
      cursor: pointer;
      background-color: #DDDDDC;
    }
  }
}

#header-open {
  position: absolute;
  left: 290px;
  width: 34px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;

  > div {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;

    &:hover {
      cursor: pointer;
      background-color: #DDDDDC;
    }
  }
}

#header-user-profile {
  display: flex;
  align-items: center;
  width: 182px;
  height: 23px;
  margin: 1px 0px;
  padding: 2px 14px;
  
  > div:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-size: 22px;
  }

  > div:nth-child(2) {
    opacity: 0.8;
  }
}

#documents-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 280px;
  font-size: 0.9rem;
  background-color: #FBFBFA;
  border-right: solid 1px #F5F5F4;
  transition: transform 0.4s ease-in-out;
}

#add-document-button {
  display: flex;
  align-items: center;
  background-color: #FBFBFA;
  border: none;
  padding: 2px 10px 2px 5px;
  height: 23px;
  opacity: 0.7;
  text-align: left;
  
  &:hover {
    cursor: pointer;
    background-color: #EBEBEA;
  }
}

#document-list {
  > ul {
    display: flex;
    flex-direction: column;
    
    > li {
      opacity: 0.7;

      > div:first-child {
        padding: 2px 10px 2px 5px;
        margin: 1px 4px;
        display: flex;
        justify-content: space-between;
        height: 23px;
        border-radius: 3px;

        > div {
          height: 100%;
          display: flex;
          align-items: center;
        }

        > div:first-child {
          width: 100%;
        }
      }

      > div:nth-child(2) {
        display: none;
        padding: 2px 10px 2px 19px;
        margin: 1px 4px;

        > div {
          padding-left: 12px;
          height: 23px;
          display: flex;
          align-items: center;
        }
      }
    }
  }
}

#list {
  width: 100%;
  > div {
    display: flex;
    justify-content: space-between;

    > div {
      display: flex;
    }

    > div:first-child {
      width: 100%;
    }
  }

  > div:first-child {
    &:hover {
      cursor: pointer;
      background-color: #EBEBEA;
    }
  }

  > div:nth-child(2) {
    display: none;
    padding: 2px 0 2px 14px;
    margin: 1px 0px;
  }
}

#toggle-child-document {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 23px;
  width: 20px;
  border-radius: 5px;
  transition: 0.3s ease-in-out;

  &:hover {
    background-color: #D4D4D3;
  }
}

#document-title {
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
}

#delete-document-button {
  display: flex;
  align-items: center;
  height: 100%;
  font-weight: bold;
  transition: transition 0.1s ease-in-out;

  &:hover {
    cursor: pointer;
    transform: scale(1.05);
  }
}

#add-child-document-button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: transform 0.1s ease-in-out;
  width: 23px;
  height: 100%;
  &:hover {
    cursor: pointer;
    transform: scale(1.05);
  }
}

/* editor page */
#editor-element-container {
  display: flex;
  flex-direction: column;

  > div:has(input) {
    width: 804px;
    height: 162px;
    padding-left: 96px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    > #editor-element-title {
      height: 54px;
      border: none;
      outline: none;
      padding: 3px 2px;
      font-size: 40px;
      font-weight: bold;
    }
  }

  > div:nth-child(2) {
    width: 708px;
    padding: 5px 96px 290px;
    word-break: normal;

    > div {
      outline: none;
      padding: 3px 2px;

      > div {
        padding: 3px 2px;
      }
    }

    &:hover {
      cursor: text;
    }
  }
}

[contenteditable="true"]:empty:before {
  content: attr(placeholder);
}

#document-edit-page {
  height: 100vh;
  margin: auto;
  display: flex;
  flex-direction: column;
}
