/* Popup Overlay Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease-in-out;
}

.popup-overlay.active {
    display: flex;
}

/* Popup Container */
.popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
}

/* Popup Content */
.popup-content {
    position: relative;
    display: flex;
    flex-direction: column;
}

.popup-image-wrapper {
    position: relative;
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
}

.popup-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.popup-image.clickable {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.popup-image.clickable:hover {
    transform: scale(1.02);
}

/* Popup Footer */
.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    gap:4px;
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.popup-close:hover {
    background: #fff;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Don't Show Again Checkbox */
.dont-show-again {
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.dont-show-again input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dont-show-again label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

/* Close Text Button */
.popup-close-text,
.popup-detail-text {
    padding: 8px 20px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.popup-detail-text{
    background: var(--primary-color);
}

.popup-close-text:hover,
.popup-detail-text:hover {
    background: #5a6268;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .popup-container {
        max-width: 95%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .popup-image-wrapper {
        max-height: 60vh;
    }

    .popup-image {
        max-height: 60vh;
    }

    .popup-footer {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
    }

    .popup-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .dont-show-again label {
        font-size: 13px;
    }

    .popup-close-text,
    .popup-detail-text {
        width: 100%;
        padding: 10px;
        text-align:center;
    }
}

@media (max-width: 480px) {
    .popup-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .popup-image-wrapper {
        max-height: 55vh;
    }

    .popup-image {
        max-height: 55vh;
    }
}