/* provet-cr-preview-r3-20261008 */
#imagingWork .imaging-cr-column { min-height: 0; overflow: hidden; }
.imaging-cr-preview { flex: 1 1 0; display: flex; flex-direction: column; min-height: 165px; }
.imaging-manual-link { flex: 0 1 auto; min-height: 0; margin-top: 8px; border-top: 1px solid #b7cbd5; padding-top: 7px; font-size: 11px; }
.imaging-manual-link > summary { cursor: pointer; color: #315f7b; line-height: 1.6; }
.imaging-manual-link > summary:focus-visible { outline: 2px solid #356c93; outline-offset: 2px; }
.imaging-manual-link[open] { flex: 0 1 50%; overflow: auto; }
.imaging-manual-body { padding-top: 5px; }
.imaging-manual-note { margin: 0 0 7px; color: #556f7d; line-height: 1.5; }
#imagingWork .imaging-manual-body .imaging-results { min-height: 0; overflow: visible; }
#imagingWork .imaging-manual-body .imaging-results:empty { display: none; }
.imaging-cr-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.imaging-cr-preview-heading h3 span { margin-left: 6px; font-size: 11px; font-weight: normal; }
.imaging-cr-preview-note, .imaging-cr-folder-note { margin: 5px 0; color: #556f7d; font-size: 11px; line-height: 1.5; }
.imaging-cr-folder-note { margin: 0; }
.imaging-cr-folder-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; }
.imaging-cr-folder-controls button { flex-shrink: 0; }
.imaging-cr-folder-controls span { flex: 1; min-width: 120px; color: #556f7d; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.imaging-cr-preview-status { padding: 5px 0; font-size: 11px; line-height: 1.4; color: #526f7d; }
.imaging-cr-preview-status.error { color: #972b27; }
.imaging-cr-preview-groups { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; padding: 0 4px 5px 0; }
.imaging-cr-group { margin: 0 0 10px; }
#imagingWork .imaging-cr-group h4 { margin: 0 0 5px; padding: 4px 6px; background: #e2ecf2; color: #355b71; font-size: 11px; font-weight: normal; }
.imaging-cr-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
#imagingWork button.imaging-cr-tile { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; min-height: 0; padding: 0; overflow: hidden; background: #14232c; border: 1px solid #9aafbc; cursor: zoom-in; }
.imaging-cr-tile img { display: block; width: 100%; height: 125px; object-fit: contain; color: #fff; background: #14232c; }
.imaging-cr-tile-name { display: block; box-sizing: border-box; width: 100%; padding: 5px 6px; color: #294f65; background: #f4f8fb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; text-align: left; }
.imaging-cr-tile.unavailable::after { content: "圖片暫時無法載入"; position: absolute; top: 46px; left: 0; right: 0; color: #fff; background: #7e3434; text-align: center; padding: 5px; font-size: 11px; }
.imaging-cr-lightbox { width: calc(100vw - 40px); height: calc(100vh - 40px); max-width: 1680px; max-height: calc(100vh - 40px); margin: auto; padding: 0; border: 1px solid #9aafbc; border-radius: 5px; background: #f4f8fb; color: #294f65; box-shadow: 0 16px 60px #0007; font: 14px/1.5 Arial, "Microsoft JhengHei", sans-serif; }
.imaging-cr-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.imaging-cr-lightbox::backdrop { background: rgba(7, 18, 24, .85); }
.imaging-cr-lightbox [hidden] { display: none !important; }
.imaging-cr-lightbox-head, .imaging-cr-lightbox-footer { display: flex; gap: 10px; align-items: center; padding: 8px 12px; }
.imaging-cr-lightbox-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.imaging-cr-lightbox button { flex-shrink: 0; padding: 6px 12px; min-height: 34px; border: 1px solid #8ea9b9; border-radius: 3px; background: #fff; color: #294f65; font: inherit; cursor: pointer; }
.imaging-cr-lightbox button:disabled { opacity: .4; cursor: default; }
.imaging-cr-lightbox button:focus-visible { outline: 2px solid #356c93; outline-offset: 2px; }
.imaging-cr-lightbox-stage { position: relative; min-height: 0; overflow: auto; background: #101a20; }
.imaging-cr-lightbox-stage img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
.imaging-cr-lightbox.original-size .imaging-cr-lightbox-stage img { width: auto; height: auto; margin: 0 auto; }
.imaging-cr-lightbox-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imaging-cr-lightbox-error { position: sticky; bottom: 10px; margin: 10px; padding: 10px; color: #fff; background: #7e3434; }
@media (max-width: 900px) {
    #imagingWork .imaging-cr-column { min-height: 400px; overflow: visible; }
    .imaging-manual-link[open] { flex: none; max-height: 360px; overflow: auto; }
    .imaging-cr-preview { flex: none; height: 360px; }
    .imaging-cr-lightbox { width: calc(100vw - 16px); height: calc(100vh - 16px); max-height: calc(100vh - 16px); }
    .imaging-cr-lightbox-footer { flex-wrap: wrap; gap: 5px; padding: 6px; }
    .imaging-cr-lightbox-label { flex-basis: 100%; }
}
