.banner-popup {
    overflow-y: auto !important; 
    padding: 0 !important; 
}

.banner-popup .modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 3.5rem); 
    max-width: 600px; 
    margin: 1.75rem auto !important;
    padding: 15px;
}

.banner-popup .modal-content {
    position: relative;
    border: none;
    background: transparent !important;
    box-shadow: none;
    width: 100%;
    overflow: visible !important; 
}

.banner-popup .modal-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.banner-popup .modal-body {
    overflow: hidden;
    border-radius: 0.25rem;
}

.banner-popup-close-button {
    position: absolute;
    right: 5px; 
    top: 5px;
    font-size: 2.5rem !important;
    color: #ffffff !important;
    opacity: 1 !important;
    z-index: 9999;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8) !important;
    transition: transform 0.2s ease;
    background: rgba(0, 0, 0, 0.4) !important;
    border: none !important;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.banner-popup-close-button:hover,
.banner-popup-close-button:focus {
    transform: scale(1.15);
    color: #ffffff !important;
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.6) !important;
}

@media (max-width: 768px) {
    .banner-popup .modal-dialog {
        width: calc(100vw - 30px) !important;
        max-width: 100% !important;
        margin: 1rem auto !important;
        min-height: calc(100% - 2rem);
        padding: 10px !important;
    }
    
    .banner-popup .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important; 
    }

    .banner-popup .modal-body {
        overflow: hidden; 
    }

    .banner-popup .modal-content img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        object-fit: contain;
    }
    
    .banner-popup-close-button {
        top: 5px;
        right: 5px;
        font-size: 2rem !important;
        width: 32px;
        height: 32px;
    }
}