/* SafeResponse Build 291 — Snapshot to Drafts page styling.
   All CSS is external because the site's Content-Security-Policy blocks inline styles.
   This file only affects the snapshot review page that imports it. */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; }
main {
  width: min(100%, 1320px);
  max-width: 1320px;
  min-width: 0;
  margin: 0 auto;
  padding: 24px 26px 44px;
}
nav { margin-bottom: 12px; }
#status { display: inline-block; margin: 8px 0 12px 8px; color: #36586c; }
#status.error { color: #9c2430; font-weight: 600; }

/* No empty second column when the user has not selected a draft. */
.drafts-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.drafts-grid.review-open { grid-template-columns: minmax(265px, 335px) minmax(0, 1fr); }
.drafts-grid > article { min-width: 0; margin: 12px 0 0; }
.drafts-grid article {
  background: #fff; color: #162a3c; border: 1px solid #d5e1e9;
  border-radius: 14px; padding: 20px;
}
.drafts-grid h2 { margin: 0 0 13px; }
#detail[hidden] { display: none !important; }

/* Keep draft records readable instead of the narrow overlapping cards
   caused by JavaScript inline styles being blocked by Content-Security-Policy. */
#snapshots { overflow-wrap: anywhere; }
#snapshots .snapshot-item {
  display: block; width: 100%; max-width: 100%; text-align: left;
  white-space: normal; overflow-wrap: anywhere; line-height: 1.4;
  margin: 0 0 9px; padding: 12px 14px;
  border-radius: 9px; background: #155c7e; color: #fff;
  border: 1px solid #155c7e;
}
#snapshots .snapshot-item[aria-pressed="true"] { background: #0c415e; border-color: #0c415e; }
#snapshots .empty-drafts { margin: 6px 0; color: #607484; }

/* The *only* size of the on-page image. Original photo remains available
   through the separate clickable link. */
#detail #photoLink {
  display: inline-block; width: 240px; max-width: 100%; height: 162px;
  border: 1px solid #cbd8e1; border-radius: 9px;
  overflow: hidden; vertical-align: top; background: #f8fafc;
}
#detail #photoLink #photo {
  display: block; width: 100%; max-width: 100%; height: 160px;
  max-height: 160px; object-fit: contain; object-position: center;
  border: 0; margin: 0; padding: 0;
}
#detail #photoLink:focus-visible { outline: 3px solid #82b9d9; outline-offset: 2px; }

#detail label { display: block; margin: 14px 0; }
#detail label > strong { display: block; margin-bottom: 5px; }
#detail input:not([type="checkbox"]), #detail textarea, #detail select {
  box-sizing: border-box; width: 100%; max-width: 100%;
  border: 1px solid #a8bfcd; border-radius: 8px; font: inherit;
  background: #fff; color: #172c3c; padding: 10px;
}
#detail input[type="checkbox"] { width: auto; }
#detail textarea { min-height: 90px; }
#detail .field { margin-top: 12px; padding: 14px; border: 1px solid #d9e5ed; border-radius: 10px; background: #fbfdfe; }
#detail .field small { display: block; margin: 5px 0 8px; color: #607484; }
#detail .section { margin: 25px 0 10px; }
#detail .hint { color: #607484; }
#detail #verifyWrap { padding: 14px; border-radius: 10px; background: #eef6fa; }
#detail #verifyWrap label { display: flex; gap: 10px; align-items: start; }
#detail #verifyWrap label input { flex: none; margin: 4px 0 0; }
#detail #verifyWrap label span { flex: 1; }
#detail button { margin: 3px 4px 3px 0; }
#detail #save, #detail #submit { background: #126187; color: #fff; }
#detail button:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 900px) {
  main { padding: 18px 16px 36px; }
  .drafts-grid.review-open { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
  main { padding: 14px 12px 30px; }
  .drafts-grid article { padding: 14px; }
  #status { display: block; margin: 6px 0 10px; }
}
