/* Project inspections (Inspections.razor): toned inspection cards and the photo viewer. */
.ish-inspection-list .fl-data-list__items { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

.ish-inspection-card { --tone: var(--muted); display: flex; height: 100%; flex-direction: column; gap: 10px; padding: 14px 16px; }

.ish-inspection-head { display: flex; align-items: flex-start; gap: 10px; }

.ish-inspection-icon {
  display: inline-flex; width: 36px; height: 36px; flex: none; align-items: center; justify-content: center;
  border-radius: 9px; background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); font-size: 20px;
}

.ish-inspection-title { min-width: 0; flex: 1; }

.ish-inspection-title h2 { margin: 0; color: var(--ink); font-size: .95rem; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }

.ish-inspection-meta { display: flex; align-items: center; gap: 2px 14px; margin-top: 3px; flex-wrap: wrap; color: var(--muted); font-size: .74rem; }

.ish-inspection-meta > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.ish-inspection-meta .msr { color: var(--faint); font-size: 16px; }

.ish-inspection-notes { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: .82rem; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.ish-inspection-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }

.ish-inspection-count { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .75rem; font-weight: 700; }

.ish-inspection-count .msr { color: var(--faint); font-size: 17px; }

.ish-inspection-count--link { padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); border-radius: 999px; background: var(--brand-tint-2); color: var(--brand); font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer; transition: background-color .12s ease, border-color .12s ease; }

.ish-inspection-count--link .msr { color: var(--brand); }

.ish-inspection-count--link:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-tint); }

.ish-inspection-count--link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-tint); }

/* ── Photo viewer modal ──────────────────────────────────────────────────── */
.ish-photo-viewer .ish-photo-stage { display: grid; min-height: 240px; place-items: center; border-radius: 8px; background: var(--sunken); }

.ish-photo-viewer .ish-photo-stage img { display: block; max-width: 100%; max-height: 65vh; object-fit: contain; border-radius: 6px; }

.ish-photo-delete { color: var(--error); }

.ish-photo-delete:hover { border-color: var(--error); background: var(--error-bg); color: var(--error); }

.ish-photo-counter { margin-inline-end: auto; color: var(--muted); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 620px) {
  .ish-inspection-list .fl-data-list__items { grid-template-columns: minmax(0, 1fr); }

  /* The viewer's footer wraps; its buttons fill each row so previous/next pair up evenly. */
  .ish-photo-viewer .fl-btn { flex: 1 1 auto; justify-content: center; }

  .ish-photo-viewer .ish-photo-stage img { max-height: 55dvh; }
}
