/**
 * Chili Spice theme for JavaScript, CSS and HTML
 * Loosely based on tomorrow night theme
 */

code[class*="language-"],
pre[class*="language-"] {
  color: #ccc;
  background: none;
  font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.5;
  tab-size: 4;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  padding: 1em;
  margin: .5em 0;
  overflow: auto;
  border-radius: 0.3em;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
  background: #2d2d2d;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
}

.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #999;
}

.token.punctuation {
  color: #ccc;
}

.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
  color: #FFA896;
}

.token.function-name {
  color: #6196cc;
}

.token.boolean,
.token.number,
.token.function {
  color: #f08d49;
}

.token.property,
.token.class-name,
.token.constant,
.token.symbol {
  color: #f8c555;
}

.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
  color: #CD1C18;
}

.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
  color: #7ec699;
}

.token.operator,
.token.entity,
.token.url {
  color: #67cdcc;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

.token.inserted {
  color: green;
}

/* Dark theme overrides */
body.dark-theme code[class*="language-"],
body.dark-theme pre[class*="language-"] {
  color: #f8f8f8;
}

body.dark-theme :not(pre) > code[class*="language-"],
body.dark-theme pre[class*="language-"] {
  background: #222;
}

body.dark-theme .token.comment,
body.dark-theme .token.block-comment,
body.dark-theme .token.prolog,
body.dark-theme .token.doctype,
body.dark-theme .token.cdata {
  color: #758575;
}

body.dark-theme .token.tag,
body.dark-theme .token.attr-name,
body.dark-theme .token.namespace,
body.dark-theme .token.deleted {
  color: #FFA896;
}

/* Line Numbers */
pre.line-numbers {
  position: relative;
  padding-left: 3.8em;
  counter-reset: linenumber;
}

pre.line-numbers > code {
  position: relative;
}

.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  font-size: 100%;
  left: -3.8em;
  width: 3em; /* works for line-numbers below 1000 lines */
  letter-spacing: -1px;
  border-right: 1px solid #999;
  user-select: none;
}

.line-numbers-rows > span {
  display: block;
  counter-increment: linenumber;
}

.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: #999;
  display: block;
  padding-right: 0.8em;
  text-align: right;
}

/* Copy button */
pre {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  background-color: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 0.3em;
  color: #ccc;
  padding: 0.3em 0.5em;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background-color: rgba(0, 0, 0, 0.2);
  color: white;
}

.copy-btn.copied {
  background-color: #CD1C18;
  color: white;
}

/* Command line */
.command-line-prompt {
  border-right: 1px solid #999;
  display: block;
  float: left;
  font-size: 100%;
  letter-spacing: -1px;
  margin-right: 1em;
  pointer-events: none;
  user-select: none;
}

.command-line-prompt > span:before {
  color: #999;
  content: ' ';
  display: block;
  padding-right: 0.8em;
}

.command-line-prompt > span[data-user]:before {
  content: "[" attr(data-user) "@" attr(data-host) "] $";
}

.command-line-prompt > span[data-user="root"]:before {
  content: "[" attr(data-user) "@" attr(data-host) "] #";
}

.command-line-prompt > span[data-prompt]:before {
  content: attr(data-prompt);
}