/* ============ PDF Panel ============ */
#pdf-panel {
    display: none;
}

#tree-container.split-layout #pdf-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0d1117;
    border-left: 2px solid #30363d;
}

#pdf-header {
    padding: 10px 15px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    font-size: 14px;
    color: #8b949e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#pdf-content {
    flex: 1;
    overflow: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#pdf-canvas {
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#pdf-page-container {
    position: relative;
    display: inline-block;
}

#pdf-placeholder {
    color: #8b949e;
    text-align: center;
    padding: 40px 20px;
}

/* PDF Text Layer */
#pdf-text-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    line-height: 1.0;
}

#pdf-text-layer > span {
    color: transparent !important;
    position: absolute;
    white-space: pre;
    transform-origin: 0% 0%;
}

#pdf-text-layer .highlight {
    background-color: rgba(255, 215, 0, 0.5);
    color: transparent !important;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.9);
    animation: highlightPulse 1.5s ease-in-out infinite;
}

#pdf-text-layer ::selection {
    background: rgba(0, 0, 255, 0.3);
}

@keyframes highlightPulse {
    0%, 100% {
        background-color: rgba(255, 215, 0, 0.5);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.9);
    }
    50% {
        background-color: rgba(255, 235, 59, 0.7);
        box-shadow: 0 0 20px rgba(255, 235, 59, 1);
    }
}

/* PDF Navigation */
#pdf-nav {
    padding: 10px;
    background: #161b22;
    border-top: 1px solid #30363d;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#pdf-nav button {
    padding: 6px 15px;
    background: #238636;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

#pdf-nav button:hover {
    background: #2ea043;
}

#pdf-nav button:disabled {
    background: #4a5568;
    cursor: not-allowed;
}
