.sdoc-file-history .sdoc-content-wrapper {
  flex: 1;
  /* Header is 50px */
  height: calc(100vh - 50px);
}

.sdoc-file-history .sdoc-file-history-container {
  flex: 1;
}

.sdoc-file-history .sdoc-file-history-header {
  height: 50px;
  border-bottom: 1px solid #e5e5e5;
  background-color: #fff;
  flex-shrink: 0;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-history-header-left {
  font-size: 1.25rem;
  flex: 1;
}

.sdoc-file-history .sdoc-file-history-header .file-name {
  flex: 1;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-history-header-right {
  height: 100%;
  min-width: 100px;
  align-items: center;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-container {
  height: 32px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-divider {
  border-right: 1px solid #e5e5e5;
  height: 100%;
  width: 1px;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-switch {
  display: flex;
  align-items: center;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-last,
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-next,
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-switch {
  padding: 0 8px;
  height: 100%;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-switch {
  padding: 0;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-last .fas,
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-next .fas {
  color: #000;
  opacity: .5;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-last:hover,
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-next:hover {
  cursor: pointer;
  opacity: .75;
  background-color: #F5F5F5;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-last:hover .fas,
.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-next:hover .fas {
  opacity: .75;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-switch .sf3-font-history:hover {
  cursor: pointer;
  color: #000;
}

.sdoc-file-history .sdoc-file-history-header .sdoc-file-changes-switch .sf3-font-history {
  font-size: 18px;
  color: #666;
}

.sdoc-file-history .sdoc-file-history-header .go-back .sf3-font-down {
  font-size: 1.25rem !important;
}

.sdoc-file-history .sdoc-file-history-content {
  height: 100%;
  width: 100%;
}

.sdoc-file-history .sdoc-file-history-content .sdoc-file-history-viewer {
  width: 100%;
  height: calc(100vh - 50px);
}

.sdoc-file-history .sdoc-file-history-container .sdoc-file-history-content .sdoc-editor-content {
  position: absolute;
  padding: 20px 40px;
}

.sdoc-file-history.mobile .sdoc-file-history-container .sdoc-file-history-content .sdoc-editor-content {
  padding: 0;
  min-width: auto;
}

.sdoc-file-history .sdoc-file-history-content .sdoc-scroll-container {
  position: relative !important;
  width: 100%;
}

.sdoc-file-history .sdoc-file-history-content .sdoc-editor-container {
  flex-direction: row;
}

.sdoc-editor-container.mobile .sdoc-editor-content.readonly .sdoc-article-container {
  width: 100%;
}

.sdoc-file-history .sdoc-file-history-content .sdoc-article-container {
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
  margin-left: 0 !important;
}

.sdoc-file-history .sdoc-file-history-content .article {
  width: 100%;
}

/* panel */
.sdoc-file-history .sdoc-file-history-panel {
  width: 260px;
  border-left: 1px solid #e5e5e5;
  height: calc(100vh - 50px);
}

.sdoc-file-history .sdoc-file-history-panel .sdoc-file-history-select-range {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  height: 50px;
  border-bottom: 1px solid #e5e5e5;
  background-color: #fff;
}

.sdoc-file-history .sdoc-file-history-panel .sdoc-file-history-select-range-title {
  height: 100%;
  width: 100%;
  font-size: 1rem;
  font-weight: bolder;
  line-height: 29px;
}

.sdoc-file-history .sdoc-file-history-panel .sdoc-file-history-select-range .sdoc-side-panel-close {
  opacity: 0.7;
  cursor: pointer;
}

.sdoc-file-history .sdoc-file-history-panel .sdoc-file-history-diff-switch {
  padding: 0 18px;
  height: 50px;
  border-top: 1px solid #e5e5e5;
}

.sdoc-file-history .sdoc-file-history-diff-switch .custom-switch {
  width: 100%;
  padding-left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.sdoc-file-history .sdoc-file-history-diff-switch .custom-switch-description {
  margin-left: 0;
  flex: 1;
  padding-right: 8px;
}

/* history versions */
.sdoc-file-history-versions {
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.sdoc-file-history-versions .history-list-item {
  padding: 5px 10px;
  display: flex;
  flex: 1;
  border-bottom: 1px solid #e5e5e5;
}

.sdoc-file-history-versions .history-list-item.history-month-title {
  padding: 5px 16px;
}

.sdoc-file-history-versions .history-list-item:last-child {
  border-bottom: none;
}

.sdoc-file-history-versions .history-list-item:not(.item-active):hover {
  background-color: #F5F5F5;
  cursor: pointer;
}

.sdoc-file-history-versions .history-list-item .history-operation {
  flex-shrink: 0;
}

.sdoc-file-history-versions .history-list-item .history-info {
  overflow: hidden;
}

.sdoc-file-history-versions .history-list-item .history-info .name {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sdoc-file-history-versions .history-list-item.item-active .history-info .name {
  color: #ff9800;
}

/* mobile options modal */
.sdoc-mobile-history-options-modal {
  margin: 0;
  transition: none;
  transform: translateY(calc(100vh - 100%)) !important;
}

.sdoc-mobile-history-options-modal .sdoc-operation-mobile-modal-body .option-item {
  padding: 10px 5px;
}

.sdoc-mobile-history-options-modal .sdoc-operation-mobile-modal-body .option-item a,
.sdoc-mobile-history-options-modal .sdoc-operation-mobile-modal-body .option-item a:hover {
  color: #212529;
}

.sdoc-file-history-versions .history-list-item .history-operation:hover {
  cursor: pointer;
}

.sdoc-file-history-versions .history-list-item .history-operation a.fas {
  color: #666;
}

.sdoc-file-history-versions .history-list-item .history-operation:hover a.fas {
  color: #212529;
}

.sdoc-file-history-versions .history-list-item.item-active {
  background-color: #FFECD9 !important;
}

.sdoc-file-history-versions .history-list-item.item-active .history-info .time {
  color: #ff9800;
}

.history-info .owner {
  min-height: 22.5px;
}

.history-content .main-panel {
  flex: 1 1 auto;
}

.history-content .history-side-panel {
  flex: 0 0 auto;
  user-select: none;
  border-left: 1px solid #e5e5e5;
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

.history-content .history-side-panel .history-side-panel-title {
  height: 50px;
  border-bottom: 1px solid #e5e5e5;
  line-height: 50px;
  font-size: 1rem;
  padding: 0 10px;
  background-color: rgb(250, 250, 249);
  font-weight: bolder;
}

.sdoc-file-history-versions .history-info .rename-container,
.sdoc-file-history-versions .history-info .rename-container input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  overflow: hidden;
}

.sdoc-file-history-versions .history-info .rename-container input:focus {
  box-shadow: none;
}

.sdoc-file-history-versions .daily-history-detail-toggle-container {
  width: 20px;
  height: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.sdoc-file-history-versions .daily-history-detail-toggle-container .daily-history-detail-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sdoc-file-history-versions .daily-history-detail-no-more {
  width: 20px;
  height: 20px;
  margin-right: 14px;
}

.sdoc-file-history-versions .daily-history-detail-toggle .direction-icon {
  font-size: 18px;
  color: #666;
  transform: rotate(-90deg);
  transition: all .1s;
}

.sdoc-file-history-versions .daily-history-detail-toggle.daily-history-detail-show .direction-icon {
  transform: unset;
}

.sdoc-file-history-versions .daily-history-detail-toggle .direction-icon:hover {
  color: #212529;
  cursor: pointer;
}

@media (min-width:992px) {

  .history-side-panel {
    width: 260px;
  }

}

@media (max-width:768px) {

  .sdoc-file-history .sdoc-file-history-content {
    padding: 0;
  }

  .markdown-viewer-render-content {
    margin: 20px;
  }

  .markdown-viewer-render-content .diff-view {
    padding: 20px;
  }

}
