/* Shared styles between light & dark mode so all colors should be variables */

* {
  box-sizing: border-box;
}

input:disabled {
  touch-action: none;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  font: -apple-system-body;
}

body {
  color: var(--textPrimary);
  background-color: var(--background);
}

a {
  color: var(--link);
  text-decoration: none;
  -webkit-tap-highlight-color: var(--link-highlight);
  word-break: break-word;
}

a:not([target]):hover {
  border-radius: 5px;
  background-color: var(--link-hover);
  transition-duration: 0.2s;
  transform: scale(1.015);
}

/*
Web views hold on to their hover event if the app is backgrounded. We need to disable custom hover effects by setting a
class on body and overriding them in CSS when we apply this workaround. When the mouse enters the web view again, we
can disable our override.
*/
body.hover-override a:not([target]) {
  background-color: transparent;
  transform: scale(1);
}

details summary {
  outline: 0;
}

table {
  border-spacing: 0;
  border-collapse: collapse;
}

blockquote {
  margin: 0;
}

table, table *, pre {
  touch-action: pan-x;
}

.markdown-body ul.contains-task-list {
  list-style: none;
  padding-left: 0;
}

.task-list-item {
  padding-left: 40px;
  margin-left: -16px;
}

.task-list-item-checkbox {
  margin-left: -24px
}

pre, code, kbd {
  font-size: 1em;
  font-family: var(--code-font);
}

.issue-keyword {
  border-bottom: 1px dotted var(--keyword-color);
}

.team-mention, .user-mention {
  font-weight: 600;
  color: var(--mention-color);
  white-space: nowrap;
}

.email-hidden-toggle, .email-hidden-reply {
  display: none;
}

/* Fix checkboxes looking cut off when they render larger than the default size */
input[type="checkbox"] {
  transform: translate(0px);
}

/* --- */

.markdown-body {
  font-size: inherit;
  line-height: 1.5;
  word-wrap: break-word;
}

.markdown-body kbd {
  display: inline-block;
  padding: 0.18em 0.31em;
  font-size: 0.7em;
  line-height: 1.2em;
  color: var(--kbd-color);
  vertical-align: middle;
  background-color: var(--kbd-background);
  border: 1px solid var(--kbd-border);
  border-radius: 0.25em;
  box-shadow: inset 0 -1px 0 var(--kbd-border);
  margin-right: 2px;
}

.markdown-body:after, .markdown-body:before {
  display: table;
  content: ""
}

.markdown-body:after {
  clear: both;
}

.markdown-body > :first-child {
  margin-top: 0 !important;
}

.markdown-body > :last-child {
  margin-bottom: 0 !important;
}

.markdown-body a:not([href]) {
  color: inherit;
  text-decoration: none;
}

.markdown-body .absent {
  color: var(--red-600);
}

.markdown-body .anchor {
  float: left;
  padding-right: 4px;
  margin-left: -20px;
  line-height: 1;
}

.markdown-body .anchor:focus {
  outline: none;
}

