* {
    margin: 0;
    padding: 0;
}
#iviewer-lightbox{
  position:fixed;          /* <‑‑ was missing */
    inset:0;                 /* top:0; right:0; bottom:0; left:0 */
    width:100%;
    height:100%;
    background:rgba(0,0,0,.85);
    z-index:1060!important;
    pointer-events:auto!important;  
}
#iviewer-lightbox .controls{
    z-index:1062!important;
    pointer-events:auto!important
}
#iviewer-lightbox .viewer{
    z-index:1061!important;
    position:fixed;
    inset:0;
    right:40px;              /* 40‑px gutter for buttons */
    display:flex;
    justify-content:center;
    align-items:center;
    overflow:hidden;
}
/*#iviewer-lightbox .viewer img{
   
   
    top:50%!important;
    left:50%!important;
    transform:translate(-50%,-50%)!important
}*/
#iviewer-lightbox .iviewer_cursor{
    display: flex!important;
}

/*top:50%!important;
    left:50%!important;
    transform:translate(-50%,-50%)!important#iviewer-display {
    display: flex !important;       
    justify-content: center;        
    align-items:  center;           
    position: relative !important;   
    min-height: 100vh;                
}


#iviewer-display img {
    top: 0 !important;
    left: 0 !important;    display: flex !important;      
    justify-content: center;         
    align-items:  center;  
}*/

#iviewer-lightbox .controls {
    position: fixed;
    top: 0;
    right: 3px;
    width: 40px; 
}

#iviewer-lightbox .controls li {
    float: right;
    clear: right;
    position: relative;
    width: 40px;
    height: 40px;
    background-repeat: no-repeat;
    background-position: center center;
    display: block;
    cursor: pointer;
    z-index: 5;  border: 1px  solid #000;  margin-bottom: 5px; font-size:.7em; text-align:center;background:rgba(0,0,0,.5);
}

#iviewer-lightbox .controls:hover {
    cursor: pointer;
}
#iviewer-lightbox .controls .close,
#iviewer-lightbox .controls .zoomin,
#iviewer-lightbox .controls .zoomout,
#iviewer-lightbox .controls .prev,
#iviewer-lightbox .controls .next {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 24px 24px; /* Adjust if needed */
}

#iviewer-lightbox .controls .close { background-image: url('../../../images/iviewer/lightbox/btn_close.png'); }
#iviewer-lightbox .controls .zoomin { background-image: url('../../../images/iviewer/lightbox/btn_zoomin.png'); }
#iviewer-lightbox .controls .zoomout { background-image: url('../../../images/iviewer/lightbox/btn_zoomout.png'); }

#iviewer-lightbox .controls .prev { background-image: url('../../../images/iviewer/lightbox/btn_prev.png');}
#iviewer-lightbox .controls .next { background-image: url('../../../images/iviewer/lightbox/btn_next.png');}

#iviewer-lightbox .viewer {
    position: fixed;
    top: 0;
    right: 40px;
    left:0;
    z-index: 4;
    display: none;
}

#iviewer-lightbox .loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: url('../../../images/iviewer/lightbox/spinner.gif') no-repeat center center;
    z-index: 4;
}

#iviewer-lightbox             { z-index: 1060 !important; }  /* backdrop + viewer */
#iviewer-lightbox .viewer     { z-index: 1061 !important; }  /* image surface     */
#iviewer-lightbox .controls   { z-index: 1062 !important; }  /* + ⬆︎, ⬇︎, ✕ icons  */

/* just in case any parent sets pointer-events:none */
#iviewer-lightbox, 
#iviewer-lightbox .controls   { pointer-events: auto !important; }

/* @media (max-width: 768px){
  #iviewer-lightbox .viewer {
    height:700px !important;
  }
}*/