/* HostCheck: styles that exist only in this tool. Shared look: ../../shared/css/style.css */

/* Page shell: a one-screen cockpit on desktop; stacked and scrolling below 1024px. */

html, body { min-height: 100%; }

.app-shell { min-height: 100vh; min-height: 100dvh; }

@media (min-width: 1024px) {
  html, body { height: 100%; overflow: hidden; }

  .app-shell { height: 100vh; height: 100dvh; }
}

#photoZone.is-drop-target, #photoZone:hover { border-color: #6366f1; background: #eef2ff; }

/* Photo grid -------------------------------------------------------------- */

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.photo-grid.hidden { display: none; }

.photo-tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }

.photo-num, .photo-remove {
  position: absolute; top: 4px; min-width: 20px; height: 20px; border-radius: 999px;
  font-size: 8.5pt; font-weight: 700; line-height: 20px; text-align: center; color: #fff; background: rgba(15, 23, 42, 0.7);
}
.photo-num { left: 4px; padding: 0 5px; }
.photo-remove { right: 4px; width: 20px; font-size: 11pt; }
.photo-remove:hover, .photo-remove:focus-visible { background: #e11d48; }

.photo-large { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; }

/* Progress ---------------------------------------------------------------- */

.progress-track { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #6366f1, #8b5cf6); transition: width 0.3s ease; }
.progress-fill.is-complete { background: #10b981; }

.hotspots { padding: 8px 10px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.hotspots ul { margin-top: 3px; padding-left: 16px; list-style: disc; font-size: 9pt; line-height: 1.45; }

/* Rooms and tasks --------------------------------------------------------- */

.room-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; }
.room-card.is-done { border-color: #6ee7b7; background: #f0fdf4; }
.room-count { font-size: 8.5pt; font-weight: 700; color: #64748b; font-variant-numeric: tabular-nums; white-space: nowrap; }

.room-photos { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 6px; }
.room-photos img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid #e2e8f0; }
.room-photos button:hover img, .room-photos button:focus-visible img { outline: 2px solid #6366f1; }

.task-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 2px; border-top: 1px solid #f1f5f9; }
.task-row input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: #10b981; cursor: pointer; }
.task-title { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 10pt; font-weight: 600; color: #1e293b; }
.task-standard { display: block; font-size: 9pt; color: #64748b; line-height: 1.4; margin-top: 1px; }
.task-row.is-done .task-title > span:last-child { text-decoration: line-through; color: #94a3b8; }
.task-min { font-size: 8.5pt; font-weight: 700; color: #94a3b8; font-variant-numeric: tabular-nums; margin-top: 2px; }
.task-btn { color: #94a3b8; font-size: 11pt; line-height: 1; padding: 1px 3px; }
.task-btn:hover { color: #4f46e5; }

.prio { font-size: 7.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 6px; }
.prio-critical { background: #fee2e2; color: #b91c1c; }
.prio-standard { background: #f1f5f9; color: #475569; }
.prio-detail { background: #ede9fe; color: #6d28d9; }

.add-task { margin-top: 6px; font-size: 9pt; font-weight: 600; color: #4f46e5; }
.add-task:hover { color: #312e81; text-decoration: underline; }

/* Print / PDF: the whole checklist on paper, with reference photos and empty boxes. */

.print-only { display: none; }

@media print {
  @page { margin: 12mm; size: letter portrait; }

  html, body, main, main > section, main section > div, #roomList {
    height: auto !important; min-height: 0 !important; max-height: none !important;
    overflow: visible !important; position: static !important; display: block !important;
    background: #fff !important; box-shadow: none !important; border: 0 !important; padding: 0 !important;
  }
  #toolHeader, #outputLockOverlay, #exampleBadge, button.task-btn, .add-task { display: none !important; }

  .print-only { display: block !important; white-space: pre-wrap; font-size: 11pt; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
  .room-card { break-inside: avoid; border: 1px solid #cbd5e1 !important; margin-bottom: 10px; padding: 8px 10px !important; }
  .room-card, .room-card.is-done { background: #fff !important; }
  .room-photos { overflow: visible; flex-wrap: wrap; }
  .room-photos img { width: 120px; height: 90px; }
  .task-row { break-inside: avoid; }
  .task-row input { appearance: none; border: 1.5px solid #334155; border-radius: 3px; }
  .task-row input:checked { background: #334155; }
  .task-row.is-done .task-title > span:last-child { text-decoration: none; color: #1e293b; }
}
