/*
 * Popup FO CSS.
 *
 * @author      Difadi.com <soporte@difadi.com>
 * @copyright   2026 Difadi.com
 * @license     Commercial
*/

.dfdpopups-open {
    overflow: hidden;
}

.dfdpopups-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
}

.dfdpopups-overlay.dfdpopups-visible {
    display: flex;
}

.dfdpopups-modal {
    position: relative;
    box-sizing: border-box;
    max-height: 70dvh;
}

.dfdpopups-modal-content {
    width: 100%;
    overflow: hidden;
}

.dfdpopups-modal-image {
    display: inline-block;
    width: auto;
    min-width: 0;
    overflow: visible;
}

.dfdpopups-close {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dfdpopups-close:hover {
    opacity: .8;
}

/* Image */
.dfdpopups-image-wrapper,
.dfdpopups-image-wrapper a {
    display: flex;
    width: 100%;
    max-height: 70dvh;
}

.dfdpopups-image-wrapper .dfdpopups-image {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 70dvh;
    height: auto;
    object-fit: contain;
}

/* Content */
.dfdpopups-content {
    padding: 50px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-height: 70dvh;
    overflow-y: auto;
}

.dfdpopups-content .dfdpopups-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.dfdpopups-content .dfdpopups-text * {
    color: inherit;
    font-size: 18px;
}

.dfdpopups-content .dfdpopups-text a {
    text-decoration: underline;
}

.dfdpopups-content .dfdpopups-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {

    .dfdpopups-modal,
    .dfdpopups-image-wrapper,
    .dfdpopups-image-wrapper a,
    .dfdpopups-image-wrapper .dfdpopups-image,
    .dfdpopups-content {
        max-height: 90dvh;
    }

    .dfdpopups-overlay {
        padding: 10px;
    }
}