
.ftpm-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 15, 35, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .18s ease;
}

.ftpm-overlay.is-visible {
    display: flex;
}

.ftpm-overlay.is-open {
    opacity: 1;
}

.ftpm-dialog {
    position: relative;
    width: min(648px, 56.4vw);
    max-height: 90vh;
    transform: translateY(8px) scale(.985);
    transition: transform .18s ease;
}

.ftpm-overlay.is-open .ftpm-dialog {
    transform: translateY(0) scale(1);
}

.ftpm-dialog picture {
    display: block;
}

.ftpm-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .30);
}

.ftpm-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: #071a3a;
    font-size: 32px;
    line-height: 38px;
    font-family: Arial, sans-serif;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.16);
    transition: transform .15s ease, background .15s ease;
}

.ftpm-close:hover {
    transform: scale(1.06);
    background: #fff;
}

body.ftpm-modal-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .ftpm-overlay {
        padding: 0;
    }

    .ftpm-dialog {
        width: 60vw;
        max-height: 88vh;
    }

    .ftpm-image {
        max-height: 88vh;
        border-radius: 8px;
    }

    .ftpm-close {
        top: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
        font-size: 28px;
        line-height: 35px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ftpm-overlay,
    .ftpm-dialog,
    .ftpm-close {
        transition: none;
    }
}
