/* Highlight.js JSON syntax highlighting - VS Code theme colors */
/* These styles override the default highlight.js theme for consistent JSON display */

/* Highlight.js uses special classes for JSON structural elements */
pre.language-json {
    background: white !important;
    padding: 1rem !important;
    margin: 0 !important;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.dark pre.language-json {
    background: #111827 !important;
    border-color: #374151;
}

/* Light mode colors - Enhanced for better contrast */
.hljs {
    background: transparent !important;
    color: #1e293b !important; /* Darker slate for better contrast */
}

.hljs-attr {
    color: #0f766e !important; /* Darker teal for property names */
}

.hljs-string {
    color: #b45309 !important; /* Darker amber for string values */
}

.hljs-number {
    color: #1d4ed8 !important; /* Darker blue for numbers */
}

.hljs-literal {
    color: #7c3aed !important; /* Darker purple for booleans/null */
}

.hljs-punctuation {
    color: #475569 !important; /* Darker slate for punctuation */
}

/* Dark mode colors (VS Code Dark theme - Enhanced) */
.dark .hljs {
    color: #e5e7eb !important;
}

.dark .hljs-attr {
    color: #60a5fa !important; /* Brighter blue for property names */
}

.dark .hljs-string {
    color: #fb923c !important; /* Orange for strings - distinct from yellow stars */
}

.dark .hljs-number {
    color: #34d399 !important; /* Bright emerald for numbers */
}

.dark .hljs-literal {
    color: #a78bfa !important; /* Bright purple for booleans/null */
}

.dark .hljs-punctuation {
    color: #9ca3af !important; /* Medium gray for punctuation */
}

/* Chemical value tooltips */
.chemical-value-tooltip {
    position: relative;
    cursor: help;
    display: inline-block;
}

.chemical-value-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: #f9fafb;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

.chemical-value-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
    pointer-events: none;
}

/* Dark mode tooltip styling */
.dark .chemical-value-tooltip:hover::after {
    background-color: #374151;
    color: #f3f4f6;
}

.dark .chemical-value-tooltip:hover::before {
    border-top-color: #374151;
}

/* Highlight the chemical value on hover */
.chemical-value-tooltip:hover .hljs-number {
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
}

.dark .chemical-value-tooltip:hover .hljs-number {
    background-color: rgba(96, 165, 250, 0.2);
}

/* Normalization tooltips - for all normalized values */
.normalization-tooltip {
    position: relative;
    cursor: help;
    display: inline;
}

/* Tooltip appears BELOW the value to avoid overflow clipping */
.normalization-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background-color: #1f2937;
    color: #f9fafb;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

/* Arrow pointing up */
.normalization-tooltip:hover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 12px;
    margin-top: 2px;
    border: 6px solid transparent;
    border-bottom-color: #1f2937;
    z-index: 9999;
    pointer-events: none;
}

/* Dark mode normalization tooltip */
.dark .normalization-tooltip:hover::after {
    background-color: #374151;
    color: #f3f4f6;
}

.dark .normalization-tooltip:hover::before {
    border-bottom-color: #374151;
}

/* Star indicator for automatic normalizations */
.normalization-star {
    color: #f59e0b; /* Amber/yellow color */
    font-size: 1.1em;
    vertical-align: baseline;
}

.dark .normalization-star {
    color: #fbbf24; /* Brighter yellow in dark mode */
}

/* Star indicator for manual edits - same as automatic normalizations */
.normalization-manual {
    color: #f59e0b; /* Amber/yellow color - same as automatic */
    font-size: 1.1em;
    vertical-align: baseline;
}

.dark .normalization-manual {
    color: #fbbf24; /* Brighter yellow in dark mode - same as automatic */
}

