/* =========================================
   CodeMirror "pastebin" theme for PasteWizard
   ========================================= */

/* Container around the editor on paste.php */
.pw-cm-container {
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* Base editor look */
.cm-s-pastebin.CodeMirror {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #ffffff;
    color: #111827;
    height: auto !important;
    /* let scroll area control height */
}

/* Scroll viewport: Pastebin-like vertical space */
.cm-s-pastebin .CodeMirror-scroll {
    max-height: 650px !important;
    /* limit height similar to Pastebin */
    min-height: 360px !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
}

/* Gutters / line numbers */
.cm-s-pastebin .CodeMirror-gutters {
    background: #f3f4f6;
    border-right: 1px solid #e5e7eb;
    color: #9ca3af;
}

.cm-s-pastebin .CodeMirror-linenumber {
    padding: 0 8px;
}

/* Cursor (read-only, but keep for focus state) */
.cm-s-pastebin .CodeMirror-cursor {
    border-left: 1px solid #111827;
}

/* Selection */
.cm-s-pastebin .CodeMirror-selected,
.cm-s-pastebin .CodeMirror-line::selection,
.cm-s-pastebin .CodeMirror-line>span::selection,
.cm-s-pastebin .CodeMirror-line>span>span::selection {
    background: #e0e7ff;
}

.cm-s-pastebin .CodeMirror-line::-moz-selection,
.cm-s-pastebin .CodeMirror-line>span::-moz-selection,
.cm-s-pastebin .CodeMirror-line>span>span::-moz-selection {
    background: #e0e7ff;
}

/* Basic token colors – light, modern, Pastebin-ish */
.cm-s-pastebin span.cm-comment {
    color: #6b7280;
    font-style: italic;
}

.cm-s-pastebin span.cm-keyword {
    color: #7c3aed;
    font-weight: 600;
}

.cm-s-pastebin span.cm-operator {
    color: #4b5563;
}

.cm-s-pastebin span.cm-number {
    color: #b91c1c;
}

.cm-s-pastebin span.cm-def {
    color: #1d4ed8;
}

.cm-s-pastebin span.cm-variable,
.cm-s-pastebin span.cm-variable-2 {
    color: #111827;
}

.cm-s-pastebin span.cm-variable-3 {
    color: #0369a1;
}

.cm-s-pastebin span.cm-string {
    color: #047857;
}

.cm-s-pastebin span.cm-string-2 {
    color: #16a34a;
}

.cm-s-pastebin span.cm-atom {
    color: #db2777;
}

.cm-s-pastebin span.cm-builtin {
    color: #2563eb;
}

.cm-s-pastebin span.cm-tag {
    color: #be123c;
}

.cm-s-pastebin span.cm-attribute {
    color: #16a34a;
}

.cm-s-pastebin span.cm-property {
    color: #0ea5e9;
}

.cm-s-pastebin span.cm-qualifier {
    color: #7c3aed;
}

.cm-s-pastebin span.cm-meta {
    color: #6b21a8;
}

.cm-s-pastebin span.cm-error {
    color: #b91c1c;
    background: #fee2e2;
}

/* Matching brackets / active line (subtle) */
.cm-s-pastebin .CodeMirror-activeline-background {
    background: #f3f4ff;
}

.cm-s-pastebin .CodeMirror-matchingbracket {
    outline: 1px solid #4f46e5;
    color: inherit !important;
}

/* Scrollbar (WebKit) */
.cm-s-pastebin .CodeMirror-scroll::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.cm-s-pastebin .CodeMirror-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

.cm-s-pastebin .CodeMirror-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
}