/* Minimal layout for the embedded official-form PDF viewer.
   Page chrome lives in the parent workbench; this iframe is just the document surface. */
html,
body {
    margin: 0;
    height: 100%;
    background: #f3f4f6;
}

.ofv-container {
    position: absolute;
    inset: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* PDF.js positions pages absolutely inside .pdfViewer; give it room. */
#viewer.pdfViewer {
    padding: 12px 0 24px;
}

.ofv-status {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: none;
    padding: 10px 14px;
    font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1f2937;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
}

/* Make AcroForm widgets visibly editable against scanned/flat backgrounds. */
.pdfViewer .annotationLayer .textWidgetAnnotation input,
.pdfViewer .annotationLayer .textWidgetAnnotation textarea,
.pdfViewer .annotationLayer .choiceWidgetAnnotation select {
    background-color: rgba(0, 84, 166, 0.06);
    outline: 1px solid rgba(0, 84, 166, 0.35);
}
.pdfViewer .annotationLayer .textWidgetAnnotation input:focus,
.pdfViewer .annotationLayer .textWidgetAnnotation textarea:focus,
.pdfViewer .annotationLayer .choiceWidgetAnnotation select:focus {
    background-color: rgba(0, 84, 166, 0.12);
    outline: 2px solid rgba(0, 84, 166, 0.7);
}

/* CrossBridge: red-highlight the required fields the user must resolve before submitting,
   so they're easy to find (strong outline + tinted fill + a brief attention pulse). */
.pdfViewer .annotationLayer .ofv-highlight {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
    border-radius: 2px;
    animation: ofv-pulse 1.1s ease-out 2;
}
.pdfViewer .annotationLayer .ofv-highlight-field,
.pdfViewer .annotationLayer .ofv-highlight input,
.pdfViewer .annotationLayer .ofv-highlight textarea,
.pdfViewer .annotationLayer .ofv-highlight select {
    background-color: rgba(220, 38, 38, 0.14) !important;
    outline: 2px solid #dc2626 !important;
}
@keyframes ofv-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
    100% { box-shadow: 0 0 0 9px rgba(220, 38, 38, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .pdfViewer .annotationLayer .ofv-highlight { animation: none; }
}
