/* 
 * QueryLab V6 — Dark Pro-Developer Aesthetic
 * Inter & JetBrains Mono — Strict Minimalism
 */

/* Global text smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.text-balance {
    text-wrap: balance;
}

/* ── Invisible Scrollbars ───────────────── */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ── Subdued Selection ──────────────────── */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #e5e7eb;
}

/* subtle indigo selection */

/* ── Typography Classes ─────────────────── */
.font-mono {
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: "liga" 1, "calt" 1;
}

.font-sans {
    font-family: 'Inter', sans-serif;
}

/* ── Hover Transitions ──────────────────── */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: #374151;
    /* gray-700 */
}

/* ── Fade-in Animation ──────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* ── CodeMirror V6 Dark Theme ───────────── */
.cm-s-v6.CodeMirror {
    background: #000000 !important;
    color: #eeeeee !important;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    line-height: 1.8;
    height: 100% !important;
    padding: 32px 16px;
}

.cm-s-v6 .CodeMirror-gutters {
    background: #000000 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-right: 12px;
}

.cm-s-v6 .CodeMirror-linenumber {
    color: #4b5563 !important;
    /* gray-600 */
    padding-right: 20px !important;
    font-size: 14.5px;
}

.cm-s-v6 .CodeMirror-cursor {
    border-left: 2px solid #6366f1 !important;
    /* Indigo cursor */
}

.cm-s-v6 .CodeMirror-activeline-background {
    background: rgba(255, 255, 255, 0.02) !important;
}

.cm-s-v6 div.CodeMirror-selected {
    background: rgba(99, 102, 241, 0.15) !important;
}

/* Syntax coloring — Dark, high contrast, non-distracting */
.cm-s-v6 .cm-keyword {
    color: #818cf8;
    font-weight: 500;
}

/* indigo-400 */
.cm-s-v6 .cm-string {
    color: #34d399;
}

/* emerald-400 */
.cm-s-v6 .cm-number {
    color: #fbbf24;
}

/* amber-400 */
.cm-s-v6 .cm-operator {
    color: #9ca3af;
}

/* gray-400 */
.cm-s-v6 .cm-variable {
    color: #e5e7eb;
}

/* gray-200 */
.cm-s-v6 .cm-comment {
    color: #6b7280;
    font-style: italic;
}

/* gray-500 */
.cm-s-v6 .cm-def {
    color: #38bdf8;
}

/* sky-400 */
.cm-s-v6 .cm-builtin {
    color: #818cf8;
}

/* indigo-400 */
.cm-s-v6 .cm-property {
    color: #a21caf;
}

/* fuchsia-700 -> Actually let's keep it calm: */
.cm-s-v6 .cm-property {
    color: #e5e7eb;
}

/* CodeMirror Autocomplete Hints styling */
.CodeMirror-hints {
    position: absolute;
    z-index: 100;
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #171717;
    /* match bg-surface */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    max-height: 20em;
    overflow-y: auto;
}

.CodeMirror-hint {
    margin: 0;
    padding: 6px 16px;
    white-space: pre;
    color: #a3a3a3;
    /* match text-subtle */
    cursor: pointer;
    transition: background-color 0.1s, color 0.1s;
}

li.CodeMirror-hint-active {
    background: #262626;
    /* hover bg */
    color: #ffffff;
}