/* WoundB 2.0.9: zoom, trace feedback, explicit wound confirmation, and saved note. */
.image-zoom-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 52px;
  padding: 6px 10px;
  background: #fff;
  border-bottom: 1px solid #dce4e0;
}
.zoom-button,
.zoom-fit-button,
.zoom-pan-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #d8e2dc;
  border-radius: 10px;
  background: #fff;
  color: #285d4d;
  font-size: 20px;
  font-weight: 800;
}
.zoom-fit-button,
.zoom-pan-button { padding: 0 12px; font-size: 12px; }
.zoom-pan-button[aria-pressed="true"] { border-color: #276c58; background: #eaf4ef; }
#zoomLevel { min-width: 48px; text-align: center; color: #3c5047; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 800; }
.image-stage { display: block; max-height: min(62vh, 620px); overflow: auto; overscroll-behavior: contain; }
.image-stage canvas { display: block; flex: none; max-width: none; max-height: none; object-fit: fill; margin: 0; }
.image-stage.pan-mode canvas { touch-action: pan-x pan-y !important; cursor: grab; }
.image-stage.pan-mode canvas:active { cursor: grabbing; }
.measurement-message {
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid #d8e5de;
  border-radius: 10px;
  background: #f4f8f5;
  color: #36594d;
  font-size: 12px;
  line-height: 1.5;
}
.measurement-message.warn { border-color: #eddeb5; background: #fff9eb; color: #715719; }
.measurement-message.error { border-color: #e8c7c3; background: #fff4f2; color: #873b35; }
.wound-presence-check {
  display: grid;
  gap: 4px;
  margin: 13px 0 0;
  padding: 12px;
  border: 1px solid #dbe4df;
  border-radius: 12px;
  background: #fbfcfb;
  min-width: 0;
}
.wound-presence-check legend { padding: 0 4px; color: #263a32; font-size: 14px; font-weight: 800; }
.wound-presence-check p { margin: 1px 0 5px; color: #68766f; font-size: 11px; line-height: 1.5; }
.wound-presence-check label { display: flex; align-items: center; gap: 9px; min-height: 42px; color: #384a42; font-size: 12px; line-height: 1.4; }
.wound-presence-check input { width: 19px; height: 19px; flex: 0 0 auto; accent-color: #176b58; }
.site-other-input { display: block; width: 100%; max-width: 210px; min-height: 34px; margin-top: 4px; padding: 4px 7px; border: 1px solid #d5dfda; border-radius: 8px; background: #fff; color: #263631; font-size: 12px; }
.patient-form-row .site-other-input { max-width: none; min-height: 39px; font-size: 11px; }
.saved-summary { margin-top: 14px; padding: 15px; border: 1px solid #cbded4; border-radius: 13px; background: #f8fbf9; }
.saved-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.saved-summary-heading h3 { margin: 5px 0 0; color: #263a32; font-size: 17px; letter-spacing: -.025em; }
.summary-status { padding: 5px 9px; border-radius: 999px; background: #e9f2ed; color: #3f6957; font-size: 10px; font-weight: 800; }
.emr-note-text { margin: 12px 0; padding: 12px; border: 1px solid #e0e7e3; border-radius: 9px; background: #fff; color: #37473f; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.summary-actions { display: flex; gap: 9px; }
.summary-actions button { min-height: 44px; }
.clinician-note-details { margin-top: 12px; padding: 10px 12px; border: 1px solid #e1e8e4; border-radius: 11px; background: #fbfcfb; color: #5c6c65; }
.clinician-note-details summary { color: #176b58; font-size: 12px; font-weight: 800; }
.clinician-note-details summary span { margin-left: 4px; color: #7b8983; font-size: 10px; font-weight: 600; }
.clinician-note-details label { display: block; margin-top: 10px; color: #34463e; font-size: 12px; font-weight: 750; }
.clinician-note-details textarea { display: block; width: 100%; min-height: 96px; margin-top: 6px; padding: 10px; border: 1px solid #d6e0db; border-radius: 9px; background: white; color: #263631; font: inherit; font-size: 13px; line-height: 1.5; resize: vertical; }
.clinician-note-details textarea:focus { outline: 2px solid #83b6a2; outline-offset: 1px; }
.clinician-note-details small { display: block; margin-top: 5px; color: #73817a; font-size: 10px; line-height: 1.4; }
.copy-fallback { position: fixed; top: 0; left: -9999px; opacity: 0; }

@media (max-width: 680px) {
  .image-zoom-toolbar { position: sticky; top: 0; z-index: 2; justify-content: center; gap: 7px; padding: 5px 7px; }
  .zoom-button { min-width: 48px; min-height: 46px; }
  .zoom-fit-button, .zoom-pan-button { min-height: 46px; padding: 0 10px; }
  .image-stage { max-height: 52vh; }
  .wound-presence-check { padding: 10px; }
  .wound-presence-check legend { font-size: 13px; }
  .wound-presence-check label { min-height: 44px; font-size: 12px; }
  .summary-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .summary-actions button:last-child { grid-column: 1 / -1; }
}
