/* Custom styles augmenting Tailwind CSS for Statics-Tools */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* MathJax font and container tweaks */
/* Ensure no MathJax container ever displays a vertical scrollbar */
mjx-container {
    overflow-y: hidden !important;
}

/* Ensure inline math never has overflow contexts, scrollbars, or vertical baseline shift */
mjx-container:not([display="true"]) {
    overflow: visible !important;
}

/* Formal block equations: strictly prevent vertical scrollbars and remove height-mismatch margins */
mjx-container[display="true"] {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden !important;
    height: auto !important;
    margin: 0 !important;
    padding: 2px 0;
}

/* Formal equation containers across all chapters (Ch 1-10): strictly eliminate vertical scrollbars */
div[class*="overflow-x-auto"] {
    overflow-y: hidden !important;
    height: auto !important;
}

div[class*="overflow-x-auto"] > div {
    overflow-y: hidden !important;
    height: auto !important;
}

div[class*="overflow-x-auto"] > span {
    overflow: visible !important;
    flex-shrink: 0 !important;
}

/* Subtly pulse active badges */
@keyframes subtle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.animate-subtle-pulse {
    animation: subtle-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Chapter Reader: Justify all main body paragraphs */
article.prose p {
    text-align: justify;
    text-justify: inter-word;
}

/* Sidebar visible scrollbar */
.custom-sidebar-scrollbar {
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #94a3b8 #f1f5f9 !important;
}

.custom-sidebar-scrollbar::-webkit-scrollbar {
    width: 6px !important;
    display: block !important;
}

.custom-sidebar-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 4px !important;
}

.custom-sidebar-scrollbar::-webkit-scrollbar-thumb {
    background-color: #94a3b8 !important;
    border-radius: 4px !important;
}

.custom-sidebar-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #64748b !important;
}

/* Force left alignment for display MathJax equations inside solution blocks and left-aligned text */
.border-l-2 mjx-container[display="true"],
.text-left mjx-container[display="true"],
.solution-math mjx-container[display="true"] {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}


