// BSRichText 의 iframe 안에 들어가는 content style

.rich-text-content {
  font-size: 14px;

  * {
    line-height: 1.4em;
  }

  p {
    margin: 0 0 4px 0;
    padding: 0;
  }

  p:empty:before {
    content: ' ';
    white-space: pre;
  }

  pre {
    background-color: #eee;
    padding: 8px;
    margin: 8px 0;
    border-radius: 4px;
    font-family: "Lucida Console", sans-serif;
  }

  h1 {
    font-size: 1.8rem;
    margin: 1rem 0 0.4rem;
  }

  h2 {
    font-size: 1.6rem;
    margin: 0.6rem 0 0.2rem;
  }

  h3 {
    font-size: 1.4rem;
    margin: 0.4rem 0 0.2rem;
  }

  h4 {
    font-size: 1.2rem;
    margin: 0.4rem 0 0.2rem;
  }

  ul {
    padding-left: 1em;

    li {
      list-style: inside disc;

      > ul > li {
        list-style: inside circle;

        > ul > li {
          list-style: inside square;
        }
      }

      > p {
        display: inline;
      }
    }
  }

  ol {
    padding-left: 1em;

    li {
      list-style: inside decimal;

      > ol > li {
        list-style: inside lower-alpha;

        > ol > li {
          list-style: inside lower-roman;
        }
      }

      > p {
        display: inline;
      }
    }
  }

  > div > ul, > div > ol {
    margin: 8px 0;
  }

  em {
    font-style: italic;
  }

  .table-wrapper {
    margin: 0.5rem 0;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
  }

  table {
    border-collapse: collapse;
    text-align: left;

    > tr, > tbody > tr {
      > th, > td {
        border: 1px solid #ccc;
        box-sizing: border-box;
        padding: 6px 8px;
        vertical-align: top;

        > p {
          margin-bottom: 0;
        }
      }
    }
  }

  img {
    display: inline-block;
    height: auto;
    margin: 0.5rem 0;
    max-width: 100%;
  }

  span[data-youtube-video] {
    padding-right: 0.5rem;
    display: inline-block;

    iframe {
      border: 0.5rem solid var(--black-contrast);
      outline: 0 solid transparent;
    }
  }
}