// Place all the styles related to the Docs controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

/* 一覧ページ用: /docs */
.docs {
  font-family: serif;
  line-height: 2.2em;
  a:hover {
    text-decoration: none;
  }
  ul {
    li {
      list-style-type: none;
      font-size: 20px;
      padding-left: 1.5em;
      text-indent: -1.5em;
      @media only screen and (max-width: 768px) {
        padding-bottom: 10px;
        margin-left: -35px;
      }
    }
  }
}

/* 各ページ用: /doc/* */
.doc {
  counter-reset: doc-chapter;
  position: relative;
  font-family: serif;
  line-height: 2.0em;

  h1 {
    text-align: center;
    margin-top: 1.2em;
    margin-bottom: 40px;
    line-height: 2.0em;
  }

  h1:first-child {
    margin-top: 0;
  }

  h2, h3 {
    margin-top: 2.6em;
    margin-bottom: 20px;
    line-height: 2.0em;
  }

  .gc_wrapper { margin-top: 50px; }
  
  p {
    counter-increment: doc-paragraph;
    text-indent: 0em;
    padding-left: 1em;
    line-height: 2.0em;
  }

  p::before {
    font-weight: bold;
    margin-left: -2em;
    margin-right: 1em;
  }

  h1 + p,
  h2 + p,
  hr + p,
  p:first-of-type {
    text-indent: 0em;
    padding-left: 1em;
  }

  p::before,
  h1 + p::before,
  h2 + p::before,
  hr + p::before,
  p:first-of-type::before {
    content: none;
  }

  ul {
    list-style: none;
    padding: 0 0 0 2.5em;
  }

  ol {
    list-style: none;
    counter-reset: doc-ordered-list;
    padding: 0 0 0 2.5em;
  }

  ol > li {
    counter-increment: doc-ordered-list;
    text-indent: -2.5em;
  }

  ol > li::before {
    content: "\FF08" counter(doc-ordered-list) "\FF09";
  }

  hr {
    border: none;
    border-top: 1px solid black;
    margin: 2em 0;
  }

  h4 {
    position: absolute;
    margin: 0;
    right: 30em;
    font-size: 100%;
  }

  h4 + ul {
    margin: 0 0 2em auto;
    width: 28em;
    list-style: none;
  }

  h4 + ul > li:last-child::after {
    content: "\329E";
    position: absolute;
    right: 1em;
  }

  blockquote {
    border: 1px solid black;
    padding: .5em 1.5em;
    margin: 1em 0 1.5em;

    small {
      line-height: 2.0em;
    }
  }

  ol > li > ul {
    list-style: none;
  }

  small::before {
    content: none;
  }
}

// Sample Usecase: https://coderdojo.jp/docs/fundraising-methods
// This style is defined by Bootstrap's _type.scss.
.doc small::before {
  content: none;
}
