blog-post-editor {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  height: auto;
  width: auto;
  top: 60px;
  bottom: 0px;
  left: 0px;
  right: 0px;
  padding: 10px;
}

blog-post-editor[loading] {
  filter: blur(2px);
}

.blog-post-editor__back-to-blog-container {
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.blog-post-editor__back-to-blog {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.blog-post-editor__header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding-bottom: 10px;
}

.blog-post-editor__save-button {
  min-width: 80px;
  font-size: 0.8em;
}

.blog-post-editor__title {
  flex: 1;
}

.blog-post-editor__save-button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 10px;
}

.blog-post-editor__title-input {
  width: 100%;
}

.blog-post-editor__content {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  position: relative;
}

.blog-post-editor__content > * {
  flex: 1;
  border-left: 1px solid #eee;
  position: relative;
}

.blog-post-editor__content > *:first-child {
  border-left: none;
}

.blog-post-editor__markdown-container {
  display: flex;
  flex-direction: column;
}

.blog-post-editor__textarea {
  flex: 1;
  resize: none;
  border: none;
  padding: 5px;
  font-size: inherit;
  font-family: inherit;
}

.blog-post-editor__markdown-preview {
  max-width: 50%;
  contain: strict;
  display: flex;
  flex-direction: column;
}

.markdown-preview-frontmatter-table {
  /*border: 1px solid #aaa;*/
  border-collapse: collapse;
  font-size: 0.8em;
}

.markdown-preview-frontmatter-table td, .markdown-preview-frontmatter-table tr{
  border: 1px solid #aaa;
}

.markdown-preview-frontmatter-table th {
  background-color: #eee;
  font-weight: inherit;
}

.blog-post-editor__content-half-header {
  padding: 5px;
  border-bottom: 1px solid #eee;
}

.blog-post-editor__markdown-preview-content {
  padding: 10px;
  flex: 1;
  overflow: scroll;
}

.blog-post-editor__markdown-preview-content > p > img {
  width: 100%;
  background-color: #eee;
  min-height: 5px;
}

blog-post-editor[loading] input, blog-post-editor[loading] textarea, blog-post-editor[loading] button {
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

blog-post-editor[saving-draft] .blog-post-editor__discard-draft-button {
  background-color: #aaa;
}

.blog-post-editor__tabs {
  display: none;
}

@media screen and (max-width: 900px) {
  .blog-post-editor__tabs {
    display: flex;

  }

  .blog-post-editor__tab {
    flex: 1;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #eee;
    cursor: pointer;
  }

  .blog-post-editor__tab:last-of-type {
    border: none;
  }

  .blog-post-editor__tab-content {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    pointer-events: none;
  }

  .blog-post-editor__content {
    display: block;
  }

  .blog-post-editor__markdown-preview {
    max-width: 100%;
  }

  blog-post-editor[selected-tab=markdown] [tab=markdown] {
    opacity: 1;
    pointer-events: all;
  }

  blog-post-editor[selected-tab=data] [tab=data] {
    opacity: 1;
    pointer-events: all;
  }

  blog-post-editor[selected-tab=preview] [tab=preview] {
    opacity: 1;
    pointer-events: all;
  }
}