/* Popup para instalar a loja como aplicativo — só celular e tablet */

.op-app {
    position: fixed; inset: 0; z-index: 9975;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; font-family: 'Montserrat', sans-serif;
}
.op-app[hidden] { display: none; }

.op-app__fundo {
    position: absolute; inset: 0;
    background: rgba(30, 20, 46, .55);
    animation: op-app-fundo .25s ease both;
}

.op-app__cartao {
    position: relative; width: min(360px, 100%);
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 26px 22px 20px; border-radius: 22px;
    background: #fff; color: var(--vk-primaria-escura, #2b2140);
    box-shadow: 0 24px 60px rgba(30, 20, 46, .32);
    animation: op-app-entra .3s cubic-bezier(.2, .9, .3, 1.1) both;
}

@keyframes op-app-fundo { from { opacity: 0 } to { opacity: 1 } }
@keyframes op-app-entra {
    from { opacity: 0; transform: translateY(18px) scale(.96); }
    to   { opacity: 1; transform: none; }
}

.op-app__icone {
    display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 14px;
    border-radius: 20px; background: var(--vk-fundo-claro, #fff6f1);
}
.op-app__icone .op-mi { width: 32px; height: 32px; color: var(--vk-primaria, #e62e73); margin: 0; }

.op-app b {
    font-size: 1.08rem; font-weight: 600; line-height: 1.3;
}
.op-app > .op-app__cartao > span[data-op-texto] {
    display: block; margin-top: 7px; font-size: .88rem; line-height: 1.5; color: #6f6182;
}

/* Passo a passo, quando o navegador não oferece o botão nativo */
.op-app__passos {
    list-style: none; counter-reset: passo;
    margin: 16px 0 4px; padding: 0; width: 100%; text-align: left;
}
.op-app__passos[hidden] { display: none; }
.op-app__passos li {
    counter-increment: passo;
    position: relative; padding: 9px 0 9px 38px;
    font-size: .86rem; line-height: 1.45; color: #4a3a60;
    border-bottom: 1px solid #f1ebf8;
}
.op-app__passos li:last-child { border-bottom: 0; }
.op-app__passos li::before {
    content: counter(passo);
    position: absolute; left: 0; top: 8px;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--vk-primaria, #e62e73); color: #fff;
    font: 600 .78rem/24px 'Montserrat', sans-serif; text-align: center;
}

/* O Flatsome dá min-height e margem a todo <button>: aqui isso é zerado */
.op-app button {
    margin: 0; min-height: 0; border: 0; cursor: pointer;
    text-transform: none; box-shadow: none; letter-spacing: 0;
}

.op-app__sim {
    width: 100%; margin-top: 18px !important; height: 50px; border-radius: 99px;
    background: var(--vk-primaria, #e62e73); color: #fff;
    font: 600 .98rem/1 'Montserrat', sans-serif;
    transition: background .2s, transform .2s;
}
.op-app__sim:hover, .op-app__sim:active { background: var(--vk-primaria-escura, #6c2f9c); color: #fff; transform: translateY(-1px); }
.op-app__sim[hidden] { display: none; }

.op-app__nao {
    margin-top: 10px !important; padding: 10px 16px;
    background: none; color: #8d7f9e; font: 500 .86rem 'Montserrat', sans-serif;
    text-decoration: underline; text-underline-offset: 3px;
}
.op-app__nao:hover { color: var(--vk-primaria, #e62e73); }

.op-app__x {
    position: absolute; top: 10px; right: 12px;
    width: 30px; height: 30px; padding: 0; border-radius: 50%;
    background: none; color: #b3a7c2; font: 400 24px/30px 'Montserrat', sans-serif;
}
.op-app__x:hover { background: #fff3ee; color: var(--vk-primaria, #e62e73); }

/* Item fixo no menu do celular */
.op-item-instalar > a {
    display: flex !important; align-items: center; gap: 10px;
    margin: 10px 0 4px; padding: 12px 16px !important; border-radius: 12px;
    background: var(--vk-primaria, #e62e73); color: #fff !important;
    font-weight: 600 !important; text-transform: none !important;
}
.op-item-instalar > a .op-mi { width: 20px; height: 20px; color: #fff; margin: 0; }
.op-item-instalar[hidden], .op-item-ios[hidden] { display: none !important; }

.op-item-ios > span {
    display: block; padding: 10px 14px; margin: 8px 0;
    border-radius: 12px; background: var(--vk-fundo-claro, #fff6f1);
    color: #5b4a72; font-size: .8rem; line-height: 1.45;
}

/* O banner de cookies tem prioridade sobre a abertura AUTOMÁTICA;
   quem reexibe o popup depois é o JS, ao ver o banner fechar. */
.op-lgpd:not([hidden]) ~ .op-app { display: none; }

/* Pedido explícito do usuário nunca pode ser engolido: ao tocar em
   "Instalar o app" o popup abre mesmo com o aviso de cookies aberto, e
   por cima dele (o banner usa z-index 9998). Sem isto o botão do menu
   ficava sem reação — o JS tirava o hidden e o CSS anulava. */
.op-app.op-app--forcado { display: flex !important; z-index: 10002; }

/* Chamada no rodapé — a porta de volta depois de um "Agora não" */
.op-app-rodape {
    display: block; margin-top: 12px;
}
.op-app-rodape a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, .35);
    color: inherit !important; font-size: .82rem; font-weight: 600;
    text-decoration: none; transition: background .2s, border-color .2s;
}
.op-app-rodape a:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .6); }
.op-app-rodape .op-mi { width: 16px; height: 16px; margin: 0; }

/* Trava de segurança: no computador o popup e a chamada do rodapé nunca
   aparecem, mesmo que o JS falhe. Ponteiro fino + tela larga = computador. */
@media (pointer: fine) and (min-width: 1025px) {
    .op-app { display: none !important; }
    .op-app-rodape { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .op-app__fundo, .op-app__cartao { animation: none; }
}
