/**
 * BoldForm Pro — Signature Field Frontend Styles
 *
 * Styles the canvas-based signature pad rendered by the signature field module.
 * CSS custom properties inherit from the BoldForm Lite theme so the widget
 * automatically matches the active form skin.
 *
 * @package BoldFormPro
 */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */

.bf-signature-wrap {
	position: relative;
	width: 100%;
	border: 1.5px solid var( --bf-field-border, #d1d5db );
	border-radius: var( --bf-field-radius, 8px );
	overflow: hidden;
	background: #fff;
	transition: border-color 0.15s ease;
}

/* Focused state — matches other BoldForm fields. */
.bf-signature-wrap:focus-within {
	border-color: var( --bf-focus-color, #0f766e );
	outline: 0;
	box-shadow: 0 0 0 3px rgba( 15, 118, 110, 0.15 );
}

/* Signed state — accent border indicates captured data. */
.bf-signature-wrap.has-sig {
	border-color: var( --bf-focus-color, #0f766e );
}

/* Invalid / validation-error state. */
.bf-signature-wrap.bf-field-invalid,
.boldform-lite-form__field--error .bf-signature-wrap {
	border-color: var( --bf-error-color, #ef4444 );
}

/* ── Canvas ───────────────────────────────────────────────────────────────── */

.bf-sig-canvas {
	display: block;
	width: 100%;
	touch-action: none;
	cursor: crosshair;
}

/* ── Toolbar ──────────────────────────────────────────────────────────────── */

.bf-sig-toolbar {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	padding: 6px 10px;
	border-top: 1px solid #e2e8f0;
	background: #f8fafc;
}

/* ── Clear button ─────────────────────────────────────────────────────────── */

.bf-sig-clear {
	padding: 2px 6px;
	font-size: 12px;
	line-height: 1.4;
	color: #64748b;
	border: none;
	background: transparent;
	cursor: pointer;
	border-radius: 4px;
	transition: color 0.12s ease, background-color 0.12s ease;
}

.bf-sig-clear:hover {
	color: #ef4444;
	background-color: #fef2f2;
}

.bf-sig-clear:focus-visible {
	outline: 2px solid var( --bf-focus-color, #0f766e );
	outline-offset: 1px;
}
