/* Image lightbox (js/hipno-zoom.js). Same look as the Hipnoticus site's hipno-lb. */

a.hipno-zoom { display: inline-block; max-width: 100%; position: relative; line-height: 0; cursor: zoom-in; }
a.hipno-zoom > img { max-width: 100% !important; height: auto; }
a.hipno-zoom:after {
    content: "\2922";
    position: absolute; right: 8px; bottom: 8px;
    width: 28px; height: 28px; line-height: 28px; text-align: center;
    font-size: 16px; color: #fff; background: rgba(0, 0, 0, .45);
    border-radius: 4px; pointer-events: none;
    opacity: 0; transition: opacity .15s ease-in-out;
}
a.hipno-zoom:hover:after, a.hipno-zoom:focus:after { opacity: 1; }
@media (hover: none) { a.hipno-zoom:after { opacity: 1; } }
/*
 * The main product image. The theme positions #image absolutely (styles.css .product-image-zoom img) and gives
 * every link in the box display:block, position:relative and overflow:hidden (local.css). Out of flow, the image
 * gives the link no height, so the link collapsed to 0px and hid it. A static link leaves the image positioned
 * against the box again, as before the link existed, and lets it overflow nothing.
 */
.product-view .product-img-box .product-image a.hipno-zoom {
    display: block; position: static; overflow: visible; width: 100%; height: 100%;
}
/* Thumbnails are too small for the badge. */
.more-views a.hipno-zoom:after { display: none; }
.more-views a.hipno-zoom { cursor: pointer; }

.hipno-lb {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2147483000;
    background: rgba(0, 0, 0, .92);
    display: flex; align-items: center; justify-content: center;
    padding: 56px 72px; box-sizing: border-box;
    overflow: auto; -webkit-overflow-scrolling: touch;
    opacity: 0; transition: opacity .18s ease-out;
}
.hipno-lb.is-open { opacity: 1; }
.hipno-lb img {
    max-width: 100%; max-height: calc(100vh - 112px);
    width: auto; height: auto; display: block; margin: auto;
    cursor: zoom-in; transition: none;
}
.hipno-lb.is-zoomed { align-items: flex-start; justify-content: flex-start; cursor: grab; padding: 20px; }
@media (max-width: 600px) { .hipno-lb { padding: 56px 8px; } .hipno-lb-nav { top: auto; bottom: 40px; margin-top: 0; } }
.hipno-lb.is-zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.hipno-lb-close, .hipno-lb-nav {
    position: fixed; z-index: 2147483001;
    color: #fff; font-family: Arial, sans-serif; text-align: center; padding: 0;
    background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 6px; cursor: pointer;
}
.hipno-lb-close { top: 10px; right: 12px; width: 44px; height: 44px; line-height: 42px; font-size: 26px; }
.hipno-lb-nav { top: 50%; margin-top: -32px; width: 48px; height: 64px; line-height: 60px; font-size: 40px; }
.hipno-lb-prev { left: 12px; }
.hipno-lb-next { right: 12px; }
.hipno-lb-close:hover, .hipno-lb-close:focus, .hipno-lb-nav:hover, .hipno-lb-nav:focus { background: rgba(0, 0, 0, .85); outline: none; }
.hipno-lb.is-zoomed .hipno-lb-nav { display: none; }
.hipno-lb-count {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%); pointer-events: none;
    padding: 4px 12px; border-radius: 12px; background: rgba(0, 0, 0, .6);
    color: #fff; font: 13px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.hipno-lb-hint {
    position: fixed; bottom: 12px; left: 0; right: 0; text-align: center;
    color: rgba(255, 255, 255, .75); font-size: 12px;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    pointer-events: none;
}
body.hipno-lb-open { overflow: hidden !important; }
