/*
 * Global font settings and smooth scrolling
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

/*
 * Tailwind Directives not needed via CDN,
 * but this file handles non-utility overrides.
 */

/*
 * Custom Scrollbar Styling
 * Matches the Slate-950/900 theme
 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #020617; /* slate-950 */
}

::-webkit-scrollbar-thumb {
    background: #334155; /* slate-700 */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569; /* slate-600 */
}

/*
 * Markdown Content Styling
 * Targets raw HTML output from the Markdown parser
 * to ensure consistency with the Tailwind theme.
 */
#content {
    color: #e2e8f0; /* slate-200 */
}

#content h1,
#content h2,
#content h3 {
    color: #f8fafc; /* slate-50 */
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

#content h1 {
    font-size: 2.25rem;
    border-bottom: 1px solid #1e293b; /* slate-800 */
    padding-bottom: 1rem;
    color: #22d3ee; /* cyan-400 */
}

#content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

#content h3 {
    font-size: 1.25rem;
    color: #94a3b8; /* slate-400 */
}

#content p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
    color: #cbd5e1; /* slate-300 */
}

#content ul,
#content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

#content li {
    margin-bottom: 0.5rem;
    color: #cbd5e1; /* slate-300 */
}

#content a {
    color: #22d3ee; /* cyan-400 */
    text-decoration: none;
    transition: color 0.2s;
}

#content a:hover {
    color: #67e8f9; /* cyan-300 */
    text-decoration: underline;
}

/*
 * Code Blocks & Inline Code
 */
#content code {
    font-family: 'Roboto Mono', monospace;
    background-color: #1e293b; /* slate-800 */
    color: #22d3ee; /* cyan-400 */
    padding: 0.2rem 0.4rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

#content pre {
    background-color: #0f172a !important; /* slate-900 */
    border: 1px solid #1e293b; /* slate-800 */
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    position: relative;
}

#content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.9rem;
}

#content blockquote {
    border-left: 4px solid #22d3ee; /* cyan-400 */
    background-color: rgba(15, 23, 42, 0.5); /* slate-900/50 */
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #94a3b8; /* slate-400 */
}

/*
 * Dynamic Sidebar Navigation
 * Targeted classes generated by JS
 */
#sidebar-nav ul {
    list-style: none !important;
    padding-left: 0 !important;
}

#sidebar-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: #94a3b8; /* slate-400 */
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

#sidebar-nav a:hover {
    background-color: #1e293b; /* slate-800 */
    color: #f1f5f9; /* slate-100 */
}

#sidebar-nav a.active {
    background-color: #1e293b; /* slate-800 */
    color: #22d3ee; /* cyan-400 */
    border-left: 3px solid #22d3ee; /* cyan-400 */
}

/*
 * Version Selector Dropdown
 * Styling for the JS-injected dropdown
 */
.version-selected {
    background-color: #1e293b; /* slate-800 */
    color: #e2e8f0; /* slate-200 */
    border: 1px solid #334155; /* slate-700 */
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.version-options {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background-color: #1e293b; /* slate-800 */
    border: 1px solid #334155; /* slate-700 */
    border-radius: 0.5rem;
    z-index: 50;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.version-options.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.version-option {
    padding: 0.75rem 1rem;
    color: #cbd5e1; /* slate-300 */
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.version-option:hover {
    background-color: #334155; /* slate-700 */
    color: #22d3ee; /* cyan-400 */
}

/*
 * Animations
 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}