/* site-issues.css — the site-issue drill-down, annotation canvas and viewer.
 *
 * Split out of app.css, where it was the last 136 lines. It is contiguous, it
 * sits below the mobile media block so it carries its own responsive rules, and
 * every selector in it is prefixed si- or site-issue-. app-siteissues.js is the
 * only thing that uses any of it.
 */
/* ============== SITE ISSUES ============== */
.site-issue-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--ink-soft)); }

/* drill-down: breadcrumb + priority sections */
.si-crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--brass-dark); background: none; border: none; cursor: pointer; padding: 5px 8px 5px 2px; margin-right: 4px; }
@media (hover: hover) { .si-crumb:hover { text-decoration: underline; } }
.si-prio-section { margin-bottom: 26px; }
.si-prio-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 12px; }
.si-prio-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.si-prio-count { font-family: ui-monospace, monospace; font-weight: 600; color: var(--ink-muted); background: var(--paper-warm); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
/* per-property issue list (no hero photos) */
.si-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper-card); }
.si-row { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 12px 15px; cursor: pointer; border-top: 1px solid var(--line-soft); }
.si-row:first-child { border-top: none; }
@media (hover: hover) { .si-row:hover { background: var(--paper-warm); } }
.si-row-main { min-width: 0; flex: 1 1 auto; }
.si-row-title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.si-row-sub { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 3px; font-size: 12px; color: var(--ink-muted); }
.si-row-sub span { display: inline-flex; align-items: center; gap: 4px; }
.si-row-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.si-row-thumb { flex: 0 0 auto; width: 60px; height: 46px; border-radius: 6px; background-size: cover; background-position: center; background-color: var(--paper-warm); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); }
.si-row-chev { flex: 0 0 auto; color: var(--ink-muted); }

/* List/Map toggle + per-property issue map */
.si-viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.si-viewtoggle button { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 5px 11px; background: var(--paper-card); color: var(--ink-muted); border: none; cursor: pointer; }
.si-viewtoggle button + button { border-left: 1px solid var(--line); }
.si-viewtoggle button.active { background: var(--brass); color: #fff; }
/* z-index:0 traps Leaflet's internal pane/control z-indexes inside the box so they stay under the overlays */
.si-map { position: relative; z-index: 0; height: 70vh; min-height: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--paper-warm); }
.si-map-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-muted); font-style: italic; }
.si-pop { display: flex; gap: 10px; width: 230px; }
.si-pop-thumb { flex: 0 0 auto; width: 66px; height: 50px; border-radius: 6px; background-size: cover; background-position: center; background-color: var(--paper-warm); }
.si-pop-body { min-width: 0; }
.si-pop-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.si-pop-meta { font-size: 11.5px; color: var(--ink-muted); margin: 2px 0 6px; }
.si-pop-open { font-size: 12px; font-weight: 600; color: var(--brass-dark); background: none; border: none; padding: 0; cursor: pointer; }
@media (hover: hover) { .si-pop-open:hover { text-decoration: underline; } }

