/* Preview Pane — Toolbar, PDF Viewer, Logs */

.preview-split { display: flex; flex-direction: column; height: 100%; }
.preview-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.preview-toolbar {
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-4) var(--space-12); background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}
.preview-actions { display: flex; align-items: center; gap: var(--space-8); }
.zoom-level { font-size: var(--font-size-base); color: var(--color-text-secondary); min-width: 50px; text-align: center; }

.pdf-viewer {
    flex: 1; overflow: auto; display: flex; flex-direction: column;
    align-items: center; padding: var(--space-20); background: var(--color-bg-pdf-viewer);
}

.pdf-placeholder {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100%; color: var(--color-text-muted); text-align: center;
}
.pdf-placeholder i { font-size: var(--font-size-5xl); margin-bottom: var(--space-16); opacity: 0.3; }
.pdf-placeholder .hint { font-size: var(--font-size-base); margin-top: var(--space-8); opacity: 0.6; }

.pdf-page { position: relative; margin-bottom: var(--space-16); box-shadow: var(--shadow); background: white; }
.pdf-page canvas { display: block; }

.annotate-mode .pdf-viewer { cursor: crosshair; }
#annotateToggleBtn.active { background: var(--color-accent-primary); color: white; }
.annotation-count { font-size: var(--font-size-base); color: var(--color-accent-primary); font-weight: var(--font-weight-medium); }

/* Logs Split Panel */
.logs-split-panel {
    height: var(--logs-height); min-height: var(--logs-min-height);
    display: flex; flex-direction: column;
    border-top: 1px solid var(--color-border); background: var(--color-bg-tertiary);
}
.logs-split-panel.collapsed { height: auto; min-height: 0; }
.logs-split-panel.collapsed .log-viewer, .logs-split-panel.collapsed .fix-with-ai-bar { display: none; }

.logs-split-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--space-6) var(--space-12); background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border); cursor: pointer; user-select: none;
}
.logs-title {
    font-size: var(--font-size-base); font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary); display: flex; align-items: center; gap: var(--space-6);
}
.logs-title i { font-size: var(--font-size-sm); }
.logs-split-panel.collapsed .logs-split-header i.fa-chevron-down { transform: rotate(180deg); }

.log-viewer { flex: 1; overflow: auto; padding: var(--space-16); background: var(--color-bg-tertiary); }
.log-viewer pre {
    font-family: var(--font-family-mono); font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed); white-space: pre-wrap;
    word-wrap: break-word; color: var(--color-text-secondary);
}
.log-viewer.has-error pre { color: var(--color-accent-danger); }

.fix-with-ai-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-8) var(--space-16);
    background: linear-gradient(135deg, var(--color-accent-danger-bg-light), rgba(239, 68, 68, 0.05));
    border-bottom: 1px solid var(--color-accent-danger-border);
}
.fix-with-ai-content {
    display: flex; align-items: center; gap: var(--space-8);
    font-size: var(--font-size-md); color: var(--color-accent-danger); font-weight: var(--font-weight-medium);
}
