/**
 * Split Pane Styles
 * Adds resizable split-pane functionality to view_documents
 */

/* Main container for the split view */
.split-pane-container {
    display: flex;
    height: calc(100vh - 56px); /* Adjust based on header height */
    overflow: hidden;
    width: 100%;
}

/* Wrapper for the two panels and the splitter */
.split-pane-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Left and right panels */
.split-pane-left,
.split-pane-right {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.split-pane-left {
    width: 30%; /* Initial width - can be overridden by JS */
    min-width: 250px;
    max-width: 80%; /* Prevent panel from becoming too large */
    border-right: 1px solid #dee2e6;
}

.split-pane-right {
    flex: 1;
    min-width: 300px;
}

/* Specific adjustments for view_document_v1 */
#formPanel {
    width: 35%; /* Slightly wider for form editing */
    min-width: 300px;
    max-width: 60%;
}

/* Panel header styles */
.panel-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
    background-color: #f8f9fa;
}

/* Content within panels */
.panel-content {
    flex: 1;
    overflow-y: auto;
}

/* Splitter styles */
.split-pane-divider {
    width: 8px; /* Reduced from 12px for cleaner look */
    background: #f8f9fa;
    cursor: col-resize;
    position: relative;
    transition: background-color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.split-pane-divider:hover {
    background: #e9ecef;
}

.split-pane-divider.active {
    background: #dee2e6;
}

.splitter-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-size: 1.2rem;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.split-pane-divider:hover .splitter-handle {
    opacity: 1;
}

/* Scrollbar styling */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}
