/* The PDF proof occupies the right-hand work surface, next to its source. */
.compile-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; flex: 0 0 auto; padding: 7px 12px; border-bottom: 1px solid var(--border); background: #f7f9fc; }
.compile-toolbar label, .compiler-status { font-size: 11px; color: var(--text-secondary); }
.workspace-app .compile-toolbar select { min-width: 130px; max-width: 280px; min-height: 32px; padding: 4px 22px 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: white; font: 12px var(--editor-font); }
.workspace-app .compile-toolbar select:focus-visible { outline: 2px solid #3972bc; outline-offset: 2px; }
.compiler-status { margin-left: auto; }
.workspace-app #btnCompilerRetry { min-height: 27px; padding: 3px 6px; border-color: transparent; background: transparent; font-size: 10px; }
.compilation-visible .workbench.main-content { grid-template-columns: 190px minmax(280px, 1fr) minmax(320px, 44%); position: relative; }
.compilation-visible .context-sidebar { display: none; }
.compilation-visible #btnOutline { display: inline-block; }
.compilation-visible.outline-open .context-sidebar { display: flex; position: absolute; z-index: 25; right: 0; top: 0; bottom: 0; width: 270px; box-shadow: -12px 0 28px #1e334724; }
.pdf-preview-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border-strong); background: #e5eaf1; }
.pdf-preview-header { display: flex; align-items: center; gap: 10px; min-height: 49px; flex: 0 0 auto; padding: 8px 12px; background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.pdf-preview-header h2 { font-size: 12px; font-weight: 650; white-space: nowrap; }
.pdf-preview-header span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 10px var(--editor-font); color: var(--text-secondary); }
.workspace-app #btnClosePreview { margin-left: auto; min-height: 26px; padding: 2px 7px; border-color: transparent; background: transparent; font-size: 11px; }
.compile-status { margin: 0; padding: 9px 12px; flex: 0 0 auto; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; background: #f6f8fc; color: var(--text-secondary); }
.compile-status[data-state="failed"], .compile-status[data-state="unavailable"] { color: #91432c; background: #fff5eb; }
.compile-status[data-state="running"] { color: var(--accent); background: var(--accent-soft); }
.preview-stale { margin: 0; padding: 7px 12px; font-size: 11px; line-height: 1.7; background: #fff3d8; color: #795719; }
.pdf-proof { flex: 1; display: flex; min-height: 100px; position: relative; }
.pdf-proof iframe { width: 100%; flex: 1; border: 0; background: #dde3ec; }
.preview-page-controls { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 12px; padding: 7px 10px; background: #f7f9fc; border-bottom: 1px solid var(--border); }
.preview-page-controls span { color: var(--text-secondary); font: 11px var(--editor-font); }
.preview-page-controls button { min-height: 28px; padding: 4px 9px; font-size: 11px; }
.page-preview-status { flex: 0 0 auto; margin: 0; padding: 7px 12px; color: var(--text-secondary); background: #f4f7fb; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.workspace-app .retry-preview { flex: 0 0 auto; margin: 0; min-height: 30px; border: none; border-radius: 0; background: #f4f7fb; color: var(--accent); font-size: 11px; text-decoration: underline; }
.pdf-page-view { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 14px; }
.pdf-page-view img { display: block; width: 100%; height: auto; margin: 0 auto; background: white; box-shadow: 0 2px 10px #26395420; }
.pdf-empty { align-self: center; margin: auto; max-width: 280px; padding: 32px 20px; color: var(--text-secondary); text-align: center; font-size: 12px; line-height: 1.9; }
.pdf-empty strong { display: block; margin-bottom: 7px; color: var(--text); font-size: 15px; font-weight: 500; }
.pdf-open { display: block; flex: 0 0 auto; padding: 6px 12px; background: var(--surface-soft); color: var(--accent); font-size: 10px; text-decoration: underline; }
.compile-logs { flex: 0 0 auto; max-height: 35%; overflow: auto; border-top: 1px solid var(--border-strong); background: #f5f7fb; }
.compile-logs summary { cursor: pointer; padding: 9px 12px; color: var(--text); font-size: 11px; }
.compile-logs pre { margin: 0; padding: 0 12px 12px; font: 10px/1.6 var(--editor-font); color: #36455b; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
    .compilation-visible .workbench.main-content { grid-template-columns: minmax(260px, 1fr) minmax(320px, 49%); }
    .compilation-visible .project-sidebar { display: none; }
    .compilation-visible #btnFiles { display: inline-flex; }
    .compilation-visible.files-open .project-sidebar { display: flex; position: absolute; z-index: 26; left: 0; top: 0; bottom: 0; width: 270px; box-shadow: 12px 0 28px #1e334724; }
}
@media (max-width: 700px) {
    .compile-toolbar { padding: 7px 8px; gap: 6px; }
    .workspace-app .compile-toolbar select { min-width: 0; max-width: none; flex: 1; min-height: 37px; font-size: 14px; }
    .compile-toolbar label { display: none; }
    .compile-toolbar button { min-height: 37px; }
    .compiler-status { width: auto; margin-left: 0; }
    .compilation-visible .workbench.main-content { grid-template-columns: minmax(0, 1fr); }
    .compilation-visible .document-pane { display: none; }
    .pdf-preview-pane { border-left: 0; }
    .workspace-app #btnClosePreview { min-height: 36px; }
}