.markdown-body blockquote, .markdown-body details, .markdown-body dl, .markdown-body ol, .markdown-body p, .markdown-body pre, .markdown-body table, .markdown-body ul {
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-body hr {
  height: .25em;
  padding: 0;
  margin: 24px 0;
  background-color: var(--hr-background);
  border: 0;
}

.markdown-body blockquote {
  padding-left: 1em;
  color: var(--blockquote-color);
  position: relative;
}

.markdown-body blockquote::before {
  content: '';
  width: 2px;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background-color: var(--blockquote-border);
  border-radius: 2px;
}

.markdown-body blockquote > :first-child {
  margin-top: 0;
}

.markdown-body blockquote > :last-child {
  margin-bottom: 0;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.markdown-body h1 .octicon-link, .markdown-body h2 .octicon-link, .markdown-body h3 .octicon-link, .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link {
  color: var(--heading-color);
  vertical-align: middle;
  visibility: hidden;
}

.markdown-body h1:hover .anchor, .markdown-body h2:hover .anchor, .markdown-body h3:hover .anchor, .markdown-body h4:hover .anchor, .markdown-body h5:hover .anchor, .markdown-body h6:hover .anchor {
  text-decoration: none;
}

.markdown-body h1:hover .anchor .octicon-link, .markdown-body h2:hover .anchor .octicon-link, .markdown-body h3:hover .anchor .octicon-link, .markdown-body h4:hover .anchor .octicon-link, .markdown-body h5:hover .anchor .octicon-link, .markdown-body h6:hover .anchor .octicon-link {
  visibility: visible;
}

.markdown-body h1 code, .markdown-body h1 tt, .markdown-body h2 code, .markdown-body h2 tt, .markdown-body h3 code, .markdown-body h3 tt, .markdown-body h4 code, .markdown-body h4 tt, .markdown-body h5 code, .markdown-body h5 tt, .markdown-body h6 code, .markdown-body h6 tt {
  font-size: inherit;
}

.markdown-body h1 {
  font-size: 2em;
}

.markdown-body h1, .markdown-body h2 {
  padding-bottom: .3em;
  border-bottom: 1px solid var(--border);
}

.markdown-body h2 {
  font-size: 1.5em;
}

.markdown-body h3 {
  font-size: 1.25em;
}

.markdown-body h4 {
  font-size: 1em;
}

.markdown-body h5 {
  font-size: .875em;
}

.markdown-body h6 {
  font-size: .85em;
  color: var(--h6-color);
}

.markdown-body ul {
  padding-left: 1.5em;
}

.markdown-body ol.no-list, .markdown-body ul.no-list {
  padding: 0;
  list-style-type: none;
}

.markdown-body ol ol, .markdown-body ol ul, .markdown-body ul ol, .markdown-body ul ul {
  margin-top: 0;
  margin-bottom: 0;
}

.markdown-body li {
  word-wrap: break-all;
}

.markdown-body li > p {
  margin-top: 16px;
}

.markdown-body li + li {
  margin-top: .25em;
}

.markdown-body dl {
  padding: 0;
}

.markdown-body dl dt {
  padding: 0;
  margin-top: 16px;
  font-size: 1em;
  font-style: italic;
  font-weight: 600;
}

.markdown-body dl dd {
  padding: 0 16px;
  margin-bottom: 16px;
}

.markdown-body table {
  display: block;
  width: 100%;
  overflow: auto;
}

.markdown-body table th {
  font-weight: 600;
}

.markdown-body table td, .markdown-body table th {
  padding: 6px 13px;
  border: 1px solid var(--thead-border);
}

.markdown-body table tr {
  background-color: var(--background);
  border-top: 1px solid var(--tr-border);
}

.markdown-body table tr:nth-child(2n) {
  background-color: var(--tr-alt-background);
}

.markdown-body table img {
  background-color: initial;
}

.markdown-body img {
  max-width: 100%;
  box-sizing: initial;
  background-color: var(--background);
}

.markdown-body img[align=right] {
  padding-left: 20px;
}

.markdown-body img[align=left] {
  padding-right: 20px;
}

.markdown-body video {
  max-width: 100%;
  box-sizing: initial;
  background-color: var(--videoBackground);
}

.markdown-body .emoji {
  max-width: none;
  vertical-align: text-top;
  background-color: initial;
}

.markdown-body span.frame {
  display: block;
  overflow: hidden;
}

.markdown-body span.frame > span {
  display: block;
  float: left;
  width: auto;
  padding: 7px;
  margin: 13px 0 0;
  overflow: hidden;
  border: 1px solid var(--frame-border);
}

.markdown-body span.frame span img {
  display: block;
  float: left;
}

.markdown-body span.frame span span {
  display: block;
  padding: 5px 0 0;
  clear: both;
  color: var(--frame-color);
}

.markdown-body span.align-center {
  display: block;
  overflow: hidden;
  clear: both;
}

.markdown-body span.align-center > span {
  display: block;
  margin: 13px auto 0;
  overflow: hidden;
  text-align: center;
}

.markdown-body span.align-center span img {
  margin: 0 auto;
  text-align: center;
}

.markdown-body span.align-right {
  display: block;
  overflow: hidden;
  clear: both;
}

.markdown-body span.align-right > span {
  display: block;
  margin: 13px 0 0;
  overflow: hidden;
  text-align: right;
}

.markdown-body span.align-right span img {
  margin: 0;
  text-align: right;
}

.markdown-body span.float-left {
  display: block;
  float: left;
  margin-right: 13px;
  overflow: hidden;
}

.markdown-body span.float-left span {
  margin: 13px 0 0;
}

.markdown-body span.float-right {
  display: block;
  float: right;
  margin-left: 13px;
  overflow: hidden;
}

.markdown-body span.float-right > span {
  display: block;
  margin: 13px auto 0;
  overflow: hidden;
  text-align: right;
}

.markdown-body code, .markdown-body tt {
  padding: .2em .4em;
  margin: 0;
  font-size: 85%;
  background-color: var(--code-background);
  border-radius: 6px;
}

.markdown-body code br, .markdown-body tt br {
  display: none;
}

.markdown-body del code {
  text-decoration: inherit;
}

.markdown-body pre {
  word-wrap: normal;
}

.markdown-body pre > code {
  padding: 0;
  margin: 0;
  font-size: 100%;
  word-break: normal;
  white-space: pre;
  background: transparent;
  border: 0;
}

.markdown-body .highlight {
  margin-bottom: 16px;
}

.markdown-body .highlight pre {
  margin-bottom: 0;
  word-break: normal;
}

.markdown-body .highlight pre, .markdown-body pre {
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  background-color: var(--pre-background);
  border-radius: 6px;
}

.markdown-body pre code, .markdown-body pre tt {
  display: inline;
  max-width: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  word-wrap: normal;
  background-color: initial;
  border: 0;
}

.markdown-body .csv-data td, .markdown-body .csv-data th {
  padding: 5px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.markdown-body .csv-data .blob-num {
  padding: 10px 8px 9px;
  text-align: right;
  background: var(--background);
  border: 0;
}

.markdown-body .csv-data tr {
  border-top: 0;
}

.markdown-body .csv-data th {
  font-weight: 600;
  background: var(--thead-background);
  border-top: 0;
}

.open.octicon, .draft.octicon, .closed.octicon, .merged.octicon, .color-text-secondary.octicon {
  display: inline-block;
  margin-top: 0.15em;
  vertical-align: text-top;
  fill: currentColor;
  width: 1em;
  height: 1em;
  font: -apple-system-body;
}

.open.octicon {
  color: var(--color-icon-success);
}

.draft.octicon {
  color: var(--textTertiary);
}

.closed.octicon {
  color: var(--color-text-danger);
}

.merged.octicon {
  color: var(--purple-500);
}

.color-text-secondary.octicon {
  color: var(--textSecondary);
}

.reference {
  white-space: nowrap;
}

.issue-link {
  font-weight: 600;
  color: var(--mention-color);
  white-space: normal;
}

.issue-shorthand {
  font-weight: 400;
  color: var(--textTertiary);
}

.mr-1 {
  margin-right: 4px;
}

.ml-1 {
  margin-left: 4px;
}

.d-inline-block {
  display: inline-block;
}

.v-align-middle {
  vertical-align: middle;
}

.Box {
  border-radius: 6px;
}
