/* Pop-up Overlay Styles — Side-by-side layout (2 images) */

.dashboard-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dashboard-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.dashboard-popup-content {
    position: relative;
    max-width: 90vw;
    background-color: transparent;
    border-radius: 12px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.dashboard-popup-overlay.show .dashboard-popup-content {
    transform: scale(1);
}

/* When 2 images: container is wide enough for both */
.dashboard-popup-content.has-two {
    width: 1280px;
}

/* When 1 image: container matches original single-image size */
.dashboard-popup-content.has-one {
    width: 640px;
}

.dashboard-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.2s ease;
    padding: 0;
}

.dashboard-popup-close:hover {
    color: #ff4300;
}

/* Flex container for side-by-side images */
.dashboard-popup-images {
    display: flex;
    gap: 16px;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
}

/* Each image wrapper maintains 1:1 aspect ratio */
.dashboard-popup-image-wrapper {
    flex: 1 1 0;
    max-width: 640px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Single image: center and full size */
.dashboard-popup-images.single .dashboard-popup-image-wrapper {
    flex: 0 0 auto;
    width: 100%;
    max-width: 640px;
}

.dashboard-popup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 768px) {
    .dashboard-popup-content.has-two,
    .dashboard-popup-content.has-one {
        width: 90vw;
    }

    .dashboard-popup-images {
        flex-direction: column;
        align-items: center;
    }

    .dashboard-popup-image-wrapper {
        flex: 0 0 auto;
        width: 80vw;
        max-width: 480px;
    }

    .dashboard-popup-close {
        top: -35px;
        right: 5px;
    }
}
