/* Complaint Photos (Ali, 5 Nov 2026): the row in Complaint Details, the box on the technician's job page, the My Jobs thumbnail and the full-screen viewer */
.cp-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cp-photos .hx-photo { width: 88px; height: 88px; border-radius: 8px; border: 1px solid #E1E6EC; }
.cp-add { width: 88px; height: 88px; border: 1px dashed var(--line-strong); border-radius: 8px; background: #FAFBFC; color: var(--ink); font: 600 0.82rem/1.2 var(--font);
  display: grid; place-content: center; justify-items: center; gap: 2px; cursor: pointer; padding: 4px; }
.cp-add span { font-size: 1.3rem; line-height: 1; color: var(--muted); }
@media (hover: hover) { .cp-add:hover { border-color: var(--ink); } }
.cp-add:focus-visible { outline: 2px solid #1F5FD1; outline-offset: 2px; }
.cp-box { display: grid; gap: 6px; padding: 14px 16px; }
.cp-box .eyebrow { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.cp-box .cp-photos { margin-top: 0; }

/* My Jobs: the thumbnail sits on the right of the description rows, above Cancel Visit and Start */
.job-cards > li.has-thumb { position: relative; }
.job-cards > li.has-thumb > .job-card .job-main, .job-cards > li.has-thumb > .job-card .job-sub, .job-cards > li.has-thumb > .job-card .job-flag { padding-right: 76px; }
.job-thumb { position: absolute; top: 44px; right: 16px; width: 64px; height: 64px; padding: 0; border: 1px solid #E1E6EC; border-radius: 10px; background: #E1E6EC;
  cursor: zoom-in; overflow: visible; z-index: 1; }
.job-thumb-img { display: block; width: 100%; height: 100%; border-radius: 9px; overflow: hidden; }
.job-thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.job-thumb-more { position: absolute; top: -6px; right: -6px; min-width: 24px; height: 20px; padding: 0 6px; border-radius: 999px; background: #0D1B2A; color: #FFFFFF;
  font: 700 0.72rem/20px var(--font); text-align: center; box-shadow: 0 0 0 2px #FFFFFF; }
.job-thumb:focus-visible { outline: 2px solid #1F5FD1; outline-offset: 2px; }
.job-thumb::after { content: ""; position: absolute; inset: -6px; } /* a thumb-sized touch area */

/* Full-screen viewer */
.pv { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0D1B2A; color: #FFFFFF;
  display: grid; grid-template-rows: auto 1fr auto auto; overflow: hidden; }
.pv:not([open]) { display: none; }
.pv::backdrop { background: #0D1B2A; }
.pv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 16px 12px 20px; }
.pv-who { display: grid; gap: 2px; min-width: 0; }
.pv-title { font: 700 1.1rem/1.25 "Barlow Semi Condensed", var(--font); }
.pv-sub { font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); }
.pv-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.14); color: #FFFFFF; display: grid; place-items: center; cursor: pointer; }
.pv-close:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.pv-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; min-height: 0; outline: 0; }
.pv-track::-webkit-scrollbar { display: none; }
.pv-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 0 12px; min-height: 0; }
.pv-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; user-select: none; -webkit-user-drag: none; }
.pv-dots { display: flex; justify-content: center; gap: 8px; padding: 12px 0; }
.pv-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.pv-dots i.on { background: #FFFFFF; }
.pv-cap { background: #FFFFFF; color: var(--ink); border-radius: 16px 16px 0 0; padding: 16px 20px max(18px, env(safe-area-inset-bottom)); }
.pv-cap span { display: block; font-size: 0.82rem; font-weight: 600; color: #5A6677; }
.pv-cap p { margin: 2px 0 0; font-size: 1.06rem; font-weight: 600; max-height: 30vh; overflow: auto; white-space: pre-line; }
@media (prefers-reduced-motion: reduce) { .pv-track { scroll-behavior: auto; } }

/* The photo box for computer windows (Ali, 5 Nov 2026; ui/photo-drop.js): only a wide window with a mouse; phones keep the Add Photo button */
.drop-box { display: none; }
@media (min-width: 701px) and (hover: hover) and (pointer: fine) {
  .drop-old { display: none !important; }
  .drop-box { display: flex; align-items: center; gap: 12px; width: 100%; margin: 6px 0; padding: 12px 14px; border: 2px dashed #C5CDD8; border-radius: 12px; background: #FAFBFC; box-sizing: border-box; }
  .drop-ico { flex: none; color: #5A6677; }
  .drop-txt { flex: 1; min-width: 0; display: grid; gap: 1px; color: #0D1B2A; font-weight: 600; font-size: 0.92rem; }
  .drop-txt small { font-weight: 400; color: #5A6677; font-size: 0.78rem; }
  .drop-t2 { display: none; }
  .drop-pick { flex: none; min-height: 40px; }
  .drop-box.dragging { border-color: #1F5FD1; background: #EEF3FD; }
  .drop-box.dragging .drop-t1 { display: none; }
  .drop-box.dragging .drop-t2 { display: block; color: #1F5FD1; }
  .comment-box .drop-box { flex-basis: 100%; order: 2; }
  .comment-box .cb-photos { order: 2; }
}

/* Photo hover and drag feel (Ali, 6 Nov 2026): a quick tint and zoom on a photo thumbnail under the mouse, and the drop box fades and lifts while a file is dragged over it.
   Mouse only (no hover on phones); transform and opacity only; reduced motion keeps the fade and drops the zoom, lift and scale. */
@media (hover: hover) and (pointer: fine) {
  .cb-thumb::after { content: ""; position: absolute; inset: 0; background: rgba(13, 27, 42, 0.42); opacity: 0; transition: opacity 0.15s var(--ease-out); pointer-events: none; }
  .cb-thumb .icon-btn { z-index: 2; }
  .cb-thumb:hover::after { opacity: 1; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cb-thumb img { transition: transform 0.2s var(--ease-out); }
  .cb-thumb:hover img { transform: scale(1.07); }
}
@media (min-width: 900px) and (pointer: fine) {
  .drop-box { transition: border-color 0.15s var(--ease-out), background-color 0.15s var(--ease-out); }
}
@media (min-width: 900px) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .drop-box { transition: border-color 0.15s var(--ease-out), background-color 0.15s var(--ease-out), transform 0.15s var(--ease-out); }
  .drop-ico { transition: transform 0.18s var(--ease-out), color 0.15s; }
  .drop-box.dragging { transform: translateY(-2px); }
  .drop-box.dragging .drop-ico { transform: scale(1.15); color: #1F5FD1; }
}
