/* Pop-up Overlay - Fundo escurecido */
.popup-overlay {
    display: none; /* Inicialmente oculto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fundo escuro com 70% de opacidade */
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Container do Pop-up */
.popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background-color: transparent;
    border-radius: 10px;
    overflow: visible;
    animation: slideIn 0.4s ease-out;
}

/* Botão de fechar */
.popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    background-color: #fff;
    border: 3px solid #198754;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #198754;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.popup-close:hover {
    background-color: #198754;
    color: #fff;
    transform: rotate(90deg);
}

.popup-close i {
    pointer-events: none;
}

/* Conteúdo do Pop-up */
.popup-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Imagem do Pop-up */
.popup-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsividade para tablets */
@media (max-width: 768px) {
    .popup-container {
        max-width: 95%;
        max-height: 85vh;
    }

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

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

/* Responsividade para mobile */
@media (max-width: 480px) {
    .popup-container {
        max-width: 98%;
        max-height: 80vh;
    }

    .popup-close {
        top: -10px;
        right: -10px;
        width: 38px;
        height: 38px;
        font-size: 18px;
        border-width: 2px;
    }

    .popup-image {
        max-height: 80vh;
        border-radius: 5px;
    }
}

/* Prevenir scroll do body quando o pop-up estiver aberto */
body.popup-open {
    overflow: hidden;
}
