/* ============================================================
   PDF Editor — Whiteout tool (covers, float chrome reuse)
   ============================================================ */

.pedit-whiteouts-layer {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 22; /* above text/preview, below shapes (25) */
    pointer-events: none;
    overflow: visible;
}

.pedit-whiteouts-layer.is-drawing,
.pedit-whiteouts-layer.has-selection {
    pointer-events: auto;
}

.pedit-whiteout {
    position: absolute;
    box-sizing: border-box;
    pointer-events: auto;
    cursor: move;
    touch-action: none;
    background: #ffffff;
}

/* Add Text mode: let clicks pass through covers so text can be placed on top. */
.pdf-canvas-wrap.add-text-mode .pedit-whiteouts-layer,
.pdf-canvas-wrap.add-text-mode .pedit-whiteout,
.pdf-canvas-wrap.add-text-mode .pedit-whiteout-handle {
    pointer-events: none !important;
}
.pdf-canvas-wrap.add-text-mode .pedit-shapes-layer,
.pdf-canvas-wrap.add-text-mode .pedit-shape,
.pdf-canvas-wrap.add-text-mode .pedit-images-layer .pedit-image {
    pointer-events: none !important;
}

.pedit-whiteout.is-selected {
    /* Inset chrome — an outside outline made the visible edge sit above the
       true white fill, so download leaked glyph tops the preview appeared to cover. */
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(247, 145, 18, 0.9);
}

/* Live draw preview — dashed border so user sees drag size on white pages */
.pedit-whiteout.is-drawing-preview {
    background: rgba(255, 255, 255, 0.72) !important;
    border: none !important;
    outline: none;
    box-shadow: inset 0 0 0 2px #f79112;
}

.pedit-whiteout-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    margin-top: -5px;
    background: #fff;
    border: 2px solid #f79112;
    border-radius: 2px;
    box-sizing: border-box;
    z-index: 2;
    pointer-events: auto;
    touch-action: none;
}

.pedit-whiteout-handle[data-handle="nw"] { cursor: nwse-resize; }
.pedit-whiteout-handle[data-handle="se"] { cursor: nwse-resize; }
.pedit-whiteout-handle[data-handle="ne"] { cursor: nesw-resize; }
.pedit-whiteout-handle[data-handle="sw"] { cursor: nesw-resize; }
.pedit-whiteout-handle[data-handle="n"],
.pedit-whiteout-handle[data-handle="s"] { cursor: ns-resize; }
.pedit-whiteout-handle[data-handle="e"],
.pedit-whiteout-handle[data-handle="w"] { cursor: ew-resize; }

#pedit-canvas-wrap.whiteout-draw-mode {
    cursor: crosshair;
}

#pedit-canvas-wrap.whiteout-draw-mode .pedit-text-hit {
    pointer-events: none !important;
}

/* Reuse shapes float-toolbar look; whiteout-specific tweaks */
.sft-stroke-preview.sft-stroke-none {
    width: 14px;
    height: 0 !important;
    border-top: 2px dashed currentColor;
    background: transparent !important;
    opacity: 0.55;
}

.sft-stroke-item-none {
    font-size: 0.72rem;
    font-weight: 700;
    color: #4a90e2;
    letter-spacing: 0.02em;
}
