/* --- --- UNORDERED LIST --- --- */


li {
  white-space: pre-wrap; 
}

.message-text ul {
  list-style-type: disc;
  padding-left: 1.1rem;
  white-space: nowrap; 
  margin: 0.5rem 0;
}

.message-text ul ul, .message-text ul ul ul {
  list-style-type: circle }

.message-text ul ul, ul ul ul { margin: 0 }

.message-text ul ul li { margin-bottom: 0.1rem }

.message-text ul li:not(:last-child) { margin-bottom: 0.1rem }

/* --- --- TASK LIST --- --- */

.message-text li input { 
  margin-right: 0.21rem;

  margin-left: -1.05rem;
  opacity: 0;
}


li input {  }

.message-text li:has(input) {
  list-style-type: none;
  margin-left: 0rem;
}

.message-text ul ul li:has(input) {
  margin-left: 8.5px;
}

.message-text ul ul ul li:has(input) {
  margin-left: 17.35px;
}

.message-text li:has(input)::before {
  content: "";
  padding: 0 8.5px;
  padding-top: 6.85px;
  font-size: 8px;
  border-radius: 3.25px;
  color: transparent;
}

.message-text li:has(input)::before {
  border: 0.8px solid #202020;
  background: #282828;
}

.message-text li:has(input:checked)::before {
  border: 0.8px solid #DB5446;
  background: var(--rubyn-orange);

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* --- --- HEADING --- --- */

.message-text h1, .message-text h2, .message-text h3, .message-text h4, .message-text h5, .message-text h6 { 
  margin: 0.5rem 0; 
  white-space: pre-wrap; 
  line-height: 1.15; 
}

.message-text h1 { font-size: 2.2rem }
.message-text h2 { font-size: 2.0rem }
.message-text h3 { font-size: 1.8rem }
.message-text h4 { font-size: 1.6rem }
.message-text h5 { font-size: 1.4rem }
.message-text h6 { font-size: 1.2rem }


.message-text {
  white-space: nowrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-text strong { font-weight: bold }
.message-text em { font-style: italic; padding-right: 0.1rem }
.message-text u { text-decoration: underline }
.message-text del { text-decoration: line-through }

.message-text a {
  color: #00aff4;
  text-decoration: none;
}

.message-text a:hover { text-decoration: underline }

.message-text table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
}

.message-text table, .message-text th, .message-text td { border: 1px solid #525252 }

.message-text th, .message-text td {
  padding: 6px 10px;
  text-align: center;
}

.message-text tr, .message-text th {
  white-space: pre-wrap;
}

.message-text th { background-color: #3B3B3B }
.message-text tr:nth-child(even) { background-color: #3B3B3B }

/* --- MESSAGE TEXT FORMATTING --- */

pre {
  border-radius: 0.25rem;
  padding: 0.6rem;
  font-size: 0.8rem;
  margin: 1rem 0;
  background: #303030;
  font-family: 'Fira Mono', monospace;
  white-space: pre-wrap;
}

p { white-space: pre-wrap }
br { white-space: pre-wrap }

.message-text img { 
  border-radius: 5px;
  min-width: 40%;
  margin: 0.35rem 0;
}

pre span {
  font-family: inherit;
}


/* --- --- SPOILER --- --- */

mark {
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  line-height: 1.6;
}

mark {
  background-color: #6B5B13;
  color: inherit;
  border-radius: 1.5px;
}

s {
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  line-height: 1.6;
  text-decoration: none;
  background-color: #282828;
  color: #282828;
  border-radius: 1.5px;
}


s:hover {
  background: rgb(65, 65, 65);
  color: inherit
}




.fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 4px 2px;
}

.fraction-numerator {
  margin-bottom: 2px;
  padding: 0 2px;
  font-size: 0.8em;
}

.fraction-denominator {
  border-top: 1px solid var(--text-color-primary);
  padding: 0 2px;
  font-size: 0.8em;
}

.fraction-numerator {
  line-height: 0.6;
  padding-bottom: 4px;
}

.fraction-denominator {
  line-height: 0.6;
  padding-top: 4px;
}

/* --- --- COLOURS --- --- */

:root {
  --red: #FF7B72;
  --pink: #FF72AF;
  --orange: #FFC272;
  --red-orange: #FFA372;
  --sky-blue: #79C0FF;
  --navy-blue: #79ACFF;
  --purple: #D2A8FF;
  --green: #AAE77E;
  --grey: #768390;
  --default: #E5E5E5;
}

/* --- --- HTML CLASSES --- --- */

.t-blue { color: var(--sky-blue) }
.t-purple { color: var(--purple) }
.t-comment { color: var(--grey); font-style: italic; }

.t-tag { color: var(--red) }
.t-attribute { color: var(--orange) }
.t-number { color: var(--green) }
.t-string { color: var(--green) }

.t-string .t-tag, 
.t-string .t-attribute { color: inherit }

/* *** *** BLOCKQUOTE MARKDOWN *** *** */


.message-text { font-size: 0.97rem }
p { margin: 2.5px 0 }
blockquote { margin: 0.5rem 0 }
blockquote p { margin: 0 }
blockquote br { white-space: pre-wrap } 
blockquote { padding-left: 0.9rem }

blockquote { border-left: 2.95px solid rgb(80, 80, 80) }




code {
  font-family: 'Fira Mono', monospace;
  padding: 0.2rem 0.4em;
  border-radius: 2px;
  font-size: 0.9em;
  background: #303030;
}

.message-text {
  line-height: 1.6
}