/* Fabric image pop-up: the picture is centred and can be zoomed in close (see js/image-viewer.js) */
#FabricImagePopup .modal-dialog { width: min(920px, calc(100% - 20px)); margin: 0 auto; position: relative; top: 50%; transform: translateY(-50%) !important; }
#FabricImagePopup .modal-content { border-radius: 6px; overflow: hidden; }
#FabricImagePopup .modal-body { padding: 0; }
.iv-stage { position: relative; height: min(70vh, 640px); background: #f3f3f3; overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.iv-stage.is-zoomed { cursor: grab; }
.iv-stage.is-dragging { cursor: grabbing; }
.iv-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; transform-origin: center center; will-change: transform; -webkit-user-drag: none; pointer-events: none; }
.iv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid #e5e5e5; }
.iv-hint { margin: 0; color: #777; font-size: 13px; }
.iv-controls { display: flex; gap: 6px; flex: none; }
.iv-controls button { min-width: 38px; height: 36px; padding: 0 10px; border: 1px solid #ccc; border-radius: 4px; background: #fff; color: #333; font-size: 16px; line-height: 1; cursor: pointer; }
.iv-controls button:hover { background: #f0f0f0; }
.iv-controls button:disabled { opacity: .4; cursor: default; }
.iv-level { align-self: center; min-width: 48px; text-align: center; font-size: 13px; color: #555; }
@media (max-width: 575px) {
    .iv-stage { height: 60vh; }
    .iv-bar { flex-direction: column; align-items: stretch; }
    .iv-hint { text-align: center; }
    .iv-controls { justify-content: center; }
}

/* the close button: the site's default is white and sits outside the pop-up, so it was not visible */
#FabricImagePopup .modal-header { position: relative; padding: 12px 56px 12px 16px; }
#FabricImagePopup .modal-title { margin: 0; font-size: 18px; line-height: 1.3; }
#FabricImagePopup .modal-header .close { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 34px; height: 34px; margin: 0; padding: 0; border-radius: 50%; background: #1a2a3a; color: #fff; opacity: 1; font-size: 22px; line-height: 34px; text-align: center; text-shadow: none; }
#FabricImagePopup .modal-header .close:hover, #FabricImagePopup .modal-header .close:focus { background: #000; color: #fff; opacity: 1; }
