html, body {
  color: #333;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: Helvetica, arial, freesans, clean, sans-serif;
  font-size: 1em;
  line-height: 1.5em;
  background-color: #fff;
  overscroll-behavior-y: none;
}

body {
  display: flex;
  flex-direction: column;
  height:100vh;
}

h1, h2, h3, h4, h5, h6, p {
  font-size: 1em;
  margin: 0;
  padding: 0;
  font-weight: normal;
}

p {
  margin: 1em;
}

a:link,
a:visited,
a:hover
a:active {
  color: #333;
  text-decoration: none;
}

img {
  border: none;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  width: 100%;
  background-color: #444;
  font-size: 12px;
  color: #fff;
  box-sizing: border-box;
}

header a:link, header a:hover, header a:visited, header a:active {
  color: #fff;
}

header a:hover {
  text-decoration: underline;
}

#menu-items {
    display: flex;
}

#reset-button {
    margin-left: 16px;
}

#copy-button {
    margin-left: 16px;
}

#sync-button {
    margin-left: 16px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

header input[type="checkbox"] {
    vertical-align: middle;
    margin-right: 4px;
    margin-top: 0px;
}

#header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 32px;
}


footer {
  padding: 8px;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  color: #fff;
  text-align: center;
  justify-content: center;
  align-items: center;
}

#main-wrapper {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
}

#sidebar {
  width: 200px;
  min-width: 200px;
  background-color: #f5f5f5;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: #e8e8e8;
  font-weight: bold;
  font-size: 12px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#new-doc-button {
  background-color: #444;
  color: #fff;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#new-doc-button:hover {
  background-color: #666;
}

#document-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex-grow: 1;
}

#document-list li {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #e8e8e8;
  font-size: 13px;
  transition: background-color 0.15s;
}

#document-list li:hover {
  background-color: #e8e8e8;
}

#document-list li.active {
  background-color: #ddd;
  font-weight: 500;
}

#document-list li .doc-name {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#document-list li .doc-name.editing {
  background: #fff;
  border: 1px solid #ccc;
  padding: 2px 4px;
  margin: -2px -4px;
  outline: none;
}

#document-list li .doc-actions {
  display: none;
  gap: 4px;
}

#document-list li:hover .doc-actions {
  display: flex;
}

#document-list li .doc-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 11px;
  color: #666;
  border-radius: 3px;
}

#document-list li .doc-actions button:hover {
  background-color: #ccc;
}

#document-list li .doc-actions button.delete-btn:hover {
  background-color: #e74c3c;
  color: #fff;
}

#container {
  flex-grow: 1;
  overflow: hidden;
  margin: 0 auto;
  background-color: #fff;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
}

#editor-wrapper {
  height: 100%;
}

#editor {
  height: 100%;
}

#preview-wrapper {
  padding: 8px 16px 16px 16px;
}

.column {
  width: 50%;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  vertical-align: top;
}

#preview.column {
  overflow-y: scroll;
  white-space: normal;
}

.split-container {
  display: flex;
  height: 100%;
  width: 100%;
}

.editor-pane,
.preview-pane {
  height: 100%;
}

.split-divider {
  width: 5px;
  background: #ccc;
  cursor: col-resize;
  z-index: 1;
}

.split-divider.hover {
  background: #999;
}

.split-divider.active {
  background: #666;
}
