/* ===================
Image Lightbox Styles
====================== */

.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

.image-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-lightbox__container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    box-sizing: border-box;
}

.image-lightbox__content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-in-out;
    transition: opacity 0.3s ease-in-out;
}

.image-lightbox__image.loading {
    opacity: 0.5;
}

.image-lightbox__close,
.image-lightbox__prev,
.image-lightbox__next {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    z-index: 10000;
    padding: 0;
    outline: none;
}

.image-lightbox__close:hover,
.image-lightbox__prev:hover,
.image-lightbox__next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.image-lightbox__close:active,
.image-lightbox__prev:active,
.image-lightbox__next:active {
    transform: scale(0.95);
}

.image-lightbox__close {
    top: 20px;
    right: 20px;
}

.image-lightbox__prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.image-lightbox__next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.image-lightbox__prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.image-lightbox__next:hover {
    transform: translateY(-50%) scale(1.1);
}

.image-lightbox__prev:active {
    transform: translateY(-50%) scale(0.95);
}

.image-lightbox__next:active {
    transform: translateY(-50%) scale(0.95);
}

.image-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
}

.image-lightbox__content .svg-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .image-lightbox__container {
        padding: 40px 20px;
    }

    .image-lightbox__image {
        max-height: calc(100vh - 80px);
    }

    .image-lightbox__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .image-lightbox__prev,
    .image-lightbox__next {
        width: 40px;
        height: 40px;
    }

    .image-lightbox__prev {
        left: 10px;
    }

    .image-lightbox__next {
        right: 10px;
    }

    .image-lightbox__counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .image-lightbox__container {
        padding: 20px 10px;
    }

    .image-lightbox__image {
        max-height: calc(100vh - 60px);
    }

    .image-lightbox__close,
    .image-lightbox__prev,
    .image-lightbox__next {
        width: 36px;
        height: 36px;
    }

    .image-lightbox__content .svg-icon {
        width: 20px;
        height: 20px;
    }
}

