/* =========================
   AJ WEB SOFT POPUP BANNER
========================= */

.aj-popup {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.72);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 99999;

    opacity: 1;
    visibility: visible;

    transition: opacity 0.3s ease,
                visibility 0.3s ease;
}


/* Popup box */

.aj-popup-box {
    position: relative;

    width: min(1100px, 100%);
    max-height: 90vh;

    background: #fff;

    border-radius: 3px;

    overflow: visible;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

    animation: ajPopupShow 0.35s ease;
}


/* Banner image */

.aj-popup-image {
    display: block;

    width: 100%;
    height: auto;

    max-height: 90vh;

    object-fit: contain;

    border-radius: 3px;
}


/* Close button */

.aj-popup-close {
    position: absolute;

    top: -16px;
    right: -16px;

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: #111;
    color: #fff;

    font-size: 27px;
    line-height: 38px;

    text-align: center;

    cursor: pointer;

    z-index: 10;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);

    transition: all 0.25s ease;
}


/* X hover */

.aj-popup-close:hover {
    background: #2946f3;

    transform: rotate(90deg) scale(1.08);
}


/* Opening animation */

@keyframes ajPopupShow {

    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }

}


/* Closing */

.aj-popup.hide {
    opacity: 0;
    visibility: hidden;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .aj-popup {
        padding: 15px;
    }

    .aj-popup-box {
        width: 100%;
        max-height: 85vh;
    }

    .aj-popup-image {
        max-height: 85vh;
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .aj-popup-close {
        top: -12px;
        right: -8px;

        width: 34px;
        height: 34px;

        font-size: 24px;
        line-height: 34px;
    }

}


/* Small phones */

@media (max-width: 480px) {

    .aj-popup {
        padding: 10px;
    }

    .aj-popup-box {
        max-height: 90vh;
    }

    .aj-popup-image {
        max-height: 90vh;
    }

}