body {
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,
    sans-serif, Apple Color Emoji, Segoe UI Emoji;
  height: calc(100vh - 16px);
  margin: 8px;
  padding: 0;
  color: var(--font-color);
  background: var(--bg-color);
  --font-color: rgb(26, 26, 26);
  --bg-color: white;
  --link-color: #2424ce;
  --bg-color-hover: #e8e8e8;
  --border-color: #a5a5a5;
}

#tabcms-title {
  font-size: 18px;
  font-weight: normal;
  padding: 10px 20px 20px 20px;
  margin: 0;
}

#tabcms-title a {
  color: var(--link-color);
  text-decoration: none;
}

#tabcms-title a:hover {
  text-decoration: underline;
}

#edit-wrapper {
  display: flex;
  height: calc(100% - 100px);
}

#edit-wrapper > * {
  margin-left: 20px;
}

#edit-wrapper > *:last-child {
  margin-right: 20px;
}

#sidebar {
  max-width: 200px;
  min-width: 200px;
  overflow-y: auto;
  padding-right: 5px;
}

#main form label {
  margin-bottom: 5px;
}

.sidebar-list-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--bg-color-hover);
  padding-bottom: 5px;
}

#preview-label {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 5px;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-bottom: 10px;
}

.sidebar-list li {
  display: block;
}

.sidebar-list a {
  font-size: 14px;
  color: var(--font-color);
  display: block;
  padding: 5px 10px;
  text-decoration: none;
  transition: 0.2s background;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-list a:hover,
.sidebar-list a:focus {
  background: var(--bg-color-hover);
}

.tcms-button {
  color: var(--font-color);
  padding: 8px 15px;
  transition: 0.2s background;
  background: none;
  border: 1px solid var(--border-color);
  margin-bottom: 5px;
}

.tcms-button:hover,
.tcms-button:focus {
  background: var(--bg-color-hover);
}

.tcms-add {
  font-size: 14px;
  color: var(--font-color);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: none;
  width: 25px;
  height: 20px;
  background: transparent;
  font-weight: bold;
  transition: 0.2s background;
  padding: 0;
}

.tcms-add::before {
  content: "+";
}

.tcms-add:hover,
.tcms-add:focus {
  background: var(--bg-color-hover);
}

#sidebar .tcms-button {
  display: block;
  width: 100%;
}

#expand-preview {
  margin-left: 5px;
  margin-bottom: 0;
  padding: 5px 10px;
}

.main-form-item {
  margin-right: 10px;
  margin-bottom: 10px;
  display: inline-block;
}

.main-form-item label {
  display: block;
}

.main-form-details summary {
  margin-bottom: 10px;
}

#main {
  width: 600px;
  max-width: 600px;
  flex-grow: 1;
}

#main form input[type="text"] {
  border: 1px solid var(--border-color);
  font-size: 14px;
  padding: 5px 8px;
}

.hidden {
  display: none !important;
}

.main-form-textarea {
  display: block;
}

.main-form-textarea textarea,
.ck-editor__main > .ck-editor__editable {
  min-height: 300px;
}

.ck-editor__editable {
  max-height: 600px;
}

.main-form-textarea textarea {
  width: 100%;
  border: 1px solid var(--border-color);
}

#extra {
  min-height: 100px;
}

#preview {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-color);
}

#preview-wrapper {
  min-width: 500px;
  flex-grow: 1;
}

#file-preview img {
  max-width: 100%;
  height: auto;
}

#file-usage:not(:empty),
#file-preview:not(:empty) {
  margin-bottom: 10px;
}

#file-usage ul {
  padding: 0;
  margin: 10px 30px;
}

#file-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-item-file-name,
#file-name {
  width: calc(100% - 16px);
}

.description {
  margin-top: 0;
  font-size: 12px;
}

ul.description {
  padding: 0;
  margin: 0;
  margin-left: 20px;
}

#tabcms-links {
  display: flex;
  position: absolute;
  top: 20px;
  right: 30px;
}

#tabcms-links a {
  font-size: 14px;
  text-decoration: none;
  color: var(--link-color);
}

#tabcms-links a:hover {
  text-decoration: underline;
}

#tabcms-links a:not(:last-child) {
  margin-right: 10px;
}

.shepherd-arrow:before,
.shepherd-element {
  background: #f0f0f0;
}

.shepherd-button {
  font-weight: bold;
  color: var(--bg-color);
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
