/**
 * Prism.js Default Theme v1.29.0
 * https://prismjs.com
 */

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

pre[class*="language-"] {
    padding: 1em;
    margin: 0;
    overflow: auto;
    border-radius: 8px;
    background: #0d0d17;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

:where(pre[class*="language-"]) {
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.4);
}

code[class*="language-"] {
    padding: 0.2em 0.4em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

/* Inline code in paragraphs */
:not(pre) > code[class*="language-"] {
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-size: 0.9em;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ===== Token Colors ===== */

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6b7280;
    font-style: italic;
}

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

.token.namespace {
    opacity: 0.7;
}

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

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #9ecbff;
}

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

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #c4b5fd;
}

.token.function,
.token.class-name {
    color: #fbbf24;
}

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

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

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

.token.entity {
    cursor: help;
}

/* ===== Prompt Block Specific ===== */

.prompt-block pre[class*="language-"] {
    background: #0a0a14;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 0 12px 12px;
    padding: 1.25em 1.5em;
    font-size: 13.5px;
    line-height: 1.7;
    max-height: 500px;
    overflow-y: auto;
}

.prompt-block pre[class*="language-"]::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.prompt-block pre[class*="language-"]::-webkit-scrollbar-track {
    background: transparent;
}

.prompt-block pre[class*="language-"]::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.prompt-block pre[class*="language-"]::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* ===== Line Numbers Plugin (optional) ===== */

pre[class*="language-"].line-numbers {
    position: relative;
    padding-left: 3.5em;
    counter-reset: linenumber;
}

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

.line-numbers .line-numbers-rows {
    position: absolute;
    top: 0;
    left: -3.5em;
    width: 3em;
    padding: 1em 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    text-align: right;
    user-select: none;
}

.line-numbers .line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
    font-size: 0.85em;
    color: #6b7280;
}

.line-numbers .line-numbers-rows > span::before {
    content: counter(linenumber);
}

/* ===== Dark theme overrides for prompt blocks ===== */

.prompt-block code[class*="language-"],
.prompt-block pre[class*="language-"] {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== Copy Button Hover State ===== */

.prompt-block .pb-copy:hover + pre[class*="language-"] {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    transition: box-shadow 0.3s ease;
}

/* ===== Selection ===== */

::selection {
    background: rgba(99, 102, 241, 0.25);
    color: #e2e8f0;
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.25);
    color: #e2e8f0;
}

/* ===== Bash Token Tweaks ===== */

.language-bash .token.function,
.language-shell .token.function {
    color: #6ee7b7;
}

/* ===== JSON Token Tweaks ===== */

.language-json .token.property {
    color: #93c5fd;
}

.language-json .token.string {
    color: #fca5a5;
}

.language-json .token.number {
    color: #fcd34d;
}

/* ===== Python Token Tweaks ===== */

.language-python .token.decorator,
.language-python .token.decorator .token punctuation {
    color: #c4b5fd;
}

.language-python .token.string {
    color: #86efac;
}

.language-python .token.comment {
    color: #6b7280;
}

.language-python .token.keyword {
    color: #f472b6;
}

.language-python .token.function {
    color: #60a5fa;
}

/* ===== Markup/HTML Token Tweaks ===== */

.language-markup .token.tag .token.punctuation {
    color: #6b7280;
}

.language-markup .token.tag .token.attr-name {
    color: #c4b5fd;
}

.language-markup .token.tag .token.attr-value {
    color: #6ee7b7;
}

.language-markup .token.comment {
    color: #4b5563;
}
