/**
 * PrismJS Theme & Line Numbers for PostgreSQL Query Catalog
 * Clean, modern light theme with high WCAG AA/AAA contrast and aesthetic styling.
 */

code[class*="language-"],
pre[class*="language-"] {
  color: #212529;
  background: none;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  white-space: pre-wrap;
  word-spacing: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  tab-size: 4;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
  background-color: #cfe2ff;
  color: #084298;
}

/* Tokens */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6c757d;
  font-style: italic;
}

.token.punctuation {
  color: #495057;
}

.token.namespace {
  opacity: 0.75;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #d97706;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #198754;
  font-weight: 500;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #b02a37;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #0d6efd;
  font-weight: 600;
}

.token.function,
.token.class-name {
  color: #6f42c1;
  font-weight: 500;
}

.token.regex,
.token.important,
.token.variable {
  color: #d63384;
}

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

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

.token.entity {
  cursor: help;
}

/* Line Numbers Plugin Styling */
pre[class*="language-"].line-numbers {
  position: relative;
  padding-left: 3.6rem !important;
  counter-reset: linenumber;
}

pre[class*="language-"].line-numbers > code {
  position: relative;
  white-space: inherit;
}

.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  font-size: 100%;
  left: -3.6rem;
  width: 2.75rem;
  letter-spacing: -1px;
  border-right: 1px solid #dee2e6;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

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

.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: #adb5bd;
  display: block;
  padding-right: 0.65rem;
  text-align: right;
  font-size: 0.85em;
  font-weight: 500;
}
