/* Document Details Page Styles */

/* Main layout */
.container-fluid {
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-width: 100%;
    /* margin-top: 54px; */ /* Space below navbar */
}

.content-row {
    margin: 0;
    padding: 0;
}

/* Tab content */
.tab-content > .tab-pane {
    display: none;
}

.tab-content > .active {
    display: block;
}

/* PDF viewer */
.pdf-viewer {
    height: calc(100vh - 84px);
    position: fixed;
    top: 84px; /* Increased space below navbar by an additional 10px */
    left: var(--left-panel-width, 33.333%);
    right: 0;
    padding: 0;
    margin: 0;
    border: none;
    transition: left 0.1s ease;
    z-index: 10;
}

.pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Left panel (info panel) */
.info-tabs {
    border-right: 1px solid #dee2e6;
    padding-right: 15px;
    z-index: 10;
    height: calc(100vh - 84px);
    overflow-y: auto;
    position: fixed;
    top: 84px; /* Space below navbar - matches PDF viewer */
    left: 0;
    width: var(--left-panel-width, 33.333%);
    padding-bottom: 20px;
    box-sizing: border-box;
    transition: width 0.1s ease;
}

.left-content-scroll {
    padding: 0 5px;
    overflow-y: auto;
}

.back-button-container {
    padding: 10px 15px;
}

/* Resizer */
.resizer {
    width: 8px;
    position: fixed; /* Fixed position ensures full height */
    cursor: col-resize;
    top: 54px; /* Just below navbar */
    bottom: 0; /* All the way to bottom */
    background-color: #dee2e6;
    z-index: 100;
    left: var(--left-panel-width, 33.333%);
    transform: translateX(-4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dots indicator for resizer */
.resizer::after {
    content: "";
    position: absolute;
    height: 120px;
    width: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-image: radial-gradient(circle, #666 2px, transparent 2px);
    background-size: 4px 8px;
    background-repeat: repeat-y;
}

.resizer:hover, .resizer.active {
    background-color: #adb5bd;
}

.resizing {
    cursor: col-resize;
    user-select: none;
}

/* Text content boxes */
.text-content-box {
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    font-size: 0.75rem;
}

/* Debug info */
.debug-info {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 5px;
    z-index: 100;
    font-size: 0.8rem;
    max-width: 80%;
}

/* Mobile styles */
.mobile-toggle-pdf, .mobile-toggle-info {
    display: none;
}

@media (max-width: 767.98px) {
    /* Mobile layout styles */
    .info-tabs {
        position: fixed;
        width: 100% !important;
        height: calc(100vh - 54px) !important;
        top: 54px;
        left: 0;
        overflow-y: auto !important;
        border-right: none;
        padding: 0 15px;
        transform: translateX(0);
        transition: transform 0.3s ease;
    }

    .pdf-viewer {
        left: 0 !important;
        z-index: 5;
    }

    .resizer {
        display: none !important;
    }

    .mobile-toggle-pdf {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 90px;
        z-index: 30;
        background-color: #0d6efd;
        color: white;
        border: none;
        border-radius: 50px;
        padding: 10px 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    .mobile-toggle-info {
        display: none; /* Initially hidden */
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 30;
        background-color: #0d6efd;
        color: white;
        border: none;
        border-radius: 50px;
        padding: 10px 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    .show-pdf .info-tabs {
        transform: translateX(-100%);
    }

    .show-pdf .mobile-toggle-pdf {
        display: none;
    }

    .show-pdf .mobile-toggle-info {
        display: block;
    }
}
