/* =========================================================
   SHARED GALLERY MODAL
   ========================================================= */

#galleryModal{
    padding:0!important;
}

#galleryModal .modal-dialog{
    display:flex;
    width:min(1120px,calc(100% - 32px));
    max-width:1120px;
    height:calc(100vh - 32px);
    height:calc(100dvh - 32px);
    align-items:center;
    margin:16px auto;
}

#galleryModal .modal-content{
    display:flex;
    width:100%;
    height:min(800px,100%);
    min-height:0;
    max-height:100%;
    overflow:hidden;
    flex-direction:column;
    border:0;
    border-radius:16px;
    background:#111225;
    box-shadow:0 25px 70px rgba(20,21,64,.32);
}

#galleryModal .modal-header{
    flex:0 0 auto;
    min-height:62px;
    padding:15px clamp(18px,3vw,28px);
    border-bottom:1px solid rgba(255,255,255,.12);
    background:linear-gradient(
        135deg,
        #23245d,
        #3e3881
    );
    color:#fff;
}

#galleryModal .modal-title{
    margin:0;
    padding-right:18px;
    color:#fff;
    font-size:clamp(1rem,2vw,1.3rem);
    font-weight:800;
    line-height:1.35;
}

#galleryModal .btn-close{
    flex:0 0 auto;
    margin:0;
    opacity:.9;
}

#galleryModal .btn-close:hover{
    opacity:1;
}

#galleryModal .modal-body{
    position:relative;
    display:flex;
    min-height:0;
    flex:1 1 auto;
    align-items:stretch;
    padding:0;
    overflow:hidden;
    background:#111225;
}

/* =========================================================
   CAROUSEL
   ========================================================= */

.gvp-gallery-carousel{
    position:relative;
    width:100%;
    height:100%;
    min-height:0;
    overflow:hidden;
    background:#111225;
}

.gvp-gallery-carousel .carousel-inner{
    width:100%;
    height:100%;
    min-height:0;
}

.gvp-gallery-carousel .carousel-item{
    position:relative;
    width:100%;
    height:100%;
    min-height:0;
    overflow:hidden;
    background:#111225;
}

.gvp-gallery-image{
    display:block;
    width:100%!important;
    height:100%!important;
    min-width:100%;
    min-height:100%;
    margin:0 auto;
    background:#111225;
    object-fit:contain;
    object-position:center;
}

/* =========================================================
   IMAGE NUMBER
   ========================================================= */

.gvp-gallery-number{
    position:absolute;
    top:14px;
    right:14px;
    z-index:20;
    display:inline-flex;
    min-width:74px;
    min-height:36px;
    align-items:center;
    justify-content:center;
    padding:7px 12px;
    border:1px solid rgba(255,255,255,.25);
    border-radius:999px;
    background:rgba(15,16,40,.78);
    color:#fff;
    font-size:13px;
    font-weight:800;
    letter-spacing:.06em;
    line-height:1;
    box-shadow:0 5px 18px rgba(0,0,0,.25);
    backdrop-filter:blur(7px);
}

/* =========================================================
   CAROUSEL CONTROLS
   ========================================================= */

.gvp-gallery-carousel .carousel-control-prev,
.gvp-gallery-carousel .carousel-control-next{
    top:50%;
    bottom:auto;
    width:46px;
    height:46px;
    border:1px solid rgba(255,255,255,.22);
    border-radius:50%;
    background:rgba(20,21,55,.78);
    opacity:1;
    transform:translateY(-50%);
    box-shadow:0 6px 20px rgba(0,0,0,.25);
    backdrop-filter:blur(6px);
    transition:
        background .2s ease,
        transform .2s ease;
}

.gvp-gallery-carousel .carousel-control-prev{
    left:16px;
}

.gvp-gallery-carousel .carousel-control-next{
    right:16px;
}

.gvp-gallery-carousel .carousel-control-prev:hover,
.gvp-gallery-carousel .carousel-control-next:hover{
    background:#6266ea;
    transform:translateY(-50%) scale(1.06);
}

.gvp-gallery-carousel .carousel-control-prev-icon,
.gvp-gallery-carousel .carousel-control-next-icon{
    width:18px;
    height:18px;
}

.gvp-gallery-carousel
.carousel-control-prev[hidden],
.gvp-gallery-carousel
.carousel-control-next[hidden]{
    display:none!important;
}

/* =========================================================
   EMPTY AND IMAGE ERROR STATES
   ========================================================= */

.gvp-gallery-empty,
.gvp-gallery-unavailable{
    width:100%;
    height:100%;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    padding:30px;
    color:#fff;
    text-align:center;
}

.gvp-gallery-empty{
    display:flex;
}

.gvp-gallery-empty[hidden]{
    display:none!important;
}

.gvp-gallery-unavailable{
    display:flex;
}

.gvp-gallery-empty i,
.gvp-gallery-unavailable i{
    margin-bottom:14px;
    color:#aeb1ff;
    font-size:clamp(2rem,5vw,3.4rem);
}

.gvp-gallery-empty h3{
    margin:0 0 8px;
    color:#fff;
    font-size:20px;
    font-weight:800;
}

.gvp-gallery-empty p,
.gvp-gallery-unavailable p{
    margin:0;
    color:rgba(255,255,255,.72);
    font-size:14px;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:767px){

    #galleryModal .modal-dialog{
        width:calc(100% - 14px);
        height:calc(100vh - 14px);
        height:calc(100dvh - 14px);
        margin:7px auto;
    }

    #galleryModal .modal-content{
        height:100%;
        border-radius:12px;
    }

    #galleryModal .modal-header{
        min-height:56px;
        padding:13px 16px;
    }

    #galleryModal .modal-title{
        font-size:1rem;
    }

    .gvp-gallery-number{
        top:10px;
        right:10px;
        min-width:66px;
        min-height:32px;
        padding:6px 10px;
        font-size:11px;
    }

    .gvp-gallery-carousel .carousel-control-prev,
    .gvp-gallery-carousel .carousel-control-next{
        width:39px;
        height:39px;
    }

    .gvp-gallery-carousel .carousel-control-prev{
        left:8px;
    }

    .gvp-gallery-carousel .carousel-control-next{
        right:8px;
    }

}

/* =========================================================
   SHORT LANDSCAPE SCREENS
   ========================================================= */

@media(max-height:550px){

    #galleryModal .modal-dialog{
        width:calc(100% - 14px);
        height:calc(100vh - 14px);
        height:calc(100dvh - 14px);
        margin:7px auto;
    }

    #galleryModal .modal-content{
        height:100%;
        border-radius:10px;
    }

    #galleryModal .modal-header{
        min-height:48px;
        padding:9px 16px;
    }

    #galleryModal .modal-title{
        font-size:.95rem;
    }

    .gvp-gallery-number{
        top:8px;
        right:8px;
    }

}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media(prefers-reduced-motion:reduce){

    .gvp-gallery-carousel .carousel-item,
    .gvp-gallery-carousel .carousel-control-prev,
    .gvp-gallery-carousel .carousel-control-next{
        transition:none;
    }

}