/* Report Page Styles */

.report-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.report-layout {
    display: flex;
    min-height: calc(100vh - 200px);
    padding: 0 10%;
}

/* Left Sidebar: Table of Contents */
.toc-sidebar {
    width: 300px;
    background-color: #ffffff;
    border-right: 1px solid #e5e5e5;
    padding: 30px 20px;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: calc(100vh - 200px);
    flex-shrink: 0;
}

.toc-sidebar h2 {
    color: #37A1E1;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding-bottom: 15px;
    border-bottom: 2px solid #37A1E1;
}

.toc-nav {
    width: 100%;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list > li {
    margin-bottom: 8px;
}

.toc-link {
    display: block;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.toc-link:hover {
    background-color: #f0f8ff;
    color: #37A1E1;
}

.toc-link.active {
    background-color: #37A1E1;
    color: #ffffff;
    font-weight: 500;
}

.toc-sublist {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 20px;
}

.toc-sublist li {
    margin-bottom: 4px;
}

.toc-sublist .toc-link {
    font-size: 0.85rem;
    padding: 6px 12px;
    color: #666;
}

.toc-sublist .toc-link:hover {
    background-color: #f0f8ff;
    color: #37A1E1;
}

.toc-sublist .toc-link.active {
    background-color: #37A1E1;
    color: #ffffff;
}

/* Right Side: PDF Viewer */
.pdf-viewer-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    overflow-y: auto;
}

.pdf-nav-btn-center {
    background-color: #37A1E1;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-nav-btn-center:hover:not(:disabled) {
    background-color: #2a8bc7;
}

.pdf-nav-btn-center:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-info-center {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    min-width: 70px;
    text-align: center;
}

.pdf-viewer-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    overflow-x: auto;
    padding: 30px;
    background-color: #f8f9fa;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.pdf-nav-overlay {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

#pdf-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

#pdf-fallback {
    width: 100%;
    min-height: 800px;
    border: none;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .report-layout {
        flex-direction: column;
    }
    
    .toc-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        max-height: 300px;
    }
    
    .pdf-viewer-section {
        height: auto;
        min-height: 600px;
    }
}

@media (max-width: 767px) {
    .toc-sidebar {
        padding: 20px 15px;
    }
    
    .toc-sidebar h2 {
        font-size: 1.1rem;
    }
    
    .pdf-nav-overlay {
        bottom: 20px;
        padding: 10px 15px;
    }
    
    .pdf-nav-btn-center {
        padding: 8px 12px;
        font-size: 1rem;
        min-width: 40px;
        height: 40px;
    }
    
    .page-info-center {
        font-size: 0.85rem;
        min-width: 60px;
    }
    
    .pdf-viewer-wrapper {
        padding: 15px 10px;
    }
    
    #pdf-canvas {
        width: 100%;
    }
}

