/* Reading an emailed order (PDF or screenshots) into a SKU list with Claude: the shared pieces used
   by the PO Generator's list modal and the Customer Pricing Worksheet's modals.
   Components: Components/Shared/SkuListReadButton.razor and SkuListReadReport.razor; the dimmed
   "Reading…" overlay is the host's markup (.sku-read-busy inside a .sku-read-host). Global, not
   per page, so the two hosts cannot drift apart. */

/* ── "Read from PDF or Images…": a button that is really a file input ── */
.sku-read-btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.sku-read-btn.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.sku-read-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

/* ── Drag and drop onto a zone (SkuListDropZone) ──
   app.setupFileDropZone (js/shared.js) takes the drop on the zone and hands the files to the
   button's input; it sets .drag-over while a file is over the zone and the input is enabled. */
.sku-read-drop-target {
    position: relative;
    border-radius: 12px;
}

.sku-read-drop-target.drag-over {
    box-shadow: 0 0 0 3px rgba(27, 110, 194, 0.18);
}

.sku-read-drop-hint {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    text-align: center;
    background: rgba(238, 244, 251, 0.88);
    border-radius: inherit;
    color: #1d4f8a;
    font-size: 1.05rem;
    font-weight: 600;
    pointer-events: none;
}

.sku-read-drop-hint .e-icons {
    font-size: 1.4rem;
}

.sku-read-drop-target.drag-over > .sku-read-drop-hint {
    display: flex;
}

/* ── While Claude reads: the host modal dims under a spinner ── */
.sku-read-host {
    position: relative;
}

.sku-read-busy {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(1px);
    border-radius: 18px;
}

.sku-read-busy .spinner-border {
    width: 2.4rem;
    height: 2.4rem;
    color: #1b6ec2;
}

.sku-read-busy .sku-read-meta {
    max-width: 420px;
}

/* ── The report under the paste box ── */
.sku-read-report {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 14px;
    border-top: 1px solid #e9ecef;
    background: #fcfdff;
    font-size: 0.82rem;
}

.sku-read-report-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.sku-read-warning {
    color: #7a5410;
}

.sku-read-meta {
    font-size: 0.82rem;
    color: #475569;
}

.sku-read-grow {
    flex: 1 1 auto;
}

.sku-read-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}

.sku-read-pill--ok { background: #dcf0e4; color: #17603b; }
.sku-read-pill--warn { background: #fbefd2; color: #7a5410; }
.sku-read-pill--bad { background: #f9dede; color: #9f1f1f; }
.sku-read-pill--acc { background: #e6effa; color: #1d4f8a; }

.sku-read-x {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sku-read-x:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}
