@import '../variables';
@import '../components/buttons';

.ltag_github-liquid-tag {
  margin: 1.1em auto 1.3em;
  position: relative;

  h1 {
    font-size: var(--fs-xl) !important;
    line-height: var(--lh-base) !important;
    margin: 0 0 0.7em !important;

    @media screen and (min-width: 500px) {
      margin-bottom: 10px;
      word-wrap: break-word;
    }

    a {
      color: var(--body-color);
    }

    .issue-title {
      font-weight: var(--fw-normal);
    }

    .issue-number {
      color: var(--base-60);
      font-weight: var(--fw-normal);
      letter-spacing: -1px;
    }

    .github-logo {
      display: inline-block;
      max-width: 1.1em;
      width: 1.15em;
      vertical-align: middle;
      margin: 0;
      margin-right: 0.3em;
      left: 0;
      filter: invert(0);
      filter: var(--theme-social-icon-invert, invert(0));
    }
  }
}

.github-thread {
  font-family: var(--ff-sans-serif);
  background-color: var(--card-bg);
  border: 1px solid var(--form-border);
  box-shadow: var(--shadow-smooth);
  border-radius: var(--radius-auto);
  font-size: 0.77em;
  line-height: 1.15em;
  margin: 0;
  overflow: hidden;

  .timeline-comment-header {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-bottom: 1px solid var(--form-border);
    padding: 0.5em 1.5em;

    @media screen and (min-width: 500px) {
      align-items: center;
    }

    .github-liquid-tag-img {
      margin: 10px 10px 10px 0;
      width: 38px;
      height: 38px;
      padding: 0;
    }
  }

  .timeline-comment-header-text {
    padding: 10px 0;

    a {
      color: var(--base-60);

      &:hover {
        color: var(--base-60);
        text-decoration: underline;
      }
    }
  }
}

.ltag-github-body {
  padding: 1em 1.5em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial,
    sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  max-height: calc(21vw + 165px);
  overflow: hidden;
  @media screen and (min-width: 430px) {
    max-height: calc(20vw + 153px);
  }
  @media screen and (min-width: 800px) {
    max-height: 310px;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 500 !important;
  }
  h1 {
    margin-left: 0;
    font-size: 1.9em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eaecef;
    margin-top: 1em !important;
    margin-bottom: 0.9em !important;
  }

  h3 {
    margin-top: 1em !important;
    margin-bottom: 0.9em !important;
    padding: 0;
    font-size: 1.2em;
    font-weight: 600;
    line-height: 1.25;
  }

  h4 {
    padding: 0;
  }

  *:first-child {
    margin-top: 0 !important;
  }
  *:last-child {
    margin-bottom: 0 !important;
  }

  img {
    left: inherit;
  }

  blockquote {
    color: rgb(106, 115, 125);
    padding: 0px 1em;
    border-left: 0.25em solid rgb(223, 226, 229);
    margin: 16px 0px;
  }

  kbd {
    display: inline-block;
    padding: 3px 5px;
    font-size: 11px;
    line-height: 10px;
    color: #444d56;
    vertical-align: middle;
    background-color: #fafbfc;
    background-color: var(--card-bg);
    border: solid 1px #c6cbd1;
    border-bottom-color: #959da5;
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 #959da5;
  }

  p {
    margin-top: 0px;
    padding: 0px;
    margin-bottom: 15px;
    a.github-user-link {
      color: var(--card-color-secondary);
      font-weight: 600;
      white-space: nowrap;
    }

    a.github-user-link:hover {
      color: #24292e;
      text-decoration: underline;
    }
  }
  code {
    border-radius: 3px;
    padding: 0.2em 5px 0px;
    margin: 0px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,
      monospace;
  }

  pre {
    width: 100% !important;
    margin: 0px;
    color: black;
    background-color: #f6f8fa;
    padding: 0;
    code {
      background-color: #f6f8fa;
      color: black;
      padding: 0em 0px 0px !important;
      line-height: 2em !important;
    }
  }

  .highlight pre,
  pre,
  pre code {
    padding: 16px !important;
    overflow: auto !important;
    font-size: 14px !important;
    margin-bottom: 16px !important;
    background-color: #f7f7f7 !important;
    border-radius: 3px !important;
    box-sizing: border-box !important;
    color: black !important;
    border-radius: 3px !important;
    margin: 0.95em 0 1.2em !important;
  }

  .highlight {
    font-size: 14px !important;
    margin-bottom: 16px !important;
    border-radius: 3px !important;
  }

  b,
  strong {
    font-weight: 600;
  }

  .pl-c {
    color: #969896;
  }

  .pl-c1,
  .pl-s .pl-v {
    color: #0086b3;
  }

  .pl-e,
  .pl-en {
    color: #795da3;
  }

  .pl-s .pl-s1,
  .pl-smi {
    color: #333;
  }

  .pl-ent {
    color: #63a35c;
  }

  .pl-k {
    color: #a71d5d;
  }

  .pl-pds,
  .pl-s,
  .pl-s .pl-pse .pl-s1,
  .pl-sr,
  .pl-sr .pl-cce,
  .pl-sr .pl-sra,
  .pl-sr .pl-sre {
    color: #183691;
  }

  .pl-v {
    color: #ed6a43;
  }

  .pl-id {
    color: #b52a1d;
  }

  .pl-ii {
    background-color: #b52a1d;
    color: #f8f8f8;
  }

  .pl-sr .pl-cce {
    color: #63a35c;
    font-weight: bold;
  }

  .pl-ml {
    color: #693a17;
  }

  .pl-mh,
  .pl-mh .pl-en,
  .pl-ms {
    color: #1d3e81;
    font-weight: bold;
  }

  .pl-mq {
    color: #008080;
  }

  .pl-mi {
    color: #333;
    font-style: italic;
  }

  .pl-mb {
    color: #333;
    font-weight: bold;
  }

  .pl-md {
    background-color: #ffecec;
    color: #bd2c00;
  }

  .pl-mi1 {
    background-color: #eaffea;
    color: #55a532;
  }

  .pl-mdr {
    color: #795da3;
    font-weight: bold;
  }

  .pl-mo {
    color: #1d3e81;
  }
}

.gh-btn-container {
  text-align: center;
  padding: 0.35em 0 1.35em;
  box-shadow: -0 -0 60px 42px var(--card-bg);
  position: relative;
  z-index: var(--z-elevate);

  .gh-btn {
    @extend .crayons-btn;
    @extend .crayons-btn--secondary;
  }
}
