/* The page viewer and placement layer shared by Sign PDF, Edit PDF and Fill form (static/js/pdf-workspace.js) */
.ws-thumb { display: block; width: 100%; padding: 4px; background: none; border: 2px solid transparent; border-radius: 6px; cursor: pointer; color: var(--text-secondary); font-size: var(--text-xs); text-align: center; }
.ws-thumb canvas { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.ws-thumb.is-current { border-color: var(--color-primary); color: var(--text-primary); }
.ws-page { position: relative; flex: none; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.ws-page canvas { display: block; width: 100%; height: 100%; }
.ws-page-label { position: absolute; top: -1.4rem; left: 0; font-size: var(--text-xs); color: var(--text-secondary); }
.ws-layer { position: absolute; inset: 0; }

/* Placed items */
.ws-item {
	position: absolute; touch-action: none; cursor: move; user-select: none;
	outline: 1px dashed rgba(13, 63, 191, .55); outline-offset: 0;
}
/* A larger hit area than the item, so small items can be grabbed with a finger */
.ws-item::before { content: ''; position: absolute; inset: -10px; }
.ws-content { position: absolute; inset: 0; pointer-events: none; }
.ws-content img, .ws-content svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
/* Text is laid out at its size in points and scaled with the page, so phones' minimum
   font sizes and text autosizing cannot make it wider than it will print */
.ws-text {
	position: absolute; left: 0; top: 0; display: block; white-space: pre; transform-origin: 0 0;
	font-family: 'Sign Noto Sans', sans-serif; line-height: 1.362;
	-webkit-text-size-adjust: none; text-size-adjust: none;
}
.ws-item.is-selected, .ws-item:focus-visible { outline: 2px solid #0d3fbf; z-index: 2; }
.ws-handle {
	position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; padding: 0;
	background: #0d3fbf; border: 2px solid #fff; border-radius: 50%; cursor: nwse-resize; touch-action: none;
}
.ws-actions { position: absolute; top: -30px; right: -2px; display: none; gap: 4px; }
.ws-item.is-selected .ws-actions { display: flex; }
.ws-actions button {
	width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
	background: #0d3fbf; color: #fff; font-size: 13px; line-height: 26px;
}
.ws-badge { position: absolute; left: 0; bottom: -18px; font-size: 10px; color: #0d3fbf; white-space: nowrap; pointer-events: none; }

/* Touch screens: Duplicate and Delete live in the panel only, so a finger on a small item
   is not pulled towards them, and the resize handle is easier to grab */
@media (pointer: coarse) {
	.ws-item.is-selected .ws-actions { display: none; }
	.ws-handle { width: 24px; height: 24px; right: -28px; bottom: -28px; }
}
/* Phones: one page at a time */
@media (max-width: 900px) {
	.ws-page:not(.is-current) { display: none; }
}
