/* ClokIt USA — published-report photo viewer polish */
@media screen and (min-width:761px){
  /* Keep complete field photos visible while using more of each report card's photo area. */
  .report-preview .report-photo-card img{
    width:100% !important;
    height:auto !important;
    aspect-ratio:4 / 3 !important;
    object-fit:contain !important;
    object-position:center !important;
    background:#eef3f7 !important;
    padding:2px !important;
  }
  .report-preview .esir-side-photo{
    justify-content:center !important;
    background:#eef3f7 !important;
  }
  .report-preview .esir-side-photo img,
  .report-preview .report-joist-photo img{
    width:100% !important;
    height:100% !important;
    min-height:190px !important;
    max-height:250px !important;
    object-fit:contain !important;
    object-position:center center !important;
    background:#eef3f7 !important;
  }
  .report-preview .esir-landscape-card .esir-side-photo img{
    min-height:205px !important;
  }
  .report-preview .esir-side-photo figcaption{
    margin-top:auto !important;
    background:#f8fafc !important;
  }

  /* Larger, calmer desktop viewer. */
  .esir-photo-lightbox{padding:14px !important;background:rgba(2,8,15,.91) !important}
  .esir-photo-lightbox-panel{width:min(1280px,97vw) !important;max-height:96vh !important;gap:8px !important}
  .esir-photo-lightbox-head,.esir-photo-lightbox-foot{border-radius:13px !important;padding:9px 11px !important}
  .esir-photo-lightbox-stage{min-height:320px !important;height:min(79vh,820px) !important;border-radius:14px !important;background:rgba(255,255,255,.035) !important}
  .esir-photo-lightbox-imgwrap{width:100% !important;height:100% !important;max-width:100% !important;max-height:100% !important}
  .esir-photo-lightbox-stage img{max-width:calc(100% - 84px) !important;max-height:77vh !important;width:auto !important;height:auto !important;object-fit:contain !important;margin:auto !important}

  /* Fewer controls: zoom out, zoom level, zoom in, one rotate direction, close. */
  .esir-photo-lightbox-tools > button:nth-of-type(3),
  .esir-photo-lightbox-tools > button:nth-of-type(5){display:none !important}
  .esir-photo-lightbox-tools{gap:6px !important;flex-wrap:nowrap !important}
  .esir-photo-lightbox-btn{height:36px !important;border-radius:10px !important;padding:0 11px !important;font-size:12px !important;display:inline-flex !important;align-items:center !important;justify-content:center !important}
  .esir-photo-lightbox-tools > button:nth-of-type(1),
  .esir-photo-lightbox-tools > button:nth-of-type(2),
  .esir-photo-lightbox-tools > button:nth-of-type(4){min-width:38px !important;width:38px !important;padding:0 !important;font-size:0 !important}
  .esir-photo-lightbox-tools > button:nth-of-type(1)::before{content:'−';font-size:20px;line-height:1}
  .esir-photo-lightbox-tools > button:nth-of-type(2)::before{content:'+';font-size:20px;line-height:1}
  .esir-photo-lightbox-tools > button:nth-of-type(4)::before{content:'↻';font-size:18px;line-height:1}
  .esir-photo-lightbox-zoomlabel{min-width:46px !important;font-size:11px !important;color:#e8eef4 !important}
  .esir-photo-lightbox-arrow{width:40px !important;height:40px !important;background:rgba(3,10,18,.5) !important}
  .esir-photo-lightbox-arrow.prev{left:10px !important}.esir-photo-lightbox-arrow.next{right:10px !important}
}

/* Phone viewer stays gesture-first and compact. */
@media screen and (max-width:760px){
  .esir-photo-lightbox{padding:8px !important;align-items:stretch !important}
  .esir-photo-lightbox-panel{width:100% !important;max-width:100% !important;max-height:100dvh !important;gap:6px !important}
  .esir-photo-lightbox-head{display:grid !important;grid-template-columns:minmax(0,1fr) auto !important;align-items:center !important;gap:8px !important;padding:8px 9px !important;border-radius:12px !important}
  .esir-photo-lightbox-title{font-size:11px !important;line-height:1.15 !important;min-width:0 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important}
  .esir-photo-lightbox-count{font-size:9px !important}
  .esir-photo-lightbox-tools{display:grid !important;grid-template-columns:34px 48px !important;gap:5px !important;align-items:center !important;justify-content:end !important}
  .esir-photo-lightbox-tools > button:nth-of-type(1),.esir-photo-lightbox-tools > button:nth-of-type(2),.esir-photo-lightbox-tools > button:nth-of-type(3),.esir-photo-lightbox-tools > button:nth-of-type(5),.esir-photo-lightbox-zoomlabel{display:none !important}
  .esir-photo-lightbox-tools > button:nth-of-type(4){width:34px !important;min-width:34px !important;height:34px !important;padding:0 !important;display:grid !important;place-items:center !important;border-radius:10px !important;font-size:0 !important}
  .esir-photo-lightbox-tools > button:nth-of-type(4)::before{content:'↻';font-size:19px;line-height:1}
  .esir-photo-lightbox-tools > button:last-child{width:48px !important;min-width:48px !important;height:34px !important;padding:0 6px !important;border-radius:10px !important;font-size:9px !important}
  .esir-photo-lightbox-stage{min-height:0 !important;height:min(64dvh,540px) !important;border-radius:12px !important;overflow:hidden !important;touch-action:none !important;overscroll-behavior:contain !important}
  .esir-photo-lightbox-imgwrap{width:100% !important;height:100% !important;max-width:100% !important;max-height:100% !important;display:grid !important;place-items:center !important;overflow:visible !important}
  .esir-photo-lightbox-stage img{max-width:100% !important;max-height:62dvh !important;object-fit:contain !important;margin:auto !important;transform-origin:center center !important}
  .esir-photo-lightbox-imgwrap:not(.zoomed){cursor:default !important}
  .esir-photo-lightbox-arrow{width:34px !important;height:34px !important;font-size:20px !important;z-index:3 !important}
  .esir-photo-lightbox-arrow.prev{left:6px !important}.esir-photo-lightbox-arrow.next{right:6px !important}
  .esir-photo-lightbox-foot{padding:8px 9px !important;border-radius:12px !important;gap:8px !important}
  .esir-photo-lightbox-foot .esir-photo-lightbox-caption{min-width:0 !important;font-size:9px !important;line-height:1.25 !important}
  .esir-photo-lightbox-foot > .esir-photo-lightbox-count{display:none !important}
}
