* {
  box-sizing: border-box;
}

html.sidebar-shell,
html.sidebar-shell body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body.sidebar-shell {
  overflow: hidden;
}

.sidebar-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

html.sidebar-view {
  overflow: hidden;
}

html.sidebar-view body {
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: none;
  padding: 0;
  background-color: var(--bg-page);
  overflow-x: hidden;
  overflow-y: auto;
}

html.sidebar-view .app-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
  flex-direction: column;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
}

html.sidebar-view .app-header {
  gap: 8px;
}

html.sidebar-view .brand {
  flex: 1;
  min-width: 0;
}

html.sidebar-view .brand > div:last-child {
  min-width: 0;
}

html.sidebar-view .title-row {
  flex-wrap: wrap;
}

html.sidebar-view .subtitle {
  display: block;
  white-space: normal;
}

html.sidebar-view #btn-show-add {
  flex-shrink: 0;
}

html.sidebar-view #view-list:not(.hidden) {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

html.sidebar-view #template-list {
  max-height: none;
  min-height: 0;
  flex: 1;
}

html.sidebar-view .list-footer {
  margin-top: auto;
}

html.sidebar-view .template-card {
  gap: 8px;
}

html.sidebar-view .template-info {
  flex: 1;
  min-width: 90px;
}

html.sidebar-view .template-actions {
  gap: 3px;
}

html.sidebar-view .editor-toolbar-secondary,
html.sidebar-view .editor-toolbar-tertiary {
  flex-wrap: wrap;
}

html.sidebar-view .rich-editor {
  min-height: 350px;
  max-height: 360px;
}

@media (max-width: 380px) {
  html.sidebar-view .template-card {
    align-items: flex-start;
  }

  html.sidebar-view .template-info {
    flex-basis: 100%;
  }

  html.sidebar-view .template-actions {
    width: 100%;
    justify-content: space-between;
  }
}
