/* Prevent user selection */
.prevent-select {
    user-select: none;
}

/* Main Bizon Slider */
#bizon-slider {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: #293133;
}

/* Main image section */
#bizon-main-image {
    height: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Поскольку миниатюры скрыты, основное изображение занимает всю высоту */
#bizon-main-image {
    height: 100% !important;
}

.bizon-single-image #bizon-main-image {
    height: 100%;
}

/* Image Wrapper */
#bizon-main-image-wrapper {
    height: calc(100% - 20px);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#bizon-main-image-wrapper img,
#bizon-main-image-wrapper video {
    border-radius: 5px;
    max-width: 100%;
    max-height: 100%;
}

/* Thumbnail Navigation */
#bizon-thumbnails {
    height: 8%;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

/* Скрываем миниатюры только в мобильной версии */
@media (max-width: 768px) {
    #bizon-thumbnails {
        display: none !important;
    }
}

.bizon-single-image #bizon-thumbnails {
    height: 0;
}

/* Individual Thumbnail */
.bizon-thumb-wrapper {
    height: calc(100% - 10px);
    padding: 5px;
    background: #2a2a2a;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.bizon-thumb-wrapper:hover,
.bizon-thumb-wrapper-active {
    background: #c9c9c9;
}

/* Thumbnail Images */
.bizon-thumb-wrapper img,
.bizon-thumb-wrapper video {
    height: 100%;
    border-radius: 5px;
}

/* Navigation Arrows */
.bizon-move-section {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15%;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    transition: background 0.2s ease-in-out;
}

.bizon-move-section:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Left and Right Navigation */
.bizon-move-section-left {
    left: 0;
    justify-content: flex-start;
}

.bizon-move-section-right {
    right: 0;
    justify-content: flex-end;
}

/* Arrow Icons */
.bizon-move-arrow {
    width: 48px;
    height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
}

.bizon-move-arrow-left {
    background-image: url(images/icons/48/arrow-left.png);
}

.bizon-move-arrow-right {
    background-image: url(images/icons/48/arrow-right.png);
}

/* Hide Arrows in Single Image Mode */
.bizon-single-image .bizon-move-arrow {
    display: none;
}

/* Close Button */
.bizon-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
    background: url(images/icons/48/close.png) no-repeat center;
    background-size: contain;
    cursor: pointer;
    transition: opacity 0.2s ease-in-out;
}

.bizon-close-button:hover {
    opacity: 0.7;
}

/* Hover Effect for Controls */
.bizon-move-section:hover .bizon-move-arrow,
.bizon-close-button:hover {
    filter: brightness(1.2);
}

/* Адаптивные правила для мобильных устройств */
@media (max-width: 768px) {
    #bizon-slider {
        overflow-x: hidden;
        max-width: 100vw;
        background: #000;
    }

    #bizon-main-image, #bizon-main-image-wrapper {
        overflow-x: hidden;
        max-width: 100vw;
    }

    #bizon-main-image-wrapper {
        padding: 5px;
        height: calc(100% - 10px);
    }

    #bizon-main-image-wrapper img,
    #bizon-main-image-wrapper video {
        border-radius: 0;
    }

    /* Адаптивные размеры кнопок */
    .bizon-move-arrow {
        width: 40px;
        height: 40px;
    }

    .bizon-close-button {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    /* Ограничение навигационных секций */
    .bizon-move-section {
        width: 12%;
    }
}

@media (max-width: 480px) {
    #bizon-slider {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    #bizon-main-image, #bizon-main-image-wrapper {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Еще меньшие размеры кнопок */
    .bizon-move-arrow {
        width: 35px;
        height: 35px;
    }
    
    .bizon-close-button {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
    
    /* Еще меньшие навигационные секции */
    .bizon-move-section {
        width: 10%;
    }
}

/* Специальные правила для горизонтального экрана */
@media (max-width: 768px) and (orientation: landscape) {
    #bizon-slider {
        overflow: hidden;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: #000;
        position: fixed;
        inset: 0;
    }

    #bizon-main-image {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden;
        width: 100vw;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #bizon-main-image-wrapper {
        height: 100vh !important;
        height: 100dvh !important;
        width: 100vw;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        overflow: hidden;
    }

    #bizon-main-image-wrapper img,
    #bizon-main-image-wrapper video {
        max-width: 100vw;
        max-height: 100vh;
        max-height: 100dvh;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 0;
        margin: 0 auto;
        display: block;
    }

    .bizon-move-arrow {
        width: 35px;
        height: 35px;
    }

    .bizon-close-button {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }

    .bizon-move-section {
        width: 8%;
    }
}
