/* Popup Flex — modal/painel que carrega uma página via AJAX.
   Como é um modal na mesma página (não window.open), nenhum
   bloqueador de popup interfere. */

/* Marcador (no editor mostra etiqueta; no front é invisível) */
.wm-popup-marcador { display: none; }
.elementor-editor-active .wm-popup-marcador { display: block; }
.wm-popup-marcador-edit {
    padding: 14px 16px;
    background: #eef2ff;
    border: 1px dashed #6366f1;
    border-radius: 10px;
    color: #3730a3;
    font-size: 13px;
    line-height: 1.5;
}
.wm-popup-marcador-edit code { background: #fff; padding: 1px 6px; border-radius: 4px; }

/* Overlay + caixa (injetados no <body> pelo JS) */
.wm-popup-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.wm-popup-modal.aberto { opacity: 1; visibility: visible; }

.wm-popup-bg {
    position: absolute;
    inset: 0;
    background: var(--wm-pop-over, rgba(0,0,0,.7));
}

.wm-popup-caixa {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--wm-pop-larg, 700px);
    max-height: 90vh;
    overflow: auto;
    background: var(--wm-pop-caixa, #fff);
    border-radius: var(--wm-pop-raio, 14px);
    box-shadow: 0 30px 90px rgba(0,0,0,.5);
    transform: translateY(24px) scale(.97);
    transition: transform .35s cubic-bezier(.16,1,.3,1);
    -webkit-overflow-scrolling: touch;
}
.wm-popup-modal.aberto .wm-popup-caixa { transform: none; }

/* Painel lateral */
.wm-popup-modal.lateral { align-items: stretch; }
.wm-popup-modal.lateral.lado-left  { justify-content: flex-start; }
.wm-popup-modal.lateral.lado-right { justify-content: flex-end; }
.wm-popup-modal.lateral .wm-popup-caixa {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
}
.wm-popup-modal.lateral.lado-left  .wm-popup-caixa { transform: translateX(-100%); }
.wm-popup-modal.lateral.lado-right .wm-popup-caixa { transform: translateX(100%); }
.wm-popup-modal.lateral.aberto .wm-popup-caixa { transform: none; }

/* Botão fechar */
.wm-popup-x {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 3;
    width: 40px; height: 40px;
    border: none;
    border-radius: 999px;
    background: rgba(0,0,0,.08);
    color: #111;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease;
}
.wm-popup-x:hover { background: rgba(0,0,0,.18); transform: rotate(90deg); }

/* Conteúdo carregado */
.wm-popup-conteudo { padding: 0; }

/* Spinner de carregamento */
.wm-popup-load {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}
.wm-popup-spin {
    width: 40px; height: 40px;
    border: 3px solid rgba(0,0,0,.15);
    border-top-color: #0066ff;
    border-radius: 50%;
    animation: wm-pop-spin .8s linear infinite;
}
@keyframes wm-pop-spin { to { transform: rotate(360deg); } }

body.wm-popup-lock { overflow: hidden !important; }
