/**
 * Popup Styles
 * 
 * Estilos para os pop-ups do site
 * 
 * @version 1.0.0
 */

/* ==================== POPUP MODAL ==================== */
#sitePopupModal .site-popup-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: transparent;
}

#sitePopupModal .modal-header {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    padding: 15px;
    background: transparent;
}

#sitePopupModal .btn-close-white {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    opacity: 0.9;
    transition: all 0.3s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sitePopupModal .btn-close-white:hover {
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 1;
    transform: scale(1.1);
}

/* Custom close button to ensure visibility on any background */
.site-popup-close {
    background-color: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.site-popup-close i {
    font-size: 14px;
    line-height: 1;
}

.site-popup-close:hover {
    background-color: rgba(0,0,0,0.85);
    transform: scale(1.08);
}

/* Smaller on very small screens */
@media (max-width: 576px) {
    .site-popup-close {
        width: 32px;
        height: 32px;
    }
}

#sitePopupModal .popup-image {
    display: block;
    border-radius: 12px;
    max-height: 80vh;
    object-fit: contain;
    cursor: pointer;
}

#sitePopupModal .modal-body a {
    position: relative;
    display: block;
    transition: transform 0.2s ease;
}

#sitePopupModal .modal-body a:hover {
    transform: scale(1.02);
}

#sitePopupModal .modal-body a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s ease;
    border-radius: 12px;
    pointer-events: none;
}

#sitePopupModal .modal-body a:hover::after {
    background: rgba(0, 0, 0, 0.05);
}

/* Backdrop customizado */
#sitePopupModal.modal {
    backdrop-filter: blur(3px);
}

#sitePopupModal .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Animação de entrada */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#sitePopupModal.show .modal-dialog {
    animation: popupFadeIn 0.3s ease-out;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    #sitePopupModal .modal-dialog {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 576px) {
    #sitePopupModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    #sitePopupModal .btn-close-white {
        width: 32px;
        height: 32px;
    }

    #sitePopupModal .popup-image {
        max-height: 70vh;
    }
}

/* ==================== PRINT ==================== */
@media print {
    #sitePopupModal {
        display: none !important;
    }
}
