/* static/report-view.css */

/* Auto-loading enhancements */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.positive-change { color: green; }
.negative-change { color: red; }

.real-time-data {
    position: relative;
}

.real-time-data::after {
    content: "🔴";
    position: absolute;
    top: -2px;
    right: -15px;
    font-size: 8px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Navigation Sidebar Styles - Left positioned within container */
#navigation-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    word-wrap: break-word;
    min-width: 280px;
    max-width: 320px;
}

#navigation-sidebar.dark-theme {
    background: var(--dark-card-bg, #1f2937);
    border-color: var(--dark-border-color, #374151);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.nav-title {
    color: var(--text-primary, #1f2937);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

/* Progress Bar Styles */
.scroll-progress-container {
    margin-top: 0.75rem;
}

.scroll-progress-bar {
    position: relative;
    height: 20px;
    background: linear-gradient(to right, #e5e7eb, #d1d5db);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.scroll-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.15s ease-out;
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.scroll-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: #374151;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
    z-index: 1;
}

/* Dark theme progress bar */
#navigation-sidebar.dark-theme .scroll-progress-bar {
    background: linear-gradient(to right, #374151, #4b5563);
}

#navigation-sidebar.dark-theme .scroll-progress-text {
    color: #e5e7eb;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.nav-content {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    word-wrap: break-word;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary, #6b7280);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.nav-links a:hover {
    background-color: var(--bg-secondary, #f9fafb);
    color: var(--text-primary, #1f2937);
    border-left-color: var(--accent-color, #3b82f6);
    transform: translateX(2px);
}

.nav-links a.active {
    background-color: #3b82f6;
    color: white;
    font-weight: 600;
    border-left-color: #1e40af;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.nav-links .nav-more span {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-muted, #9ca3af);
    font-style: italic;
    font-size: 0.8rem;
}

/* Mobile responsive - hide navigation on mobile */
@media (max-width: 1024px) {
    #navigation-sidebar {
        display: none !important;
    }

    .flex.gap-6 {
        display: block;
    }
}

/* --- Custom Scrollbar Styles (Theme-aware) --- */
/* For Webkit browsers (Chrome, Safari, Edge) */
.custom-scrollbar::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--scrollbar-track-bg);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-bg);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover-bg);
}

/* For Firefox */
.custom-scrollbar {
    scrollbar-width: var(--scrollbar-width);
    scrollbar-color: var(--scrollbar-thumb-bg) var(--scrollbar-track-bg);
}

/* Smooth scrolling for all browsers */
.custom-scrollbar {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
