/* The friendly inventory dialogs' shared pieces — Put away, Issue to job and Return to stock (inventory jobs update spec "UI": both wear
   the friendly register as a deliberate exception to owner J3). Moved here from PutAwayDialog.razor.css so a second
   dialog can wear them: the body, the header line, the chooser row, inputs and buttons, the table, and the held-for
   chips. Every selector is gated to .stock-modal (the InventoryModal shell), so a pa- class elsewhere in the app —
   Measure's pa-btn — is never touched. Linked BEFORE BlazorApp1.styles.css: a dialog's own scoped rule of equal weight
   (the put-away cost input, the add-attribute select) still wins, as it did when both lived in one file.
   --app-* tokens only; sans body with the monospace stack for codes, counts and money. Text is never clipped. */

.stock-modal .pa-body {
    max-height: 72vh;
    overflow-y: auto;
    overflow-wrap: anywhere;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stock-modal .pa-mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Header line (rendered into the shell's title block) ─────────────────── */

.stock-modal .pa-sub {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12px;
    font-weight: 400;
    color: var(--app-text-label);
}

.stock-modal .pa-sub-dot { color: var(--app-text-label); }

.stock-modal .pa-link {
    border: 0;
    padding: 0;
    background: none;
    font-size: inherit;
    color: var(--app-info);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.stock-modal .pa-link:disabled { opacity: 0.5; cursor: default; }

/* ── The chooser row (put-away destination, issue job) ───────────────────── */

.stock-modal .pa-dest {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-modal .pa-dest-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--app-text-label);
}

.stock-modal .pa-dest-row {
    display: flex;
    gap: 8px;
}

.stock-modal .pa-select,
.stock-modal .pa-input {
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--app-input-border);
    border-radius: 8px;
    background: var(--app-input-bg);
    color: var(--app-input-text);
    font-size: 13px;
}

.stock-modal .pa-select { flex: 1 1 auto; min-width: 0; }

.stock-modal .pa-select:focus-visible,
.stock-modal .pa-input:focus-visible,
.stock-modal .pa-btn:focus-visible,
.stock-modal .pa-check:focus-visible {
    outline: 2px solid var(--app-focus-border);
    outline-offset: 1px;
}

.stock-modal .pa-input::placeholder { color: var(--app-input-placeholder); }

.stock-modal .pa-scan-input { width: 100%; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.stock-modal .pa-btn {
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--app-border-strong);
    border-radius: 8px;
    background: var(--app-surface-raised);
    color: var(--app-text-strong);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.stock-modal .pa-btn:hover:not(:disabled) { background: var(--app-surface-hover); }
.stock-modal .pa-btn:disabled { opacity: 0.5; }

.stock-modal .pa-btn-primary {
    border-color: transparent;
    background: var(--app-accent-fill);
    color: var(--app-on-accent);
}

.stock-modal .pa-btn-warn { color: var(--app-warn-text); }

.stock-modal .pa-btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* ── The table ───────────────────────────────────────────────────────────── */

.stock-modal .pa-table {
    border: 1px solid var(--app-border-hairline);
    border-radius: 10px;
    overflow-x: auto;   /* narrow windows scroll the table; nothing is cut off */
    overflow-y: hidden;
}

/* One class heavier than a dialog's own row grid (put-away's .pa-grid sets the row padding), so the header row keeps its
   tighter padding now that the two rules live in different files. */
.stock-modal .pa-table .pa-thead {
    padding-top: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--app-border-hairline);
    background: var(--app-surface-sunken);
}

.stock-modal .pa-th {
    font-size: 12px;
    font-weight: 500;
    color: var(--app-text-label);
}

.stock-modal .pa-line { border-top: 1px solid var(--app-border-hairline); }
.stock-modal .pa-thead + .pa-line { border-top: 0; }

.stock-modal .pa-check {
    width: 15px;
    height: 15px;
    accent-color: var(--app-accent-fill);
}

.stock-modal .pa-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--app-text-strong);
}

.stock-modal .pa-rowsub {
    font-size: 12px;
    color: var(--app-text-label);
}

.stock-modal .pa-c-num { text-align: right; justify-self: end; font-size: 13px; }

/* ── Held-for chips ──────────────────────────────────────────────────────── */

.stock-modal .pa-chip {
    display: inline-block;
    max-width: 100%;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    overflow-wrap: anywhere;   /* long job names wrap — text is never clipped (owner hard rule) */
}

.stock-modal .pa-chip.is-job {
    background: var(--app-accent-tint);
    border: 1px solid var(--app-accent-border);
    color: var(--app-text-strong);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.stock-modal .pa-chip.is-muted {
    background: var(--app-surface-sunken);
    border: 1px solid var(--app-border-hairline);
    color: var(--app-text-label);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.stock-modal .pa-foot-note {
    margin-right: auto;
    align-self: center;
    font-size: 12px;
    color: var(--app-text-label);
}

/* ── Sections and the working card (Issue to job, Return to stock) ─────────
   Moved from IssueToJobDialog.razor.css when Return to stock took them up; they keep the ij- names they were born
   with, as the pa- pieces keep put-away's. Last in the file: the card's quantity input must beat .pa-input. */

.stock-modal .ij-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stock-modal .ij-section-title {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--app-text-strong);
}

.stock-modal .ij-pull {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--app-border-hairline);
    border-radius: 8px;
    background: var(--app-surface-sunken);
}

.stock-modal .ij-pull-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    font-size: 13px;
}

.stock-modal .ij-pull-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.stock-modal .ij-qty { width: 110px; text-align: right; }

.stock-modal .ij-pull-actions {
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
}

.stock-modal .ij-log {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
