/* Visualizer pictures kept with the job (owner 2026-11-22): the Job Log job panel section
   and the owner's last-30-days list. Every tap target is at least 44 px; nothing scrolls
   sideways at 344 px. */
.vp-section .vp-note,
.vp-sheet-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.vp-count {
  flex: 0 0 auto;
  min-width: 28px;
  text-align: center;
}

.vp-runs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vp-run {
  display: grid;
  /* Pictures on top, the job line at the bottom; a taller neighbour in the row only adds
     space under the details, never inside the picture tiles. */
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.vp-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
}

.vp-thumb {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e2e8f0;
  color: var(--text);
  cursor: zoom-in;
  font: inherit;
}

.vp-thumb:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.vp-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.vp-thumb-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(24, 34, 38, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vp-thumb-missing {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}

.vp-meta {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
}

.vp-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.vp-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.vp-line strong {
  color: var(--text);
  font-weight: 600;
}

.vp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vp-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.vp-chip.vp-chip-sent {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.vp-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.vp-job .vp-line {
  min-width: 0;
}

.vp-job-name {
  color: var(--text);
}

/* On a touch screen (the owner's Fold) the Job Log header row, where the list opens, gets
   44 px buttons too. A mouse keeps the row as it was. */
@media (pointer: coarse) {
  #jobLogModule .job-log-header-actions .button {
    min-height: 44px;
  }
}

.vp-job .button,
.vp-sheet .button {
  flex: 0 0 auto;
  min-height: 44px;
  border-radius: 8px;
}

.vp-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 34, 38, 0.55);
}

.vp-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, 100%);
  max-height: min(900px, 94vh);
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 18px 48px rgba(24, 34, 38, 0.28);
}

.vp-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.vp-sheet-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.vp-sheet-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.vp-sheet-body {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 16px 18px;
  overscroll-behavior: contain;
}

.vp-sheet-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.vp-sheet-status.vp-error {
  color: var(--warn);
}

.vp-more {
  justify-self: center;
  min-width: 160px;
}

@media (max-width: 760px) {
  .vp-sheet-backdrop {
    padding: 0;
    place-items: stretch;
  }

  .vp-sheet {
    width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 0;
  }

  .vp-sheet-head {
    padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  }

  .vp-sheet-body {
    padding: 12px 16px max(18px, env(safe-area-inset-bottom));
  }
}
