/* Custom CSS styles that extend Tailwind */

/* Better dark mode transitions */
html {
    transition: background-color 0.3s ease;
    background-color: #001f3f; /* Dark blue background */
    color: black; /* Black text */
}

body {
    transition: color 0.3s ease, background-color 0.3s ease;
    background-color: #001f3f; /* Dark blue background */
    color: black; /* Black text */
}

/* Math equation styling */
.math-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 0.5rem;
}

.dark .math-container {
    background-color: rgba(255, 255, 255, 0.05);
}

/* D3.js visualization containers */
.visualization-container {
    width: 100%;
    height: 400px;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Control panel for interactive elements */
.control-panel {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0.5rem;
    background-color: white; /* White boxes */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: black; /* Black text */
}

.dark .control-panel {
    background-color: #001f3f; /* Dark blue background for dark mode */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    color: white; /* White text for dark mode */
}

/* Slider styling */
input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

/* Function input styling */
.function-input {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #E5E7EB;
    background-color: white;
    font-family: monospace;
}

.dark .function-input {
    border-color: #374151;
    background-color: #1F2937;
    color: #E5E7EB;
}

/* Custom tooltip */
.tooltip {
    position: absolute;
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 0.25rem;
    pointer-events: none;
    z-index: 100;
    font-size: 0.875rem;
    max-width: 200px;
}

/* Annotation styling for graphs */
.annotation-label {
    font-size: 0.75rem;
    font-weight: bold;
}

/* Grid lines in visualizations */
.grid line {
    stroke: #E5E7EB;
    stroke-opacity: 0.5;
    shape-rendering: crispEdges;
}

.dark .grid line {
    stroke: #4B5563;
}

.grid path {
    stroke-width: 0;
}

/* Axis styling */
.axis path, .axis line {
    stroke: #9CA3AF;
    shape-rendering: crispEdges;
}

.dark .axis path, .dark .axis line {
    stroke: #6B7280;
}

.axis text {
    font-size: 0.75rem;
    fill: #4B5563;
}

.dark .axis text {
    fill: #9CA3AF;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .visualization-container {
        page-break-inside: avoid;
        border: 1px solid #E5E7EB;
    }
}

/* Animation for interactive elements */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Riemann sum rectangle styling */
.riemann-rect {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.riemann-rect:hover {
    opacity: 0.9;
}

/* Formula highlight effects */
.formula-highlight {
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

.dark .formula-highlight {
    background-color: rgba(59, 130, 246, 0.2);
}

.formula-highlight:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.dark .formula-highlight:hover {
    background-color: rgba(59, 130, 246, 0.3);
} 