/**
 * Signing and sharing kit (signkit.js). Shared by esign, gate and share-page;
 * the other two import this file.
 */

.bsx-seg {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.bsx-seg legend { width: 100%; margin-block-end: 8px; padding: 0; }
.bsx-seg__opt { position: relative; }
.bsx-seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bsx-seg__opt label {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid var(--bsx-line-2);
	border-radius: 999px;
	background: var(--bsx-raised);
	font-size: 0.875rem;
	font-weight: 650;
	cursor: pointer;
	transition: transform 160ms var(--bsx-ease), opacity 160ms var(--bsx-ease);
}
.bsx-seg__opt label:hover { transform: translateY(-1px); }
.bsx-seg__opt label:active { opacity: 0.85; }
.bsx-seg__opt input:checked + label { border-color: var(--bsx-brand); background: var(--bsx-brand-soft); color: var(--bsx-ink); box-shadow: inset 0 0 0 1px var(--bsx-brand); }
.bsx-seg__opt input:checked + label::before { content: "✓"; margin-inline-end: 6px; color: var(--bsx-brand-ink); }
.bsx-seg__opt input:focus-visible + label { outline: 2px solid var(--bsx-brand); outline-offset: 2px; }

.bsx-sig { display: grid; gap: 14px; }
.bsx-sigpanel { display: grid; gap: 12px; }
.bsx-sigpanel[hidden] { display: none; }
.bsx-sigpanel .bsx-actions .bsx-field { min-width: 160px; }
.bsx-pad--preview { display: grid; place-items: center; min-height: 140px; }
.bsx-sigpreview { display: block; width: 100%; height: auto; max-height: 200px; }

.bsx-place { display: grid; gap: 18px; }

@media (min-width: 720px) {
	.bsx-place { grid-template-columns: minmax(0, 1fr) 200px; align-items: start; }
}

.bsx-place__controls { display: grid; gap: 12px; }
.bsx-place__preview { display: grid; justify-items: center; }

.bsx-place__sheet {
	position: relative;
	width: 100%;
	max-width: 200px;
	aspect-ratio: 595 / 842;
	padding: 0;
	border: 1px solid var(--bsx-line-2);
	border-radius: 4px;
	background:
		repeating-linear-gradient(180deg, transparent 0 14px, var(--bsx-sunken) 14px 16px) 16px 22px / calc(100% - 32px) 60% no-repeat,
		#fff;
	box-shadow: var(--bsx-shadow-2);
	cursor: crosshair;
}

.bsx-place__sheet:focus-visible { outline: 2px solid var(--bsx-brand); outline-offset: 3px; }

.bsx-place__mark {
	position: absolute;
	border: 2px dashed var(--bsx-brand);
	border-radius: 3px;
	background: color-mix(in srgb, var(--bsx-brand) 18%, transparent);
	pointer-events: none;
}

.bsx-range { width: 100%; accent-color: var(--bsx-brand); cursor: pointer; }

.bsx-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.bsx-sharelink__qr { width: 168px; height: 168px; padding: 8px; border: 1px solid var(--bsx-line); border-radius: var(--bsx-radius-sm); background: #fff; image-rendering: pixelated; }

.bsx-countdown { font-variant-numeric: tabular-nums; color: var(--bsx-muted); }
.bsx-share-message { margin: 0; padding: 12px 16px; border-inline-start: 3px solid var(--bsx-brand); background: var(--bsx-sunken); border-radius: 0 var(--bsx-radius-sm) var(--bsx-radius-sm) 0; white-space: pre-line; line-height: 1.6; }
