/* ================================================================
   SIGNATURE MODAL
================================================================ */

#modal-signature .modal {
  max-width: 38rem;
  width: calc(100vw - 2rem);
}

.sig-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* Signer toggle row (You / Client) */
.sig-signer-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.sig-signer-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer;
  font-size: 0.875rem;
  user-select: none;
}
.sig-signer-toggle input { margin: 0; }
.sig-signer-toggle:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--ink);
}

/* Capture-method tabs (Type / Draw / Upload) */
.sig-input-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.sig-input-tab {
  background: none;
  border: none;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t), border-color var(--t);
}
.sig-input-tab:hover { color: var(--ink); }
.sig-input-tab.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.sig-input-pane.hidden { display: none; }

/* Capture canvases share a frame so all three methods feel consistent */
.sig-canvas-frame {
  position: relative;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  height: 11rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sig-canvas-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.sig-canvas-hint {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.7rem;
  color: var(--muted);
  pointer-events: none;
  font-style: italic;
}
.sig-canvas-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

/* Upload-photo specific bits */
.sig-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  background: var(--surface);
}
.sig-upload-zone:hover {
  border-color: var(--gold);
  background: var(--gold-bg);
}
.sig-upload-zone svg { color: var(--gold); }
.sig-upload-zone-title { font-size: 0.875rem; font-weight: 500; color: var(--ink); }
.sig-upload-zone-sub { font-size: 0.75rem; color: var(--muted); }
.sig-upload-zone input[type=file] { display: none; }

/* Status / error banners */
.sig-status {
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-radius: var(--r-md);
  margin-bottom: 0.75rem;
}
.sig-error-banner {
  font-size: 0.8125rem;
  color: var(--danger);
  padding: 0.5rem 0.75rem;
  background: rgba(192,57,43,0.06);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--r-md);
  margin-bottom: 0.75rem;
}

/* Make the typed-signature canvas use the cursive web font properly */
.sig-typed-name-input {
  margin-bottom: 0.6rem;
}
