.magniview,
.magniview-close-area {
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    -webkit-user-select: none;
    user-select: none;
    width: 100%
}

.magniview.active,
.magniview.active .magniview-image img,
.magniview.active .magniview-video video {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1)
}

.magniview,
.magniview-image img,
.magniview-video video,
.mini-item {
    transition-duration: .35s
}

.magniview {
    align-items: center;
    background-color: rgba(0, 0, 0, .8);
    display: flex;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    z-index: 99999999999
}

.magniview.active {
    opacity: 1
}

.magniview-close-area {
    position: absolute
}

.magniview-tools-field {
    align-items: center;
    background-color: #fff;
    display: flex;
    gap: 16px;
    justify-content: end;
    padding: 16px;
    position: absolute;
    right: 40px;
    top: 48px
}

.magniview-rotate-field {
    align-items: center;
    display: flex;
    gap: 4px;
    justify-content: center
}

.magniview-close,
.magniview-download,
.magniview-fullscreen,
.magniview-in-image,
.magniview-out-image,
.magniview-rotate-clockwise,
.magniview-rotate-counter {
    align-items: center;
    cursor: pointer;
    display: flex;
    height: 20px;
    justify-content: center;
    width: 20px
}

.magniview-next-button,
.magniview-prev-button {
    background-color: #fff;
    border-radius: 100%;
    cursor: pointer;
    display: none;
    height: 40px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    z-index: 1e+24
}

.magniview-prev-button {
    align-items: center;
    justify-content: center;
    left: 40px;
    transition: left .5s ease
}

.magniview-next-button {
    align-items: center;
    justify-content: center;
    right: 40px;
    transition: right .5s ease
}

.magniview-next-button:hover {
    right: 35px
}

.magniview-prev-button:hover {
    left: 35px
}

.magniview-next-button.hidden,
.magniview-prev-button.hidden {
    display: none !important
}

.magniview-image,
.magniview-video {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    margin: auto;
    max-height: 100vh;
    max-width: 100vw;
    overflow: hidden;
    pointer-events: none;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
    width: 100%;
    z-index: 2
}

.magniview-image img,
.magniview-video video {
    height: auto; 
    width: auto;  
    max-height: 100vh; 
    max-width: 100vw;  
    height: inherit;
    margin-left: auto;
    margin-right: auto;
    object-fit: cover;
    width: auto
}

.magniview-gallery-list {
    align-items: center;
    bottom: 32px;
    display: flex;
    gap: 16px;
    justify-content: center;
    left: 50%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1420px;
    position: absolute;
    transform: translateX(-50%);
    width: 100%
}

.mini-item {
    border-radius: 4px;
    cursor: pointer;
    height: 80px;
    overflow: hidden;
    position: relative;
    transform: translateY(0);
    transition: width .5s ease;
    -webkit-user-select: none;
    user-select: none;
    width: 80px
}

.mini-item.active {
    width: 150px
}

.mini-item img,
.mini-item video {
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%
}

.magniview-preloader {
    align-items: center;
    display: none;
    justify-content: center;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 999
}

.spinner {
    animation: spin 1s linear infinite;
    border: 4px solid rgba(0, 0, 0, .1);
    border-radius: 50%;
    border-top-color: #333;
    height: 40px;
    width: 40px
}

@keyframes spin {
    to {
        transform: rotate(1turn)
    }
}

@media (max-width:1440px) {

    .magniview-image,
    .magniview-video {
        max-height: 100vh; 
        max-width: 100vw; 
    }
    
    .magniview-prev-button {
        left: 20px
    }

    .magniview-prev-button:hover {
        left: 15px
    }

    .magniview-next-button {
        right: 20px
    }

    .magniview-next-button:hover {
        right: 15px
    }
}

@media (max-width:1024px) {

   .magniview-image,
    .magniview-video {
        max-height: 50vh; 
        max-width: 90vw; 
    }

    .magniview-gallery-list {
        bottom: 60px;
        max-width: calc(100% - 20px);
        overflow: hidden
    }

    .mini-item.active {
        transform: translateY(-4px)
    }
}