/* Scoped to photo reports and their monthly settings. */
#photoReportOverlay .sheet{box-sizing:border-box;width:min(100%,680px);max-height:94dvh!important;padding:16px 16px max(16px,env(safe-area-inset-bottom));overflow-x:hidden!important;overscroll-behavior:contain}
#photoReportBody{overflow-wrap:anywhere}
#photoReportBody *,#reportMonthlySummary *{box-sizing:border-box;min-width:0}
#photoReportBody button,#photoReportBody summary,#reportMonthlySummary button,#reportMonthlySummary summary,#reportPhotoSummary button{min-height:48px;touch-action:manipulation}
#photoReportBody button,#reportMonthlySummary button,#reportPhotoSummary button{padding:12px!important;border-radius:12px;font-size:14px;white-space:normal;background:var(--bg3,#29303e);color:var(--text,#fff);border:1px solid var(--border,#454959);margin-block:4px}
#photoReportBody .submit-btn:not(.secondary){background:var(--green,#00d6a0);color:#071c17;font-weight:700}
#photoReportBody button:disabled{opacity:.5}
#photoReportBody input:not([type=checkbox]),#photoReportBody select,#reportMonthlySummary input,#reportMonthlySummary select{min-height:48px;max-width:100%;width:100%;font-size:16px!important;padding:10px;border-radius:10px;background:var(--bg3,#29303e);color:var(--text,#fff);border:1px solid var(--border,#454959)}
#photoReportBody input[type=checkbox]{width:24px;height:24px;flex:0 0 24px;accent-color:#00d6a0}
#photoReportBody label:has(input[type=checkbox]){min-height:48px;align-items:center;padding:8px 0;gap:10px!important}
#photoReportBody label{display:block}
#photoReportBody summary,#reportMonthlySummary summary{padding:12px 4px;cursor:pointer}
#photoFiles>div{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px!important;padding:12px 0;border-bottom:1px solid var(--border)}
#photoFiles>div>span{grid-column:1/-1}
#photoFiles button{width:100%!important;min-width:48px}
#photoReportBody>.photo-help{margin-bottom:12px}
.photo-line{border-top:1px solid var(--border);padding:4px 0}
.photo-line>summary{font-weight:700;font-size:14px;line-height:1.6}
.photo-line-route{display:block;font-size:13px;font-weight:400;color:var(--text2);padding-left:16px}
#photoReportBody [role=status]{background:var(--bg2,#1c2130);padding:10px;border-radius:8px}
#photoReportBody>button:not(.submit-btn){display:block;width:100%;margin:8px 0}
#photoReportBody a{display:inline-block;padding:12px 0;min-height:48px}
#monthly-plan-date{min-width:160px;width:100%}
#monthly-add{min-width:80px;margin-left:8px}
#reportMonthlySummary div:has(>#monthly-plan-date){display:flex;gap:8px;align-items:center}
#monthly-dates button{margin:4px;min-width:48px}
#monthly-close{width:80px!important}
@media(max-width:360px){.photo-line>div:has(>label){grid-template-columns:minmax(0,1fr)!important}#photoReportOverlay .sheet{padding-inline:12px}}

#photoReportBody .photo-recovery button{display:block;width:100%;margin:8px 0}
#photoReportBody label.submit-btn{min-height:48px;padding:12px;border:1px solid var(--border,#454959);border-radius:12px;cursor:pointer}

/* Status occupies its own row; scrolling results never places it over an input. */
#photoReportOverlay .sheet{display:flex;flex-direction:column;overflow:hidden!important}
#photoReportOverlay .sheet>.sheet-handle,#photoReportOverlay .sheet>.sheet-title{flex-shrink:0}
#photoReportBody{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-bottom:8px}
#photoAnalysisProgress{flex-shrink:0;background:var(--surface2,#242b38);border:1px solid var(--mint,#00d6a0);border-radius:12px;padding:10px 12px;margin-bottom:12px;font-size:13px;line-height:1.5;color:var(--text,#fff)}
#photoAnalysisProgress[hidden]{display:none}
#photoProgressTitle{display:block;color:var(--mint,#00d6a0);font-size:15px}
#photoProgressTime{font-variant-numeric:tabular-nums;font-weight:700}
#photoProgressDetail{font-size:12px;color:var(--text2,#bac5d4)}
#photoProgressCheck{min-height:48px;font-size:13px;margin-top:8px;padding:8px}
#photoProgressCheck[hidden]{display:none}
@media(max-height:500px){#photoReportOverlay .sheet>.sheet-title{font-size:15px;margin-bottom:6px}#photoReportOverlay .sheet>.sheet-handle{display:none}#photoAnalysisProgress{padding:6px 10px;margin-bottom:8px}}

/* Optional correction actions wrap on narrow phones; originals stay on device. */
#photoFiles>.photo-selected-file{display:block!important;padding:10px 0;border-bottom:1px solid var(--border);font-size:12px}
#photoFiles .photo-selected-file>span{display:block;overflow-wrap:anywhere;margin-bottom:6px}
#photoFiles .photo-selected-file>div{display:flex;flex-wrap:wrap;gap:6px}
#photoFiles .photo-selected-file button{width:auto!important;min-height:48px;padding:8px 10px!important;font-size:12px}

/* Keep optional tools behind a single disclosure, without hiding required checks. */
#photoStatus:empty,#photoReviewIssues:empty,#photoPageIssues:empty{display:none}
#photoReportOverlay .photo-beta-label{display:block;font-size:11px;font-weight:400;color:var(--text2);margin-top:4px}
.photo-step{font-size:13px;font-weight:700;color:var(--mint,#00d6a0);margin:4px 0 8px}
.photo-intro{font-size:13px;line-height:1.6;margin:8px 0 12px}
#photoFiles>.photo-selected-file{border:1px solid var(--border);border-radius:10px;padding:0 8px;margin:6px 0}
#photoFiles>.photo-selected-file>summary{font-size:12px;overflow-wrap:anywhere;line-height:1.5}
#photoFiles>.photo-selected-file>div{padding-bottom:8px}
#photoReportBody>.photo-help{margin-top:12px;margin-bottom:0}
#photoReportBody>.photo-help>div{padding:4px 0 12px}
.photo-extra-actions button{display:block;width:100%;margin-top:8px}

/* Indeterminate until every selected image has returned; never invent a percentage. */
#photoProgressBar{height:8px;margin:10px 0;border-radius:999px;overflow:hidden;background:var(--border,#454959)}
#photoProgressBar[hidden]{display:none}
#photoProgressBar>span{display:block;width:40%;height:100%;border-radius:inherit;background:var(--mint,#00d6a0)}
#photoAnalysisProgress[data-running="true"] #photoProgressBar>span{animation:photo-reading-bar 1.5s ease-in-out infinite}
#photoAnalysisProgress[data-phase="complete"] #photoProgressBar>span{width:100%;animation:none}
@keyframes photo-reading-bar{0%{transform:translateX(-100%)}100%{transform:translateX(250%)}}
@media(prefers-reduced-motion:reduce){#photoAnalysisProgress[data-running="true"] #photoProgressBar>span{animation:none;transform:translateX(75%)}}
