/* The parcel sheet (web/parcel-sheet.js): one bottom sheet for a tapped parcel on a phone (U1, 2026-10-16). */

/* Reference codes (file paths, confidence codes, CRS, refs, market codes) stay out of the owner's view; the Admin
   "Show reference codes" setting (U4) adds body.show-ref-codes. */
.ref-code { display: none; }
body.show-ref-codes .ref-code { display: inline; }

.ps { display: none; }
.ps-toast[hidden] { display: none !important; }

/* The toast: what a save did and its next steps. Above the sheet and the drawer, on every width. */
.ps-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 1700; max-width: min(560px, calc(100vw - 32px));
  background: var(--ink, #1a1a1a); color: #fff; border-radius: 10px; padding: 10px 14px; box-shadow: 0 6px 20px rgba(13, 13, 13, .3);
  font-size: 14px; line-height: 1.4; }
.ps-toast[data-tone="bad"] { background: var(--no, #b4232a); }
.ps-toast-a { background: none; border: 0; color: var(--gold, #fec919); font-weight: 700; padding: 4px 2px; cursor: pointer; font-size: 14px; }
.ps-toast-a:disabled { opacity: .6; cursor: default; }
.ps-toast-sep { opacity: .5; }

@media (max-width: 600px) {
  .ps { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1600; max-height: 62vh;
    background: var(--panel, #fff); border-top: 1px solid var(--line, #e3e6ea); border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 24px rgba(13, 13, 13, .18); }
  .ps[hidden] { display: none; }
  .ps[data-size="full"] { max-height: 92vh; height: 92vh; }
  .ps-grip { border: 0; background: none; padding: 8px 0 2px; cursor: pointer; width: 100%; flex: none; }
  .ps-grip span { display: block; width: 44px; height: 5px; border-radius: 3px; background: #d3d8de; margin: 0 auto; }
  .ps-head { display: flex; align-items: flex-start; gap: 8px; padding: 2px 16px 8px; flex: none; }
  .ps-titles { flex: 1; min-width: 0; }
  .ps-title { font-size: 17px; margin: 0; line-height: 1.25; overflow-wrap: anywhere; }
  .ps-sub { color: var(--muted, #6b7280); font-size: 13px; }
  .ps-close { border: 0; background: none; font-size: 20px; line-height: 1; padding: 6px; cursor: pointer; color: var(--muted, #6b7280); }
  .ps-body { overflow-y: auto; padding: 0 16px 16px; -webkit-overflow-scrolling: touch; }

  .ps-verdict { font-size: 16px; line-height: 1.35; padding: 10px 12px; border-radius: 10px; background: var(--muted-bg, #eceef1); }
  .ps-v-no { background: var(--no-bg, #fbdce0); }
  .ps-v-yes { background: var(--go-bg, #d6f0df); }
  .ps-v-maybe { background: var(--warn-bg, #fdeecb); }
  .ps-stale { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: #fff; color: var(--warn, #9a6b00); border: 1px solid var(--warn, #9a6b00); vertical-align: 1px; }

  .ps-checks { list-style: none; margin: 10px 0 0; padding: 0; }
  .ps-checks li { border-bottom: 1px solid var(--line, #e3e6ea); }
  .ps-check { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 10px 2px; font-size: 15px;
    text-align: left; cursor: pointer; color: inherit; min-height: 44px; }
  .ps-ico { width: 20px; text-align: center; font-weight: 700; flex: none; }
  .ps-check-pass .ps-ico { color: var(--go, #1f8a4c); }
  .ps-check-fail .ps-ico { color: var(--no, #b4232a); }
  .ps-check-review .ps-ico { color: var(--warn, #9a6b00); }
  .ps-label { flex: 1; min-width: 0; }
  .ps-chev { color: var(--muted, #6b7280); transition: transform .15s; }
  .ps-check[aria-expanded="true"] .ps-chev { transform: rotate(90deg); }
  .ps-know { padding: 0 2px 12px 30px; font-size: 14px; line-height: 1.45; }
  .ps-know-h { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); margin-bottom: 2px; }
  .ps-src { color: var(--muted, #6b7280); margin-top: 4px; overflow-wrap: anywhere; }
  .ps-legal { color: var(--muted, #6b7280); font-size: 12px; margin: 8px 0 0; }

  .ps-v2 { margin-top: 12px; border: 1px solid var(--line, #e3e6ea); border-radius: 10px; padding: 4px 12px 8px; }
  .ps-v2-row { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line, #e3e6ea); font-size: 14px; }
  .ps-v2-row:last-of-type { border-bottom: 0; }
  .ps-v2-q { font-weight: 700; }
  .ps-pilot { font-size: 12px; color: var(--muted, #6b7280); }
  .ps-v2-more { margin-top: 4px; }

  .ps-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
  .ps-actions .ps-save, .ps-actions .ps-folder { flex: 1 1 140px; min-height: 44px; font-size: 15px; }
  .ps-more { flex: 1 1 100%; }
  .ps-more > summary { cursor: pointer; padding: 8px 2px; color: var(--muted, #6b7280); font-size: 14px; list-style: none; }
  .ps-more > summary::-webkit-details-marker { display: none; }
  .ps-more > summary::before { content: '⋯ '; }
  .ps-more-list { display: grid; gap: 6px; }
  .ps-more-item { text-align: left; background: var(--bg, #f4f5f7); border: 1px solid var(--line, #e3e6ea); border-radius: 8px; padding: 10px 12px;
    font-size: 14px; cursor: pointer; min-height: 44px; }
  .ps-more-item:disabled { opacity: .6; cursor: default; }
  .ps-err { color: var(--no, #b4232a); font-size: 14px; margin-top: 8px; }

  /* One sheet: the parcel panel it replaces stays out of the way while it shows, and the toast sits above it. */
  body.ps-open #opp-results .parcel-panel { display: none; }
  body.ps-open .ps-toast { bottom: auto; top: 12px; }
}
/* The held grade's Refresh, inside its chip (UI build U12). */
.ps-stale-act { margin-left: 8px; background: transparent; border: 1px solid currentColor; border-radius: 6px; color: inherit;
  font: inherit; font-size: 12px; font-weight: 600; padding: 1px 8px; cursor: pointer; }
.ps-stale-act:disabled { opacity: .6; cursor: default; }

/* The phone's parcel sheet as the approved Map-on-a-phone design (UI-7, #506): verdict, then Save and the site page,
   then the tally, the four facts (the desktop panel's own .pp-facts, web/map-panel.css) and the checks, each with its
   word. Text on tints uses the -ink shades (4.5:1). */
@media (max-width: 600px) {
  .ps-actions { margin-top: 10px; }
  .ps-tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 12px 0 10px; text-align: center; }
  .ps-t { display: flex; flex-direction: column; border-radius: 8px; padding: 6px 2px; font-size: 12px; font-weight: 600; }
  .ps-t b { font-size: 18px; }
  .ps-t-pass { background: var(--go-bg); color: var(--go-ink); }
  .ps-t-review { background: var(--warn-bg); color: var(--warn-ink); }
  .ps-t-fail { background: var(--no-bg); color: var(--no); }
  .ps-t-na { background: var(--muted-bg); color: var(--muted-ink); }
  .ps-answer .pp-facts { margin: 0 0 6px; }
  .ps-word { flex: none; font-size: 12px; font-weight: 700; color: var(--muted-ink); }
  .ps-word-pass { color: var(--go-ink); }
  .ps-word-review { color: var(--warn-ink); }
  .ps-word-fail { color: var(--no); }
  .ps-check-pass .ps-ico { color: var(--go-ink); }
  .ps-check-review .ps-ico { color: var(--warn-ink); }
  .ps-sub, .ps-src, .ps-legal, .ps-know-h { color: var(--muted-ink); }
}
