/* lw-sign -- shared signing-surface vocabulary (Phase 10, 2026-07-28).
   No direct ledgerwise-app reference exists for the signing surfaces (the
   reference app stubbed/removed them), so this vocabulary is token-styled
   onto the shared design language. Extracted from the lien-release lr-*
   screens that were previously duplicated in
   Components/Modals/LienReleaseSigningModal.razor.css and
   Components/Pages/Public/LienReleaseSign.razor.css (spec measured there,
   2026-07-14). Consumers: LienReleaseSigningModal, Public/LienReleaseSign,
   ContractorAgreementSigningModal, SubcontractorAgreementSigningModal,
   SubcontractorAgreementClientSigningModal,
   PrimaryConstructionAgreementSigningModal, UploadPcaDocumentsModal,
   UploadPcaTemplateModal, AgreementsSign. */

/* ---- Centered pane (payment selection / status screens) ---- */
.lw-sign-pay {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.5rem 2.5rem;
}

/* ---- Header ---- */
.lw-sign-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.75rem;
}

.lw-sign-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--lw-status-success-bg, rgba(17, 141, 87, 0.12));
    color: var(--lw-status-success-fg, #118d57);
    margin-bottom: 0.875rem;
}

.lw-sign-head-icon--lg {
    width: 72px;
    height: 72px;
}

