/* Card thumbnails and the accessible, independent image viewer. */
.gallery-ready #zoom_images {display:flex;position:relative;align-items:center;justify-content:center;min-height:240px;cursor:zoom-in;border-radius:8px;outline-offset:4px}
.gallery-ready #zoom_images .general_image {max-width:100%;max-height:320px;width:auto;height:auto;object-fit:contain}
.gallery-ready .catalog-element-image>table,.gallery-ready .catalog-element-image>table>tbody {display:block;width:100%!important;height:auto!important}
.gallery-ready .catalog-element-image>table>tbody>tr {display:flex;flex-direction:column-reverse}
.gallery-ready .catalog-element-image>table>tbody>tr>td,.gallery-ready .catalog-element-image>table>tbody>tr>td:first-child {display:block;width:100%!important}
.gallery-ready .catalog-element-scollimages {width:100%;height:auto!important;margin:12px 0 0}
.gallery-ready .scollimages-body {display:flex;width:100%;max-width:100%;height:auto!important;overflow-x:auto;gap:8px;margin:0;padding:4px;box-sizing:border-box}
.gallery-ready .scollimages-a {flex:0 0 64px;width:64px;height:64px;margin:0;padding:4px;border:2px solid #e1e8ed;border-radius:6px;box-sizing:border-box}
.gallery-ready .scollimages-a.zoomThumbActive_parent {border-color:#0aa6d4}
.gallery-ready .scollimages-a a {display:flex;align-items:center;justify-content:center;width:100%;height:100%;cursor:pointer;outline-offset:3px}
.gallery-ready .scollimages-a img {max-width:100%;max-height:100%;width:auto;height:auto;opacity:1!important}
.gallery-ready .scollimages-left,.gallery-ready .scollimages-right {display:none!important}
.gallery-card-tools {display:flex;align-items:center;justify-content:center;gap:20px;margin:14px 0 4px}
.gallery-card-arrow {width:44px;height:44px;border:1px solid #cbdbe3;background:#f1f8fb;color:#087eab;border-radius:8px;font-size:28px;cursor:pointer}
.gallery-card-counter {font-size:14px;color:#526b78;font-variant-numeric:tabular-nums}
.gallery-hint {font-size:12px;color:#667d89;text-align:center;margin:8px 0 12px}
.gallery-card-status {color:#667d89;font-size:14px;padding:24px;text-align:center}
.photo-viewer {display:none;position:fixed;inset:0;width:100%;height:100vh;height:100dvh;max-width:none;max-height:none;box-sizing:border-box;border:0;margin:0;padding:16px;background:rgba(9,24,34,.87);z-index:2147483000;color:#183642}
.photo-viewer[open] {display:flex;align-items:center;justify-content:center}
.photo-viewer::backdrop {background:rgba(9,24,34,.8)}
.photo-viewer * {box-sizing:border-box}
.photo-panel {display:flex;flex-direction:column;max-width:1200px;width:100%;height:100%;max-height:900px;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 20px 80px #0005}
.photo-head {display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid #e2eaf0;flex:none}
.photo-caption {flex:1;min-width:0;font:700 16px/1.4 Arial,sans-serif;overflow-wrap:anywhere}
.photo-viewer button {font-family:Arial,sans-serif;cursor:pointer;border:1px solid #cbdbe3;background:#f1f8fb;color:#087eab;border-radius:7px;min-width:44px;min-height:44px;flex:none}
.photo-zoom {padding:8px 14px;font-size:14px}
.photo-close,.photo-arrow {font-size:28px;line-height:1;width:44px;height:44px}
.photo-stage {position:relative;flex:1;min-height:0;overflow:hidden;touch-action:pan-y;background:#fff}
.photo-canvas {width:100%;height:100%;padding:20px}
.photo-image {display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;user-select:none;-webkit-user-select:none;cursor:zoom-in}
.photo-stage.is-zoomed {overflow:auto;touch-action:pan-x pan-y}
.photo-stage.is-zoomed .photo-canvas {width:200%;height:200%}
.photo-stage.is-zoomed .photo-image {cursor:zoom-out}
.photo-status {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font:16px/1.5 Arial,sans-serif;color:#667d89;pointer-events:none;text-align:center;padding:20px}
.photo-foot {display:flex;align-items:center;justify-content:center;gap:32px;padding:10px 16px;border-top:1px solid #e2eaf0;flex:none}
.photo-count {font:14px Arial,sans-serif;font-variant-numeric:tabular-nums;min-width:50px;text-align:center}
.photo-viewer [hidden],.gallery-ready #zoom_images [hidden],.gallery-card-tools [hidden] {display:none!important}
.photo-viewer button:disabled {opacity:.45!important;cursor:default}
.photo-viewer button:focus-visible,.gallery-card-arrow:focus-visible,.gallery-ready #zoom_images:focus-visible {outline:3px solid #087eab;outline-offset:3px}
@media(max-width:599px){.photo-viewer{padding:8px}.photo-panel{border-radius:9px}.photo-head{padding:10px;gap:8px;flex-wrap:wrap}.photo-caption{font-size:14px;flex-basis:calc(100% - 60px)}.photo-close{order:1}.photo-zoom{order:2;min-height:38px!important;width:100%}.photo-canvas{padding:8px}.photo-foot{padding-bottom:max(10px,env(safe-area-inset-bottom))}.gallery-ready #zoom_images{min-height:210px}}
