/* Custom styles for Vis.js network to ensure it fills its container */
#graph-container {
    width: 100%;
    height: 100%; /* Will take 100% of space given by flex-grow parent */
}
/* Styling for the splitter */
.splitter {
    width: 8px; /* Width of the draggable area */
    cursor: ew-resize; /* Cursor indicates horizontal resizing */
    background-color: #e2e8f0; /* slate-200 */
    flex-shrink: 0; /* Prevent the splitter from shrinking */
    z-index: 10; /* Ensure it's above the panels */
    position: relative;
    /* For touch devices, make it easier to grab */
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

.splitter-handle {
    position: absolute;
    top: 50%;
    left: calc(50% - 2px); /* Center the 2px line */
    transform: translateY(-50%);
    height: 20px; /* Height of the handle area */
    width: 8px; /* Should match splitter width */
    display: flex;
}
.splitter-handle > div { /* Styling for the vertical line handle */
    border-radius: 4px; /* Round the ends of the line */
}
.splitter:hover {
    background-color: #cbd5e1; /* slate-300 */
}
/* Ensure body and html take full height for layout purposes */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc; /* Tailwind slate-50 */
    overflow: hidden; /* Prevent scrollbars on the body itself */
}
body { /* Custom font for the page */
    font-family: 'Inter', sans-serif;
}
/* Styling for the node details panel */
#node-details-panel {
    transition: background-color: 0.3s ease;
}
.article-content h3 { /* This will style the main title from fetched content */
    font-size: 1.25rem; /* text-xl */
    font-weight: 700; /* font-bold */
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #0369a1; /* sky-700 */
    border-bottom: 1px solid #e2e8f0; /* slate-200 */
    padding-bottom: 0.25rem;
}
.article-content h4 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #0f769e; /* A darker sky color, like sky-600 */
}
.article-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #334155; /* slate-700 */
}
.article-content ul, .article-content ol {
    list-style-position: outside;
    margin-left: 1.75rem;
    margin-bottom: 1rem;
    color: #334155; /* slate-700 */
}
.article-content ul {
    list-style-type: disc;
}
.article-content ol {
    list-style-type: decimal;
}
 .article-content code { /* For non-math code snippets */
    background-color: #e2e8f0; /* slate-200 */
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.9em;
    color: #1e293b; /* slate-800 */
}
.article-content pre { /* Styling for <pre> blocks, often wrapping code */
    background-color: #f1f5f9; /* slate-100 */
    border: 1px solid #e2e8f0; /* slate-200 */
    padding: 0.75rem; /* p-3 */
    border-radius: 0.375rem; /* rounded-md */
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.875rem; /* text-sm */
    color: #1e293b; /* slate-800 */
    margin-bottom: 1rem;
}
.article-content strong {
    color: #1e293b; /* slate-800 */
}
.article-content .math.display { /* Style for display math */
    overflow-x: auto; /* Allow scrolling for wide equations */
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.tags-container {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0; /* slate-200 */
}
.tag-badge {
    display: inline-block;
    background-color: #e0f2fe; /* sky-100 */
    color: #0ea5e9; /* sky-600 */
    padding: 0.25rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 9999px; /* rounded-full */
    font-size: 0.75rem; /* text-xs */
    font-weight: 500; /* font-medium */
    cursor: pointer;
    transition: background-color 0.2s;
}
.tag-badge:hover {
    background-color: #bae6fd; /* sky-200 */
    color: #0284c7; /* sky-700 */
}
/* Timeline specific styles */
#timeline-container { }
.timeline-tick {
    font-size: 0.75rem;
    color: #334155;
    padding: 1px 0;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
    width: 100%;
    pointer-events: none;
}
.timeline-tick.interpolated span {
    color: #64748b;
}

/* Responsive adjustments for smaller viewports, impacting the right panel */
@media (max-width: 1024px) { /* Corresponds roughly to 'lg' breakpoint */
    #node-details-panel {
        padding: 1rem; /* Reduce padding from p-6 (24px) to p-4 (16px) */
    }
    .article-content h3 {
        font-size: 1.125rem; /* text-lg, down from text-xl */
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
    .article-content h4 {
        font-size: 1rem; /* text-base, down from text-lg */
        margin-top: 1rem;
        margin-bottom: 0.25rem;
    }
    .article-content p {
        font-size: 0.875rem; /* text-sm */
        line-height: 1.6; /* Slightly adjusted line height */
        margin-bottom: 0.75rem;
    }
    .article-content ul, .article-content ol {
        font-size: 0.875rem; /* text-sm */
        margin-left: 1.25rem; /* Reduced indent */
        margin-bottom: 0.75rem;
    }
    .article-content pre { /* Target preformatted text, like code blocks */
        font-size: 0.8rem; /* Make code blocks slightly smaller */
        padding: 0.5rem;
    }
    .tags-container {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
    .tag-badge {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem; 
    }
}

/* Even more compact for very small viewports */
@media (max-width: 767px) { /* Corresponds roughly to 'md' breakpoint and below */
    #node-details-panel {
        padding: 0.75rem; /* p-3 */
    }
    .article-content h3 {
        font-size: 1rem; /* text-base */
        margin-top: 0.75rem;
        margin-bottom: 0.4rem;
    }
    .article-content h4 {
        font-size: 0.9rem; /* Slightly smaller than text-base */
        margin-top: 0.75rem;
        margin-bottom: 0.2rem;
    }
    .article-content p {
        font-size: 0.8rem; /* Smaller than text-sm */
        line-height: 1.5;
        margin-bottom: 0.6rem;
    }
    .article-content ul, .article-content ol {
        font-size: 0.8rem;
        margin-left: 1rem; /* Further reduced indent */
        margin-bottom: 0.6rem;
    }
    .article-content pre {
        font-size: 0.75rem; /* text-xs */
        padding: 0.4rem;
    }
    .tag-badge {
        padding: 0.15rem 0.5rem;
        font-size: 0.65rem;
    }
    /* For the welcome/loading message on small screens */
    #node-info-content .text-lg.font-medium { 
        font-size: 1rem; /* text-base */
    }
    #node-info-content .text-sm.mt-1 { 
        font-size: 0.8rem;
    }
    #node-info-content .h-12.w-12.text-slate-400 { /* SVG icon */
        height: 2rem; /* h-8 */
        width: 2rem; /* w-8 */
    }
}
