/* OrderCounter Sign — SHARED sender-side styles (global on purpose).
   The sign-badge classes used to live only in Templates.razor.css, which is SCOPED to the
   Templates component — SignInbox and SignEnvelopeMiniList referenced them and rendered
   unstyled plain text. One copy, loaded globally, per the no-third-duplicate rule
   (W3.7 / 11557-era review carry-forward). */

.sign-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.72rem;
              text-transform: uppercase; font-weight: 600; letter-spacing: 0.3px; }
.sign-badge-draft { background: var(--oc-gray-200); color: var(--oc-gray-600); }
.sign-badge-sent { background: var(--oc-info-bg); color: var(--oc-info-text); }
.sign-badge-viewed { background: var(--oc-info-bg); color: var(--oc-info-text); }
.sign-badge-partiallysigned { background: var(--oc-warning-bg); color: var(--oc-warning-text); }
.sign-badge-completed { background: var(--oc-success-bg); color: var(--oc-success-text); }
.sign-badge-voided { background: var(--oc-gray-200); color: var(--oc-gray-700); }
.sign-badge-expired { background: var(--oc-danger-bg); color: var(--oc-danger-text); }
.sign-badge-declined { background: var(--oc-danger-bg); color: var(--oc-danger-text); }

/* Needs-attention: the inbox's "this envelope is stuck" flag — bounced address, everyone
   signed but not finalized, or sitting unanswered past the stall window. */
.sign-badge-attention { background: var(--oc-danger-bg); color: var(--oc-danger-text); }

/* Per-signer trouble markers on the envelope detail page. */
.sign-signer-bounced { color: var(--oc-danger-text); font-size: 0.78rem; white-space: nowrap; }
.sign-signer-declined { color: var(--oc-danger-text); font-size: 0.78rem; }

/* Wide sign tables scroll inside their own container on narrow viewports instead of
   overflowing the page body. */
.sign-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sign-table-scroll > .oc-table { min-width: 640px; }

/* Webhook subscription health. A subscription the dispatcher switched off drops every event
   silently, so the ROW changes, not just a word in the State column - the point of the page is
   that a dead subscriber cannot look like a healthy one at a glance. */
.sign-webhook-dead > td { background: var(--oc-danger-bg); }
.sign-webhook-dead > td:first-child { box-shadow: inset 3px 0 0 var(--oc-danger-text); }
.sign-webhook-failing > td { background: var(--oc-warning-bg); }
.sign-webhook-off > td { opacity: 0.6; }

/* "Needs my signature" — the countersign section at the top of the Sign inbox. */
.sign-my-pending {
    background: var(--oc-info-bg);
    border: 1px solid #cfe2ff;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.sign-my-pending h4 { margin: 0 0 8px 0; font-size: 0.95rem; }
.sign-my-pending-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.sign-my-pending-row:first-of-type { border-top: 0; }
.sign-my-pending-info { display: flex; flex-direction: column; min-width: 0; }
.sign-my-pending-info .oc-help-text { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sign-my-pending-row .btn { min-height: 44px; white-space: nowrap; }

/* ── THE SIGNER TEST HARNESS ────────────────────────────────────────────────────────────
   Styled to look like scaffolding rather than product. The markup is compiled out of a
   Release build entirely (see SignDevTools), so these rules match nothing on live - they
   are here because splitting a dev-only stylesheet out would need a build-time exclusion
   of its own, and an unmatched selector costs nothing.

   Deliberately NOT pretty: a harness that looks like a shipped feature is one somebody
   eventually screenshots into a customer conversation. Only tokens already used by this
   stylesheet are referenced, so nothing new has to reach live's CSS for it to render. */
.sign-dev-harness-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: baseline;
    margin: 0 0 0.6rem;
    padding: 0.45rem 0.6rem;
    border: 1px dashed var(--oc-warning-text);
    border-radius: 4px;
    background: var(--oc-warning-bg);
    color: var(--oc-warning-text);
    font-size: 0.78rem;
    line-height: 1.35;
}
.sign-dev-harness-note.sign-dev-harness-off {
    border-color: var(--oc-gray-600);
    background: var(--oc-gray-200);
    color: var(--oc-gray-700);
}
.sign-dev-open-as { white-space: nowrap; border-style: dashed; }
