.visits-panel section.visit-detail{padding:24px;margin-top:24px;border:1px solid #b9cebf;border-radius:20px;background:#fffdf8;overflow-wrap:anywhere}
.visit-detail-header h3{font-size:24px;line-height:1.3;margin:14px 0 10px}
.visit-detail-header p{margin:8px 0}
.visit-timestamps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}
.visit-timestamps>div{background:#f0f4eb;border:1px solid #e0e8df;border-radius:12px;padding:12px}
.visit-timestamps dt{font-size:12px;color:#47665c}
.visit-timestamps dd{font-size:14px;font-weight:500;margin:4px 0 0}
.visit-instructions{background:#f0f4eb;border-left:3px solid #4ca63e;border-radius:8px;padding:14px 16px;margin:16px 0}
.visit-instructions h4,.visit-photo-overview h4{margin:0 0 8px;font-size:16px}
.visit-instructions p{margin:0;white-space:pre-wrap}
.visit-detail-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.visit-detail-actions:empty{display:none}
.visits-panel .visit-detail-actions :is(button,.action-link){margin:0}
.visit-photo-overview{border:1px solid #b9cebf;border-radius:14px;background:#f0f4eb;padding:18px;margin:24px 0 16px}
.visit-photo-title{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}
.visit-photo-title strong{font-size:14px}
.visit-photo-overview p{font-size:13px;line-height:1.6;margin:10px 0 14px}
.visit-photo-overview progress{display:block;width:100%;height:8px;appearance:none;border:0;border-radius:8px;background:#d5e2d2;accent-color:#004d43;overflow:hidden}
.visit-photo-overview progress::-webkit-progress-bar{background:#d5e2d2;border-radius:8px}
.visit-photo-overview progress::-webkit-progress-value{background:#004d43;border-radius:8px}
.visit-photo-overview progress::-moz-progress-bar{background:#004d43;border-radius:8px}
.visit-photo-checklist{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.visit-photo-checklist li{display:flex;flex-wrap:wrap;gap:6px;justify-content:space-between;align-items:center;border:1px solid #cedbd3;background:#fffdf8;padding:10px;border-radius:9px;font-size:13px}
.visit-photo-checklist strong{color:#716047;font-size:12px}
.visit-photo-checklist li[data-received=true]{background:#e3f1df;border-color:#a7c49b}
.visit-photo-checklist li[data-received=true] strong{color:#285c24}
.visit-photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:20px}
.visits-panel .visit-photo-category{min-width:0;padding:16px;margin:0;border:1px solid #cedbd3;border-radius:14px;background:#fffdf8}
.visit-photo-category h4{font-size:17px;margin:0 0 8px}
.visit-photo-category p{font-size:13px;color:#47665c;margin:0 0 12px}
.visit-photo-category label{font-size:13px;margin:12px 0 6px}
.visit-photo-category input[type=file]{width:100%;padding:8px}
.visit-photo-category input[type=file]::file-selector-button{font-size:13px;padding:10px}
.visit-photo-category .visit-photos{gap:8px}
.visit-photo-category .visit-photos img{width:88px;height:88px}
.visit-detail>details{border-top:1px solid #cedbd3;padding-top:12px;margin-top:20px}
.visit-detail>details>summary{font-weight:500}
.visit-gallery .visit-photo-grid{margin-top:12px}
.visits-panel .visit-photo-thumb{display:flex;flex-direction:column;gap:6px;width:104px;min-height:120px;margin:0;padding:6px;border:1px solid #b9cebf;background:#f0f4eb;border-radius:12px;font-size:12px}
.visit-photo-thumb::before{content:none!important}
.visit-photo-thumb span{display:block;margin:auto}
.visit-photo-viewer{width:min(940px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:20px;border:1px solid #b9cebf;border-radius:20px;background:#fffdf8;color:#004d43;box-shadow:0 24px 80px #002d2a55;overflow:auto;overscroll-behavior:contain}
.visit-photo-viewer::backdrop{background:#002d2ae0}
.photo-viewer-top{display:flex;align-items:start;justify-content:space-between;gap:12px}
.photo-viewer-top h3{margin:0;font-size:21px;line-height:1.3}
.photo-viewer-top p,.photo-viewer-customer{margin:4px 0 12px;font-size:13px;overflow-wrap:anywhere}
.photo-viewer-frame{display:flex;align-items:center;justify-content:center;min-height:160px;height:min(55dvh,520px);border:1px solid #cedbd3;border-radius:12px;background:#e8f0e4;overflow:hidden}
.photo-viewer-frame img{display:block;width:100%;height:100%;object-fit:contain}
.photo-viewer-status{font-size:14px;line-height:1.5;margin:12px 0;overflow-wrap:anywhere}
.photo-viewer-status:empty{display:none}
.photo-viewer-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;margin-top:16px}
.visits-panel .visit-photo-viewer :is(button,.action-link){margin:0;min-height:44px;font-size:14px}
.visit-photo-viewer :is(button,.action-link)::before{content:none!important}
.photo-viewer-actions .action-link{background:#004d43;color:white}
@media(max-width:480px){.visit-photo-viewer{padding:14px}.photo-viewer-top h3{font-size:18px}.photo-viewer-actions button{flex:1;padding:10px 8px}.photo-viewer-actions .action-link{width:100%;text-align:center;justify-content:center}.photo-viewer-frame{height:44dvh}}
@media(max-width:700px){
 .visits-panel section.visit-detail{padding:16px}
 .visit-detail-header h3{font-size:21px}
 .visit-photo-grid{grid-template-columns:minmax(0,1fr)}
 .visit-photo-overview{padding:14px}
 .visit-photo-checklist{grid-template-columns:minmax(0,1fr)}
 .visit-detail-actions :is(button,.action-link){flex:1 1 100%}
}
@media(max-width:360px){
 .visits-panel section.visit-detail{padding:12px}
 .visit-timestamps{grid-template-columns:minmax(0,1fr)}
}

/* Shared gallery for coordination and the promoter's visit history. */
.visit-gallery{container-type:inline-size;min-width:0;margin:20px 0;color:#004d43}
.visit-gallery>.visit-photo-grid{grid-template-columns:minmax(0,1fr);gap:14px;margin-top:14px}
.visit-gallery .visit-photo-category{min-width:0;padding:14px;border:1px solid #cedbd3;border-radius:14px;background:#fffdf8}
.visit-gallery .visit-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.visit-gallery .visit-photos .visit-photo-thumb{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;width:100%;min-width:0;min-height:76px;margin:0;padding:8px;background:#e8f0e4;border:1px solid #c4d5c7;border-radius:10px;color:#004d43;font-size:12px;white-space:normal;box-shadow:none}
.visit-gallery .visit-photo-thumb img{width:56px;height:60px;max-width:50%;object-fit:cover;flex-shrink:0;border-radius:6px}
.visit-gallery .visit-photo-thumb span{margin:0;overflow-wrap:anywhere}
.visit-gallery .visit-photo-thumb:focus-visible{outline:3px solid #ff6945;outline-offset:2px}
.visit-photo-viewer{box-sizing:border-box}
.visit-photo-viewer :is(button,.action-link){box-sizing:border-box;min-height:44px;margin:0;font-size:14px}
@container(min-width:520px){.visit-gallery>.visit-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container(max-width:360px){.visit-gallery .visit-photos .visit-photo-thumb{flex-direction:column;gap:6px}.visit-gallery .visit-photo-thumb img{width:100%;max-width:100%;height:80px}.visit-gallery .visit-photo-thumb span{overflow-wrap:normal}}@container(max-width:230px){.visit-gallery .visit-photos{grid-template-columns:minmax(0,1fr)}}

.visit-upload .visit-photo-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.visit-upload .visit-photo-actions button{min-height:44px;flex:1 1 auto}
.visit-upload .visit-live-camera video,.visit-upload .visit-pending-photo{display:block;width:100%;max-width:34rem;max-height:52vh;object-fit:contain;border-radius:12px;background:#122724}
.visit-upload [hidden]{display:none!important}
