
/* "Save this inspection?" box. Fixed over the page, so nothing behind it moves.
   Phone: a card at the bottom. Wider screens: centred. Colours come from the
   same light and dark variables as the rest of the app. It does not move. */
.save-confirm {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overscroll-behavior: contain;
}
.save-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 16, 0.5);
}
.save-confirm-card {
  position: relative;
  box-sizing: border-box;
  width: min(26rem, 100%);
  max-height: 92vh;
  max-height: 92dvh;
  overflow: auto;
  padding: 1.1rem 1.1rem calc(1rem + var(--safe-bottom, 0px));
  background: var(--bg-panel);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 16px 40px rgba(17, 17, 16, 0.25);
}
.save-confirm-card:focus { outline: none; }
.save-confirm-title { margin: 0 0 0.5rem; font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.save-confirm-intro { margin: 0 0 0.6rem; color: var(--fg-muted); font-size: 0.95rem; line-height: 1.45; }
.save-confirm-list { margin: 0 0 1rem; padding: 0; }
.save-confirm-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--separator);
  font-size: 0.95rem;
  line-height: 1.4;
}
.save-confirm-row:last-child { border-bottom: 0; }
.save-confirm-row dt { flex: 0 0 6.5rem; margin: 0; color: var(--fg-muted); }
.save-confirm-row dd { flex: 1 1 auto; margin: 0; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.save-confirm-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.save-confirm-actions .btn { width: 100%; justify-content: center; min-height: 44px; }
.save-confirm-actions .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-theme="dark"] .save-confirm-card { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); }
[data-theme="dark"] .save-confirm-actions .btn:focus-visible { outline-color: #ffffff; }
@media (min-width: 720px) {
  .save-confirm { align-items: center; padding: 1.5rem; }
  .save-confirm-card { border-radius: 8px; padding-bottom: 1.1rem; }
  .save-confirm-actions { flex-direction: row; justify-content: flex-end; }
  .save-confirm-actions .btn { width: auto; min-width: 8rem; }
}

/* Phones: tighter rows and the two buttons side by side, so the box fits a short screen without scrolling.
   Landscape: two columns of rows and no intro line; the card scrolls inside itself only if it still cannot fit. */
@media (max-width: 719px) {
  .save-confirm-card { padding: 0.9rem 1rem calc(0.8rem + var(--safe-bottom, 0px)); }
  .save-confirm-title { margin-bottom: 0.3rem; font-size: 1.1rem; }
  .save-confirm-intro { margin-bottom: 0.35rem; font-size: 0.9rem; line-height: 1.35; }
  .save-confirm-list { margin-bottom: 0.7rem; }
  .save-confirm-row { padding: 0.3rem 0; font-size: 0.9rem; line-height: 1.3; }
  .save-confirm-row dt { flex-basis: 5.6rem; }
  .save-confirm-actions { flex-direction: row; gap: 0.6rem; }
  .save-confirm-actions .btn { width: auto; flex: 1 1 0; min-width: 0; }
  .save-confirm-actions .save-confirm-yes { flex: 2 1 0; }
}
@media (max-height: 500px) {
  .save-confirm-intro { display: none; }
  .save-confirm-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.2rem; }
  .save-confirm-card { width: min(36rem, 100%); }
}

