@import "../config";

.overview {
  display: flex;
  flex-direction: column;
}

.overview-main {
  flex-grow: 4;
  margin-right: 1rem;
  width: 100%;
}

.overview-side {
  min-width: 30%;
}

.overview-twitter {
}

.post {
  position: relative;
  padding-top: 2rem;
  width: 100%;
}

.post-name {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 1.2rem;
  color: var(--primary-color);
  line-height: 2rem;
  padding: 0 1rem;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;

  &:empty::before {
    display: block;
    content: 'No title';
    opacity: 0.5;
    font-size: 1.2rem;
    line-height: 2rem;
    color: var(--text-primary-color);
  }
}

.post-edit {
  position: absolute;
  top: 0;
  right: 1rem;
  line-height: 2rem;
}

.post-column {
  display: flex;
  flex-direction: column;
}

.post-column-left, .post-column-right {
  flex-grow: 1;
}

.post-image {
  width: 100%;
  margin: 1rem 0 0;
  padding-top: 75%;
  background-position: center;
  background-size: cover;
}

.post-no-image .post-column-left {
  display: none;
}

.post-content {
  padding: 0 1rem;

  h1, h2, h3, h4, h5, h6, p {
    margin: 0.7rem 0;
    padding: 0;
  }

  h1 {
    font-size: 1rem;
  }

  h2 {
    font-size: 1rem;
  }

  h3 {
    font-size: 1rem;
  }

  h4 {
    font-size: 1rem;
  }

  h5 {
    font-size: 1rem;
  }

  h6 {
    font-size: 1rem;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
  }

  td {
    border-top: solid 1px var(--table-border-color);
  }

  th {
    background-color: var(--table-header-color);
  }

  td, th {
    padding: 0.4rem;
  }
}

.post-footer {
  color: var(--text-secondary-color);
  padding: 0 1rem;
  font-size: 0.8rem;
  font-weight: 400;
  margin-top: -0.3rem;
}

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

.post-edit-right {
  margin-left: 0;
}

.post-edit-image-box {
  width: 100%;
  display: flex;
  margin-top: 0.4rem;

  & > div:nth-child(1) {
    width: 20%;
  }

  & > div:nth-child(2) {
    width: 80%;
    padding-left: 1rem;
  }
}

.post-edit-image {
  width: 100%;
  padding-top: 75%;
  border: solid 1px var(--input-border-color);
  margin: 0;
  background-color: var(--background-primary-color);
  background-position: center;
  background-size: cover;
}

.overview-post {
  margin-bottom: 2rem;

  &::after {
    content: '';
    position: absolute;
    display: block;
    bottom: -1rem;
    height: 1px;
    left: 0;
    right: 0;
    background: var(--table-border-color);
  }
}

@media (min-width: 768px) {
  .post-column {
    padding: 0 1rem;
  }

  .overview-post::after {
    left: 1rem;
    right: 1rem;
  }

  .post-content, .post-footer {
    padding: 0;
  }

  .overview-post {
    .post-column {
      flex-direction: row;
    }

    .post-column-left {
      width: 30%;
      margin-right: 1rem;
    }

    .post-column-right {
      width: 70%;
    }
  }
}

@media (min-width: 992px) {
  .post-edit-container {
    flex-direction: row;
  }
  .post-edit-right {
    margin-left: 2rem;
  }
  .overview {
    flex-direction: row;
  }
}