/* POPUP — BOOTSTRAP MODAL COM IMAGEM E BOTÃO */

/* ===== BASE ===== */

.popup-modal-dialog {
    --bs-modal-width: 90vw;
    height: 90vh !important;
    max-height: 90vh !important;
}

.popup-modal-content {
    border: none;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

/* Link da imagem */
.popup-img-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

/* Wrapper — se ajusta ao tamanho real da imagem */
.popup-img-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Imagem — tamanho natural, limitada pela viewport */
.popup-img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
}

/* Botão X — absoluto dentro do wrapper, sempre sobre a imagem */
.popup-btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background-color: #dc2626;
    color: #fff;
    border: none;
    border-radius: 50%;
    opacity: 1;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-size: 18px;
    line-height: 1;
}

.popup-btn-close:hover {
    background-color: #b91c1c;
    transform: scale(1.1);
}

/* ===== BREAKPOINTS ===== */

/* Tablet Portrait (768px – 991px) */
@media (max-width: 991px) {
    .popup-btn-close {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    .popup-modal-dialog {
        --bs-modal-width: 95vw;
    }

    .popup-img-wrap {
        border-radius: 8px;
    }

    .popup-btn-close {
        width: 48px;
        height: 48px;
        font-size: 22px;
        top: 8px;
        right: 8px;
    }
}