/* Brand-toned header icon for non-success intro steps. */
.lw-sign-head-icon--brand {
    background: var(--lw-status-primary-bg, rgba(57, 128, 165, 0.10));
    color: var(--lw-status-primary-fg, #3980A5);
}

/* Warning tone (expired links, funds not ready, bank attention). */
.lw-sign-head-icon--warn {
    background: var(--lw-status-warning-bg, rgba(255, 171, 0, 0.14));
    color: var(--lw-status-warning-fg, #B76E00);
}

/* Destructive tone (errors, declined). */
.lw-sign-head-icon--error {
    background: var(--lw-status-error-bg, rgba(255, 86, 48, 0.12));
    color: var(--lw-destructive, #B71D18);
}

.lw-sign-head-title {
    margin: 0;
    font-family: var(--lw-font-family-heading, sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lw-primary-dark, #020B2B);
    line-height: 1.3;
}

.lw-sign-head-sub {
    margin: 0.375rem 0 0;
    font-size: 0.9375rem;
    color: var(--lw-gray-graphite, #6E7180);
    line-height: 1.5;
    max-width: 52ch;
}

/* ---- Method grid ---- */
.lw-sign-method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 560px) {
    .lw-sign-method-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Method card ---- */
.lw-sign-method {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 1.25rem;
    text-align: left;
    background: var(--lw-white, #fff);
    border: 1.5px solid var(--lw-border);
    border-radius: 0.875rem;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
    font-family: inherit;
}

.lw-sign-method:hover {
    border-color: var(--lw-primary-blue, #3980A5);
    box-shadow: var(--lw-shadow-md, 0 4px 6px rgba(2, 11, 43, 0.1));
    transform: translateY(-2px);
}

.lw-sign-method:focus-visible {
    outline: 2px solid var(--lw-primary-blue, #3980A5);
    outline-offset: 2px;
}

.lw-sign-method--selected {
    border-color: var(--lw-primary-blue, #3980A5);
    background: var(--lw-status-primary-bg, rgba(57, 128, 165, 0.10));
    box-shadow: 0 0 0 1px var(--lw-primary-blue, #3980A5);
}

/* radio indicator (top-right) */
.lw-sign-radio {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--lw-gray-steel, #BCBFCC);
    background: transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.lw-sign-radio::after {
    content: "";
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--lw-white, #fff);
    transition: width 0.15s ease, height 0.15s ease;
}

.lw-sign-method--selected .lw-sign-radio {
    background: var(--lw-primary-blue, #3980A5);
    border-color: var(--lw-primary-blue, #3980A5);
}

.lw-sign-method--selected .lw-sign-radio::after {
    width: 8px;
    height: 8px;
}

/* method icon disc */
.lw-sign-method-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.lw-sign-method-icon--rtp {
    background: var(--lw-status-primary-bg, rgba(57, 128, 165, 0.10));
    color: var(--lw-status-primary-fg, #3980A5);
}

.lw-sign-method-icon--ach {
    background: var(--lw-status-info-bg, rgba(59, 130, 246, 0.12));
    color: var(--lw-status-info-fg, #1d4ed8);
}

.lw-sign-method-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lw-sign-method-name {
    font-family: var(--lw-font-family-heading, sans-serif);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--lw-primary-dark, #020B2B);
    line-height: 1.2;
}

.lw-sign-method-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 999px;
    background: var(--lw-status-neutral-bg, rgba(145, 158, 171, 0.16));
    color: var(--lw-gray-graphite, #6E7180);
}

.lw-sign-method-tag--fast {
    background: var(--lw-status-success-bg, rgba(17, 141, 87, 0.12));
    color: var(--lw-status-success-fg, #118d57);
}

.lw-sign-method-desc {
    font-size: 0.8125rem;
    color: var(--lw-gray-graphite, #6E7180);
    line-height: 1.5;
}

/* Payout amount block -- pinned to the bottom of the card so both cards align. */
.lw-sign-method-amount {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin-top: auto;
    padding-top: 0.75rem;
    width: 100%;
    border-top: 1px solid var(--lw-border);
}

.lw-sign-method-amount-value {
    font-family: var(--lw-font-family-heading, sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--lw-primary-dark, #020B2B);
    line-height: 1.2;
}

.lw-sign-method-amount-note {
    font-size: 0.75rem;
    color: var(--lw-gray-graphite, #6E7180);
}

.lw-sign-method-amount-note--free {
    color: var(--lw-status-success-fg, #118d57);
    font-weight: 600;
}

/* ---- Actions ---- */
.lw-sign-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

/* ---- Status screens (loading / processing / done / blocked) ---- */
.lw-sign-status-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}

/* ---- Header roundel for signing dialog titles ----
   Follows the .rim-roundel / .etm-roundel recipe (32px, info tint) so the
   BoldSign signing dialogs share one glyph treatment. */
.lw-sign-roundel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background: var(--lw-status-info-bg);
    color: var(--lw-primary-blue);
}

.lw-sign-roundel .mud-icon-root {
    width: 1rem;
    height: 1rem;
}

/* ---- Embedded signing stage (BoldSign iframe) ----
   Same recipe as .etm-frame (EditTemplateModal): the fullscreen lw-modal
   viewport minus the header band and the LwModalBody padding. */
.lw-sign-frame {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: calc(100vh - 120px);
}

.lw-sign-frame iframe {
    flex: 1;
    width: 100%;
    border: none;
}

/* ---- Signing-document dropzone (utm-/asim- recipe, de-scoped) ----
   Standard drag-and-drop + click-to-browse zone for agreement PDFs.
   Global (not scoped) because it serves several signing modals; selectors
   stay class-targeted per the no-bare-element policy. */

.lw-sign-dropwrap { position: relative; }

.lw-sign-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 32px;
    border: 2px dashed rgba(145, 158, 171, 0.32);
    border-radius: var(--lw-radius-sm);
    background: rgba(145, 158, 171, 0.08);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.lw-sign-dropwrap:hover .lw-sign-dropzone {
    border-color: var(--lw-primary-blue);
    background: color-mix(in srgb, var(--lw-primary-blue) 8%, transparent);
}

.lw-sign-drop-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    border-radius: var(--lw-radius-sm);
    background: color-mix(in srgb, var(--lw-primary-dark) 10%, transparent);
    color: var(--lw-primary-dark);
}

.lw-sign-drop-tile .mud-icon-root { width: 28px; height: 28px; }

.lw-sign-drop-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: var(--lw-font-semibold);
    color: var(--lw-text-primary);
}

.lw-sign-drop-sub { margin: 6px 0 0; font-size: 0.875rem; color: var(--lw-gray-graphite); }
.lw-sign-drop-browse { color: var(--lw-primary-blue); }
.lw-sign-dropwrap:hover .lw-sign-drop-browse { text-decoration: underline; text-underline-offset: 2px; }
.lw-sign-drop-hint { margin: 16px 0 0; font-size: 0.75rem; color: var(--lw-gray-space); }

/* Selected-file row (passive confirmation, no remove action). */
.lw-sign-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--lw-border);
    border-radius: var(--lw-radius-control);
    background: color-mix(in srgb, var(--lw-bg-muted) 30%, transparent);
}

.lw-sign-file .lw-sign-file-icon { width: 1.25rem; height: 1.25rem; color: var(--lw-filetype-pdf-fg); flex-shrink: 0; }
.lw-sign-file .lw-sign-file-check { width: 1.125rem; height: 1.125rem; color: var(--lw-status-success-fg); flex-shrink: 0; }

.lw-sign-file-name {
    min-width: 0;
    flex: 1;
    font-size: 0.875rem;
    font-weight: var(--lw-font-medium);
    color: var(--lw-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
