/* Signature images (signature.php, includes/sign_sheet.php, request.php history). The ink is dark blue, so the
   pad and every stamp sit on white, like paper, also in dark mode. */
.sign-pad-box { position: relative; height: 150px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.sign-pad-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; border-radius: var(--radius-sm); cursor: crosshair; }
.sign-pad-line { position: absolute; left: 16px; right: 16px; bottom: 34px; border-bottom: 1px dashed #b9c0c8; pointer-events: none; }
.sign-pad-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.sign-pad-clear { padding: 0; font-size: 14px; color: var(--navy); }
.sign-image-mine { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; text-align: center; }
.sign-image-mine img { max-height: 80px; max-width: 100%; }
.sign-image-row { margin-bottom: 12px; }
.sig-page-text { font-size: 14px; color: var(--ink-muted); }

.tl-sig { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.tl-sig img { height: 48px; max-width: 180px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 2px 6px; }
.tl-sig-state { font-size: 12px; }
.tl-sig-state.ok { color: var(--success); }
.tl-sig-state.warn { color: var(--warning); }
.tl-sig-state.bad { color: var(--danger); font-weight: 600; }
.tl-sig.is-bad img { opacity: 0.45; }

/* Drawing must not select the words and fields around the pad (user 2026-11-11): the pad and its labels never
   select; while a stroke is being drawn (html.is-signing, set by the pad's script) nothing on the page does. */
.sign-pad-box, .sign-pad-foot, .sign-image-row .apply-label, .apply-card:has(.sign-pad-box) .apply-label { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.is-signing, html.is-signing * { -webkit-user-select: none !important; user-select: none !important; -webkit-touch-callout: none; }

/* Signature images on the paper form's lines (request.php): the image sits on the line, who and when under it. */
.paper-signature.has-sig { font-family: inherit; font-size: inherit; padding-top: 2px; }
.paper-sig-img { display: block; height: 46px; max-width: 100%; object-fit: contain; object-position: left bottom; }
.paper-sig-img.is-bad { opacity: 0.45; }
.paper-sig-meta { display: block; font-family: var(--font-sans, inherit); font-size: 10.5px; line-height: 1.35; color: #444; margin-top: 2px; }
.paper-sig-state { white-space: nowrap; }
.paper-sig-state.ok { color: #146c43; }
.paper-sig-state.warn { color: #7a6000; }
.paper-sig-state.bad { color: #dc0016; font-weight: 600; }
/* A signed line in the narrow approval columns: the label above, the signature across the whole column. */
.paper-row:has(> .has-sig) { display: block; }
.paper-row:has(> .has-sig) > span { display: block; margin-bottom: 2px; }
.paper-row > .has-sig .paper-sig-meta { overflow-wrap: normal; }

/* Face ID / Touch ID signing in the iPhone app (includes/sign_sheet.php, settings.php) */
.sign-bio-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sign-bio-text { margin: 0; color: var(--ink-muted); font-size: 14px; }
.sign-bio-text i { color: var(--heading-accent); margin-right: 4px; }
.sign-bio-pw { padding: 0; font-size: 14px; white-space: nowrap; }
.device-key-note { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 12px; }
.device-key-form { padding: var(--space-3) var(--space-5) var(--space-4); border-top: 1px solid var(--line); }
.device-key-form .field { display: block; margin-bottom: var(--space-3); }
.device-key-form .form-control { width: 100%; }
.device-key-buttons { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-3); }
.device-key-buttons .btn-strive { width: auto; min-width: 120px; margin: 0; }
.device-key-remove { padding: 0; font-size: 14px; }
.sig-renew { display: inline-flex; align-items: center; gap: 6px; padding: 0; margin-top: var(--space-3); font-weight: 700; }
.sign-pad-box.is-paused { opacity: .6; }
/* A text field has focus (js/app.js): no bottom menu over the keyboard */
html.kb-open .bottom-nav { display: none; }
