/* Order numbers as links, and the order pop-up (js/orderpop.js). Uses the shared .swscrim / .swdlg dialog frame. */
.ordlink { display: inline; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: var(--blue-btn); text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; }
.ordlink:hover, .ordlink:focus-visible { text-decoration-style: solid; }
.orddlg.swdlg { top: 5vh; width: min(760px, calc(100% - 32px)); max-height: 90vh; overflow-y: auto; overscroll-behavior: contain; }
.ordhd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ordhd h2 { margin: 0; }
.ordsrc { margin: 2px 0 14px; }
.ordfacts { margin-bottom: 14px; }
.ordfacts dd { overflow-wrap: anywhere; }
.ordmiss { padding: 12px 0; }
.ordtw { overflow-x: auto; }
.ordt { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ordt th, .ordt td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--divider); }
.ordt th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.ordt .n { text-align: right; white-space: nowrap; }
.ordt .ordsect td { padding-top: 14px; font-weight: 700; color: var(--muted); border-bottom: 0; }
.ordcode, .ordmemo, .ordcl { display: block; font-size: 0.8125rem; color: var(--muted); }
.ordcl a { color: inherit; }
.ordt tfoot td { border-bottom: 0; padding-top: 4px; padding-bottom: 4px; color: var(--muted); }
.ordt tfoot .ordtot td { color: inherit; font-weight: 700; border-top: 1px solid var(--divider); padding-top: 8px; }
@media (max-width: 640px) {
  .orddlg.swdlg { top: auto; bottom: 0; left: 0; right: 0; width: auto; transform: none; border-radius: 16px 16px 0 0; max-height: 92vh; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* Repair form dialog (repairform.js) */
.rpdlg { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; }
.rpdlg h2 { margin: 0 0 4px; }
.rpdlg fieldset { border: 0; padding: 0; margin: 14px 0 0; }
.rpdlg legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.rprow { display: flex; gap: 8px 18px; }
.rprow.wrap { flex-wrap: wrap; }
.rprow .chkl { display: inline-flex; align-items: center; gap: 6px; }
.rpother, .rpcar { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.rpother[hidden], .rpcar[hidden] { display: none; }
.rpdlg .ferr { color: var(--red); font-size: var(--fs-14); margin: 4px 0 0; min-height: 0; }
.rpdlg .ferr:empty { display: none; }
.rpdlg .formact { margin-top: 18px; }

/* Order finder and Concord customer card (concordfind.js) */
.ofdlg.swdlg { top: 6vh; width: min(640px, calc(100% - 32px)); max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; }
.ofind { display: flex; flex-direction: column; gap: 10px; }
.ofmodes { display: flex; flex-wrap: wrap; gap: 6px; }
.ofmode { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--input-strong, var(--line)); border-radius: var(--r-pill, 999px); font-size: 0.875rem; cursor: pointer; color: var(--ink); background: var(--surface); }
.ofmode input { position: absolute; opacity: 0; pointer-events: none; }
.ofmode.on { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 600; }
.ofmode:has(input:focus-visible) { outline: 2px solid var(--blue-btn); outline-offset: 2px; }
.ofrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.ofrow .searchbar { flex: 1 1 220px; margin: 0; }
.ofcust { flex: 0 1 190px; min-height: 44px; padding: 0 12px; border: 1px solid var(--input-strong, var(--line)); border-radius: var(--r-ctl, 10px); background: var(--surface); color: var(--ink); font: inherit; }
.ofres:empty { display: none; }
.ofhits { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card, 12px); }
.ofhit { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.ofhit + .ofhit { border-top: 1px solid var(--line); }
.ofhitt { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ofhitt small { flex-basis: 100%; color: var(--muted); font-size: 0.8125rem; }
.ofpo { font-size: 0.875rem; color: var(--grey-ink, var(--ink)); overflow-wrap: anywhere; }
.ofhita { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ofmsg { margin: 4px 0 0; }
.ofmsg.bad { color: var(--red); }
.cfwait { display: flex; align-items: center; gap: 10px; padding: 10px 2px; color: var(--muted); font-size: 0.9375rem; }
.cfwait .mas { flex-shrink: 0; width: 40px; height: 40px; }
.offindlink { margin-top: 4px; font-size: 0.8125rem; }
.cudlg .acct { margin-top: 6px; }
.kwait { list-style: none; padding: 6px 14px; }
@media (max-width: 640px) {
  .ofdlg.swdlg { top: auto; bottom: 0; left: 0; right: 0; width: auto; transform: none; border-radius: 16px 16px 0 0; max-height: 92vh; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .ofhit { flex-direction: column; align-items: stretch; }
  .ofhita { justify-content: space-between; }
  .ofcust { flex-basis: 100%; }
}
.offindlink { display: inline-flex; align-items: center; gap: 4px; }
.ofwhy { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill, 999px); background: var(--chip-bg, rgba(0,0,0,.06)); color: var(--grey-ink, var(--ink)); }
.ofwhy.alt { background: color-mix(in srgb, var(--blue-btn) 14%, transparent); color: var(--blue-btn); }

/* Order number fields: Concord's matches under the field as you type (concordfind.js, data-cof) */
.cofsug { margin-top: 6px; }
.cofsug p { margin: 4px 0; }
.cofhits { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.cofhits li + li { border-top: 1px solid var(--line); }
.cofhit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; padding: 10px 12px; background: none; border: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.cofhit:hover, .cofhit:focus-visible { background: var(--divider); }
.cofhit small { flex-basis: 100%; color: var(--muted); }

/* Order lookup (15 Oct 2026): the sandbox notice, what the portal already has for an order, and the "start from this order" buttons */
.ofsand { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--ph-ap-bg, #FFF1D6); color: var(--ph-ap, #8A5A00); }
.ofsand b { font-weight: 700; }
.ordh3 { margin: 18px 0 6px; font-size: 0.9375rem; }
.ordhasl { list-style: none; margin: 0; padding: 0; }
.ordhasl li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 6px 0; }
.ordhasl li + li { border-top: 1px solid var(--divider, var(--line)); }
.ordhasl span { color: var(--muted); font-size: 0.875rem; }
.ordraise { display: flex; flex-wrap: wrap; gap: 8px; }
.ordraise .btn.busy { opacity: 0.7; cursor: progress; }
.ordacts { flex-direction: column; align-items: stretch; }
.ordclose { display: flex; justify-content: flex-end; margin-top: 14px; }
@media (max-width: 640px) {
  .ordraise .btn { flex: 1 1 100%; justify-content: center; }
  .ordclose .btn { width: 100%; justify-content: center; }
}
