/* ============================================================
   EmbedPDF redaction viewer — adapter layout
   ------------------------------------------------------------
   Loaded ONLY when ?viewer=embedpdf (StartPage.cshtml branch).
   All shared app chrome (top bar, redaction panel, floating
   toolbar, property modal, finder panel) is styled by
   redaction.css. This file only sizes the EmbedPDF host and pins
   the scroll model. Shadow-DOM page, redaction-overlay and
   search-highlight styles are injected at runtime by the module.
   ============================================================ */

/* EmbedPDF mounts an <embedpdf-container> web component inside #viewer.
   It must fill the box; zoom and vertical scrolling happen inside its
   shadow-DOM viewport, not in the light-DOM wrapper. */
#viewer embedpdf-container {
    display: block;
    width: 100%;
    height: 100%;
}

/* The light-DOM scroll wrapper must not scroll independently: EmbedPDF
   owns scrolling inside its shadow root. This prevents double scrollbars
   and keeps the drawing-rect coordinate math (viewerContainer scroll = 0)
   stable. */
#viewerContainer {
    overflow: hidden;
}

/* The draw-tool crosshair belongs on the rendered page (the adapter sets the
   shadow-DOM page-image cursor via syncDrawCursor()), not on the container
   margin. The engine otherwise leaves a crosshair on the margin when
   mask/pseudo is active. */
#viewerContainer.sf-draw-tool {
    cursor: auto;
}

/* The adapter-built zoom menu reuses the shared .ap-zoom-* classes from
    redaction.css (single column, 13 presets + fit/marquee). It is uncapped;
    the column is short enough to fit a normal viewport when anchored just
    below the #apZoomDisplay trigger. */

#findInputWrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

#findInputWrap #findInput {
    width: 100%;
    padding-right: 30px;
}

#findClearButton {
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--icon, #6b7280);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

#findClearButton:hover {
    background: rgba(100, 116, 139, 0.14);
    color: var(--icon-hover, #374151);
}

#findClearButton:focus-visible {
    outline: 2px solid var(--focus, #1e88e5);
    outline-offset: 1px;
}

#findClearButton i.lucide,
#findClearButton svg {
    width: 16px;
    height: 16px;
}

#findClearButton[hidden] {
    display: none !important;
}
