/**
 * Custom APTL syntax highlighting theme for Prism.js
 * Based on a clean, readable style optimized for AI prompt templates
 */

/* Base code block styling */
code[class*='language-'],
pre[class*='language-'] {
  color: #24292e;
  background: none;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, 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: 0.5em 0;
  overflow: auto;
  background: #f6f8fa;
  border-radius: 6px;
  border: 1px solid #d0d7de;
}

/* Inline code */
:not(pre) > code[class*='language-'] {
  padding: 0.2em 0.4em;
  background: #f6f8fa;
  border-radius: 3px;
  border: 1px solid #d0d7de;
  white-space: normal;
}

/* APTL-specific token styles */
.token.comment {
  color: #6a737d;
  font-style: italic;
}

.token.directive {
  color: #d73a49;
  font-weight: bold;
}

.token.directive-end,
.token.keyword {
  color: #d73a49;
  font-weight: bold;
}

.token.directive-keyword {
  color: #005cc5;
  font-weight: normal;
}

.token.variable {
  color: #032f62;
}

.token.variable .token.punctuation {
  color: #24292e;
}

.token.variable .token.operator {
  color: #d73a49;
}

.token.variable .token.property {
  color: #005cc5;
}

.token.variable .token.string {
  color: #22863a;
}

.token.string {
  color: #22863a;
}

.token.attr-name {
  color: #6f42c1;
}

.token.boolean {
  color: #005cc5;
}

.token.number {
  color: #005cc5;
}

.token.operator {
  color: #d73a49;
}

.token.punctuation {
  color: #24292e;
}

.token.escape {
  color: #e36209;
  font-weight: bold;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  code[class*='language-'],
  pre[class*='language-'] {
    color: #c9d1d9;
  }

  pre[class*='language-'] {
    background: #0d1117;
    border-color: #30363d;
  }

  :not(pre) > code[class*='language-'] {
    background: #0d1117;
    border-color: #30363d;
  }

  .token.comment {
    color: #8b949e;
  }

  .token.directive,
  .token.directive-end,
  .token.keyword {
    color: #ff7b72;
  }

  .token.directive-keyword {
    color: #79c0ff;
  }

  .token.variable {
    color: #a5d6ff;
  }

  .token.variable .token.punctuation {
    color: #c9d1d9;
  }

  .token.variable .token.operator {
    color: #ff7b72;
  }

  .token.variable .token.property {
    color: #79c0ff;
  }

  .token.variable .token.string {
    color: #7ee787;
  }

  .token.string {
    color: #7ee787;
  }

  .token.attr-name {
    color: #d2a8ff;
  }

  .token.boolean,
  .token.number {
    color: #79c0ff;
  }

  .token.operator {
    color: #ff7b72;
  }

  .token.punctuation {
    color: #c9d1d9;
  }

  .token.escape {
    color: #ffa657;
  }
}
