/**
 * Archive Gallery Popup Styles
 * Reuses and extends gallery popup styles from image-gallery module
 */

/* Make archive gallery items clickable with cursor pointer */
.archive-gallery-box-item {
    cursor: pointer;
}

/* Archive Gallery Popup - extends base .gallery-popup styles */
.gallery-popup.archive-gallery-popup .popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, calc(90vh * 1.5)); /* 3:2 ratio = 1.5 width multiplier */
    max-width: 1400px;
    margin: 0;
    background: transparent;
}

.gallery-popup.archive-gallery-popup .popup-main {
    display: flex;
    width: 100%;
}

.gallery-popup.archive-gallery-popup .popup-image-container {
    position: relative;
    background: #000;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.gallery-popup.archive-gallery-popup .popup-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Close button - positioned in top right of image */
.gallery-popup.archive-gallery-popup .popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(51, 51, 51, 0.85);
    color: #ffffff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Override base gallery hover effects - no hover effects */
.gallery-popup.archive-gallery-popup .popup-close:hover {
    background: rgba(51, 51, 51, 0.85);
    color: #ffffff;
    transform: none;
}

.gallery-popup.archive-gallery-popup .popup-close svg {
    width: 24px;
    height: 24px;
}

/* Navigation arrows - positioned on left and right sides */
.gallery-popup.archive-gallery-popup .popup-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(51, 51, 51, 0.85);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 15;
}

/* Override base gallery hover effects - no hover effects */
.gallery-popup.archive-gallery-popup .popup-nav:hover:not(:disabled) {
    background: rgba(51, 51, 51, 0.85);
    transform: translateY(-50%);
}

.gallery-popup.archive-gallery-popup .popup-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(51, 51, 51, 0.4);
}

.gallery-popup.archive-gallery-popup .popup-nav.popup-nav-prev {
    left: 40px;
}

.gallery-popup.archive-gallery-popup .popup-nav.popup-nav-next {
    right: 40px;
}

.gallery-popup.archive-gallery-popup .popup-nav svg {
    width: 28px;
    height: 28px;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .gallery-popup.archive-gallery-popup .popup-content {
        width: min(100vw, calc(100vh * 1.5));
        max-width: 100vw;
    }

    .gallery-popup.archive-gallery-popup .popup-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    .gallery-popup.archive-gallery-popup .popup-close svg {
        width: 20px;
        height: 20px;
    }

    .gallery-popup.archive-gallery-popup .popup-nav {
        width: 44px;
        height: 44px;
    }

    .gallery-popup.archive-gallery-popup .popup-nav.popup-nav-prev {
        left: 15px;
    }

    .gallery-popup.archive-gallery-popup .popup-nav.popup-nav-next {
        right: 15px;
    }

    .gallery-popup.archive-gallery-popup .popup-nav svg {
        width: 22px;
        height: 22px;
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-popup.archive-gallery-popup .popup-nav.popup-nav-prev {
        left: 20px;
    }

    .gallery-popup.archive-gallery-popup .popup-nav.popup-nav-next {
        right: 20px;
    }
}