/* ---- Full-screen issue view (two-pane: photos + focused detail) ---- */
.si-view { position: fixed; inset: 0; z-index: 120; background: rgba(8,12,22,0.92); display: none; align-items: center; justify-content: center; padding: 24px; }
.si-view.show { display: flex; }
.si-v-panel { position: relative; display: flex; width: min(1240px, 96vw); height: min(800px, 92vh); background: var(--paper-card); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.5); }
.si-v-close { position: absolute; top: 12px; right: 12px; z-index: 5; background: rgba(15,23,42,0.55); color: #fff; border: none; border-radius: 7px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
@media (hover: hover) { .si-v-close:hover { background: rgba(15,23,42,0.8); } }
.si-v-stage { position: relative; flex: 1 1 60%; min-width: 0; background: #0c1018; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.si-v-img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; will-change: transform; }
.si-v-noimg { color: #5a6573; }
.si-v-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.14); color: #fff; border: none; border-radius: 50%; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
@media (hover: hover) { .si-v-arrow:hover { background: rgba(255,255,255,0.28); } }
.si-v-prev { left: 14px; } .si-v-next { right: 14px; }
.si-v-thumbs { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; gap: 6px; justify-content: center; overflow-x: auto; padding: 0 12px; }
.si-v-thumb { width: 46px; height: 34px; border-radius: 4px; background-size: cover; background-position: center; cursor: pointer; opacity: 0.55; border: 2px solid transparent; flex: 0 0 auto; }
.si-v-thumb.active { opacity: 1; border-color: #fff; }
.si-v-info { flex: 0 0 392px; max-width: 392px; display: flex; flex-direction: column; gap: 14px; padding: 22px; overflow-y: auto; border-left: 1px solid var(--line); }
.si-v-info-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 24px; }
.si-v-nav { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.si-v-nav button { width: 26px; height: 26px; border: 1px solid var(--line); background: var(--paper-card); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-soft); }
@media (hover: hover) { .si-v-nav button:hover:not(:disabled) { background: var(--paper-warm); } }
.si-v-nav button:disabled { opacity: 0.4; cursor: default; }
.si-v-loc { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-muted); }
.si-v-title { font-size: 18px; font-weight: 650; color: var(--ink); border: none; border-bottom: 1px solid transparent; padding: 2px 0; background: none; width: 100%; font-family: inherit; line-height: 1.3; resize: none; overflow: hidden; field-sizing: content; min-height: 1.7em; overflow-wrap: anywhere; }
@media (hover: hover) { .si-v-title:hover { border-bottom-color: var(--line); } }
.si-v-title:focus { outline: none; border-bottom-color: var(--brass); }
.si-v-head-right { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.si-v-share-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-card); color: var(--ink-muted); cursor: pointer; }
@media (hover: hover) { .si-v-share-btn:hover { color: var(--brass-dark); border-color: var(--ink-soft); } }
.si-v-controls { display: flex; flex-direction: column; gap: 12px; }
.si-v-field { display: flex; flex-direction: column; gap: 6px; }
.si-v-field > label, .si-v-updates > label, .si-v-subtasks > label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-muted); }
.si-v-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.si-v-pill { font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-card); color: var(--ink-soft); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.si-v-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ink-soft)); }
@media (hover: hover) { .si-v-pill:hover { border-color: var(--ink-soft); } }
.si-v-pill.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); color: var(--ink); }
.si-v-photometa { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12px; color: var(--ink-muted); }
.si-v-photometa a { color: var(--brass-dark); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
@media (hover: hover) { .si-v-photometa a:hover { text-decoration: underline; } }
.si-v-photometa span { display: inline-flex; align-items: center; gap: 4px; }
.si-v-counter { margin-left: auto; font-variant-numeric: tabular-nums; }
.si-v-desc { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 13px; font-family: inherit; resize: vertical; color: var(--ink); }
.si-v-desc:focus { outline: none; border-color: var(--brass); }
.si-v-updates { display: flex; flex-direction: column; gap: 8px; }
.si-v-updates-list { display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow-y: auto; }
.si-v-empty { font-size: 12.5px; color: var(--ink-muted); font-style: italic; padding: 4px 0; }
.si-v-subtasks { display: flex; flex-direction: column; gap: 7px; }
.si-v-sub-list { display: flex; flex-direction: column; gap: 1px; }
.si-v-sub-row { display: flex; align-items: center; gap: 8px; }
.si-v-sub-check { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line); background: var(--paper-card); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; }
.si-v-sub-check.done { background: var(--sage); border-color: var(--sage); }
.si-v-sub-title { flex: 1; min-width: 0; border: none; background: none; font-size: 13px; color: var(--ink); padding: 4px 2px; font-family: inherit; border-bottom: 1px solid transparent; }
.si-v-sub-title:focus { outline: none; border-bottom-color: var(--brass); }
.si-v-sub-title.done { text-decoration: line-through; color: var(--ink-muted); }
.si-v-sub-del { flex: 0 0 auto; border: none; background: none; color: var(--ink-muted); cursor: pointer; padding: 2px; opacity: 0; }
@media (hover: hover) { .si-v-sub-row:hover .si-v-sub-del { opacity: 1; } }
@media (hover: hover) { .si-v-sub-del:hover { color: var(--rust); } }
.si-v-sub-input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; }
.si-v-sub-input:focus { outline: none; border-color: var(--brass); }
.si-v-composer { display: flex; gap: 8px; align-items: flex-end; }
.si-v-composer textarea { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; resize: none; }
.si-v-composer textarea:focus { outline: none; border-color: var(--brass); }
@media (max-width: 860px) {
  .si-v-panel { flex-direction: column; height: 94vh; }
  .si-v-stage { flex: 0 0 44%; }
  .si-v-info { flex-basis: auto; max-width: none; border-left: none; border-top: 1px solid var(--line); }
}

/* in-view photo tools + lightweight modal */
.si-v-tools { position: absolute; top: 12px; left: 12px; z-index: 5; display: flex; gap: 6px; }
.si-v-tools button { background: rgba(15,23,42,0.55); color: #fff; border: none; border-radius: 8px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
@media (hover: hover) { .si-v-tools button:hover { background: rgba(15,23,42,0.8); } }
.si-modal-backdrop { position: fixed; inset: 0; z-index: 130; background: rgba(8,12,22,0.55); display: none; align-items: center; justify-content: center; padding: 24px; }
.si-modal-backdrop.show { display: flex; }
.si-modal-card { background: var(--paper-card); border-radius: 14px; width: min(440px, 96vw); max-height: 88vh; overflow-y: auto; padding: 22px; box-shadow: 0 24px 80px rgba(0,0,0,0.4); }
.si-modal-head { font-size: 16px; font-weight: 650; color: var(--ink); margin-bottom: 12px; }
.si-modal-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-muted); margin: 12px 0 5px; }
.si-modal-opt { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-muted); }
.si-modal-input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; color: var(--ink); background: var(--paper-card); }
.si-modal-input:focus { outline: none; border-color: var(--brass); }
.si-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.si-pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; }
.si-pick-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-card); cursor: pointer; }
@media (hover: hover) { .si-pick-row:hover { background: var(--paper-warm); border-color: var(--ink-soft); } }
.si-pick-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.si-pick-sub { font-size: 11.5px; color: var(--ink-muted); }

/* photo annotation overlay + pen tools */
.si-v-canvas { position: absolute; touch-action: none; transform-origin: center center; will-change: transform; }
.si-v-tools button.active { background: var(--brass); }
.si-v-tools button.si-v-save { width: auto; padding: 0 12px; gap: 5px; background: var(--brass); color: #fff; font-size: 12px; font-weight: 600; }
@media (hover: hover) { .si-v-tools button.si-v-save:hover { background: var(--brass-dark); } }
.si-v-colors { display: inline-flex; align-items: center; gap: 4px; background: rgba(15,23,42,0.55); border-radius: 8px; padding: 0 7px; height: 34px; }
.si-swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.45); cursor: pointer; padding: 0; }
.si-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.35); }
.si-v-danger { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--ink-muted); background: none; border: none; cursor: pointer; padding: 4px 2px; }
@media (hover: hover) { .si-v-danger:hover { color: var(--rust); } }
