/* ── Signature pad (SHARED) ───────────────────────────────────────────────────
   Ask Caleb Tech LLC

   Moved verbatim out of driver-app/css/app.css (Aug 2026) when the Time Off
   Request view needed the same pad in BOTH apps. Loaded before each app's own
   app.css, so an app-specific override still wins on equal specificity.

   The touch-action chain is load-bearing and was arrived at the hard way on
   real iPads: wrap = auto, overlay = pan-y, canvas = none. Putting
   touch-action:none on an ancestor blocks scrolling over a LOCKED pad, which
   traps the page. Do not "simplify" it. Depends on the host app's palette
   custom properties (--border, --mid-gray, --error).
   ───────────────────────────────────────────────────────────────────────── */
.signature-wrap {
  position: relative;   /* anchors the tap-to-sign overlay */
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  overflow: hidden;
  /* Full width. Scroll-vs-draw is solved by the locked-by-default
     "Tap to sign" overlay (built in createSignaturePad): while locked,
     vertical pans pass through the overlay and scroll the page.
     touch-action:none lives on the canvas ONLY — on an ancestor it
     would still block scrolling over a locked pad. */
}
.signature-wrap canvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
  background: white;
  touch-action: none;
}
/* ── Tap-to-sign overlay ──
   Covers a locked pad. Fully transparent (never obscures preloaded ink);
   the small centered pill is the only affordance. pan-y lets vertical
   scrolls pass through and kills double-tap zoom on the unlocking tap.
   Hidden via the [hidden] attribute while the pad is unlocked. */
.signature-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.signature-overlay .overlay-pill {
  font-size: 13px;
  color: var(--mid-gray);
  background: rgba(249, 247, 245, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  pointer-events: none;   /* taps land on the overlay button, not the span */
}
.signature-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.signature-actions .clear-btn {
  background: none;
  border: none;
  color: var(--mid-gray);
  font-size: 13px;
  text-decoration: underline;
  padding: 6px 0;
  cursor: pointer;
  touch-action: manipulation;   /* fast repeat taps must not zoom (iPad) */
}
.signature-error {
  color: var(--error);
  font-size: 13px;
  font-weight: bold;
  margin: 8px 0 0;
  display: none;
}
