/* Стили для формы загрузки изображений */
.cyber-image-upload-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cyber-image-upload-block {
    width: 100px;
    height: 100px;
    background: #101010;
    border: 2px solid #FFD700;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: opacity 0.3s;
}

.cyber-image-upload-block.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cyber-image-upload-block::before {
    content: '+';
    color: #FFD700;
    font-size: 36px;
    font-weight: bold;
}

.cyber-image-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cyber-image-preview-item {
    position: relative;
}

.cyber-image-preview-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #FFD700;
}

.cyber-image-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF0000;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

/* Стили для галереи изображений в отзыве */
.cyber-review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.cyber-review-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #FFD700;
    display: block; /* Ensure consistent rendering */
    box-sizing: border-box; /* Prevent padding/border issues */
}

.cyber-review-image:hover {
    opacity: 0.8;
}

/* Стили для модального окна галереи */
.cyber-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.cyber-gallery-content {
    position: relative;
    max-width: 900px; /* Соответствует ширине рендеринга */
    max-height: 1200px; /* Соответствует высоте рендеринга */
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    background: transparent;
}

.cyber-gallery-image {
    max-width: 900px; /* Соответствует ширине рендеринга */
    max-height: 550px; /* Соответствует высоте рендеринга */
    width: auto;
    height: auto;
    border-radius: 5px;
}

.cyber-gallery-prev, .cyber-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #FFD700;
    color: #101010;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
}

.cyber-gallery-prev {
    left: -40px;
}

.cyber-gallery-next {
    right: -40px;
}

.cyber-gallery-close {
    position: absolute;
    top: -30px;
    right: -30px;
    background: #FFD700;
    color: #101010;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .cyber-image-upload-block, .cyber-image-preview-item img {
        width: 80px;
        height: 80px;
    }

    .cyber-review-image {
        width: 80px;
        height: 80px;
    }

    .cyber-gallery-content {
        max-width: 95%;
        max-height: 95%;
    }

    .cyber-gallery-image {
        max-width: 100%; /* Адаптивная ширина для мобильных */
        max-height: 80vh; /* Ограничение по высоте для мобильных */
    }

    .cyber-gallery-prev, .cyber-gallery-next {
        padding: 6px;
        font-size: 16px;
        left: -30px;
        right: -30px;
    }

    .cyber-gallery-prev {
        left: -30px;
    }

    .cyber-gallery-next {
        right: -30px;
    }

    .cyber-gallery-close {
        top: -20px;
        right: -20px;
        padding: 3px 6px;
        font-size: 12px;
    }
}