/* Camera detail panel and the About dialog. */

/* ---------------------------- detail panel ----------------------------- */

#detail {
  position: absolute; top: 56px; right: 12px; bottom: 24px; z-index: 6;
  width: 380px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 4px 18px var(--shadow); overflow-y: auto;
  padding: 16px 18px; font-size: 13.5px; color: var(--ink); line-height: 1.5;
}
.hidden { display: none; }
#detail.hidden, #about.hidden { display: none; }
#detail-close {
  position: absolute; top: 8px; right: 10px; width: auto; margin: 0;
  padding: 0 4px; border: none; background: none;
  font-size: 22px; color: var(--muted); line-height: 1;
}
#detail h2 { font-size: 16px; font-weight: 650; margin: 0 32px 4px 0;
  letter-spacing: -.01em; color: var(--ink); }
#detail h3 { font-size: 11px; margin: 16px 0 6px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #ffffff; margin: 4px 0 8px; }
.status-badge.flagged { background: #b3261e; }
.status-badge.checked_clear { background: #1f5f9e; }
.status-badge.possible_exclusion { background: #6d5410; }
.status-badge.guideline { background: #7a4b00; }
.guideline-banner {
  margin: 8px 0; padding: 8px 10px; font-size: 12.5px; border-radius: 6px;
  background: var(--warn-bg); color: var(--warn-ink);
  border: 1px solid var(--warn-border);
}
.guideline-banner.tbd { border-width: 2px; border-color: var(--guideline); }
.kv { margin: 2px 0; font-family: var(--font-data); font-size: 12.5px; }
.kv b { color: var(--muted); font-weight: 600; font-family: var(--font-ui); }

.match-card {
  border: 1px solid var(--flagcard-border); border-left: 4px solid var(--flagged);
  border-radius: 6px; padding: 10px 12px; margin: 8px 0;
  background: var(--flagcard-bg);
}
.match-card .place { font-weight: 600; }
.match-card .dist { font-size: 15px; font-weight: 700;
  color: var(--flagged-ink); font-family: var(--font-data); }
.heuristic-tag {
  display: inline-block; background: var(--warn-bg); color: var(--warn-ink);
  border: 1px solid var(--warn-border); border-radius: 4px; font-size: 11px;
  padding: 1px 6px; margin-left: 6px; vertical-align: middle;
}
.match-card .cite { font-size: 12px; color: var(--flagcard-muted); margin-top: 5px; }
.match-card.guideline { border-left-color: var(--guideline); }
.match-card.guideline .dist { color: var(--ink); }
.statute-quote {
  margin: 7px 0 2px; padding: 7px 10px; font-size: 12.5px;
  background: var(--quote-bg); border-left: 3px solid var(--law);
  border-radius: 4px; color: var(--quote-ink);
}
.statute-quote .lang { font-style: italic; }

.report-btn {
  width: 100%; margin: 14px 0 0; padding: 9px; font-size: 13.5px;
  font-weight: 600; background: #b3261e; border-color: #b3261e;
  color: #ffffff; border-radius: 7px;
}
.report-btn:hover { background: #99201a; border-color: #99201a; }
.report-box { margin-top: 10px; }
.report-box textarea {
  height: 260px; margin: 0; padding: 8px;
  font: 12px/1.5 var(--font-data); resize: vertical;
}
.report-actions { display: flex; gap: 8px; margin-top: 6px; }
.report-actions button {
  flex: 1; width: auto; margin: 0; padding: 7px; font-size: 12.5px;
  background: var(--card); color: var(--accent-text);
  border: 1px solid var(--border); border-radius: 6px;
}
.report-actions button:hover { border-color: var(--accent-text); }
.disclaimer {
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-radius: 6px; padding: 8px 10px; font-size: 12px;
  color: var(--warn-ink); margin: 10px 0;
}
.disclaimer details { margin: 4px 0 0; padding: 0; border: none; }
.disclaimer summary { font-weight: 600; font-size: 11.5px; color: inherit; }

/* -------------------------------- modal -------------------------------- */

.modal { position: fixed; inset: 0; z-index: 20; background: rgba(10,14,18,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
/* The card clips; only .modal-body scrolls, so the close button stays put. */
.modal-card { position: relative; background: var(--card); border-radius: 12px;
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  max-width: 640px; max-height: 85vh; max-height: 85dvh; overflow: hidden;
  font-size: 13.5px; color: var(--ink); line-height: 1.55; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain; padding: 24px 28px; }
.modal-card h2 { margin-top: 0; font-size: 19px; font-weight: 650;
  letter-spacing: -.01em; color: var(--ink); margin-right: 40px; }
.modal-card h3 { font-size: 14px; font-weight: 650; color: var(--ink);
  margin: 1.4em 0 .4em; }
.modal-card h2 + h3 { margin-top: .6em; }
.modal-close { position: absolute; top: 10px; right: 14px; z-index: 1;
  width: auto; margin: 0; padding: 0 8px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card);
  font-size: 24px; line-height: 1.2; color: var(--muted); }
.fine { color: var(--muted); font-size: 12px; }
.pop-fine { color: #59636e; font-size: 11.5px; }
.pop-list { margin: 4px 0; padding-left: 16px; font-size: 11.5px; }
