.widget {
  background: #fff;
  border: 1px solid #eaeaea;
  margin-bottom:2em;
  position: relative;
  padding: 2em;
  overflow: auto;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.widget img {
  max-width: 100%;
}

.widget li {
  display: block;
}
.widget ul ul li {
  display: revert;
}
.widget ul ul .tag {
  list-style-type: disc;
}
.widget ul  ul  li  p {
  font-weight: normal;
}
.widget ul ul ul li {
  list-style-type: circle;
}

/* Editor mode */

.widget .editorToolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  background-color: #d7d7d7;
  padding: 4px 8px;
  margin: -2em -2em 1em -2em;
}

.widget .editorToolbar.hidden {
  display: none;
}

.widget .editorToolbar button {
  padding: 2px 7px;
  cursor: pointer;
  border: 1px solid #bbb;
  background: #f0f0f0;
  border-radius: 2px;
  font-size: 0.85em;
  line-height: 1.6;
}

.widget .editorToolbar button:hover {
  background: #ddd;
}

.toolbar-sep {
  width: 1px;
  height: 1.2em;
  background: #aaa;
  margin: 0 2px;
}

.source-editor {
  display: block;
  width: 100%;
  min-height: 4em;
  font-family: monospace;
  font-size: 1em;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  resize: vertical;
  overflow: hidden;
}

.widget-content {
  outline: none;
  cursor: text;
  min-height: 1em;
}

.widget-content:focus-within {
  box-shadow: inset 0 0 0 2px #b8d4f0;
}

/* Add-widget button */

#add-widget-btn {
  display: block;
  padding: 0.7em;
  font-size: 1.5em;
  line-height: 1;
  cursor: pointer;
  border: 2px dashed #bbb;
  background: #f8f8f8;
  color: #999;
  margin-bottom: 2em;
}

#add-widget-btn:hover {
  background: #eee;
  color: #444;
  border-color: #888;
}

#add-widget-btn.hidden {
  display: none;
}