/* Vicente Kids — WhatsApp flutuante */
.op-wa { position: fixed; left: 18px; bottom: 18px; z-index: 9990; font-family: 'Montserrat', sans-serif; transition: bottom .3s; }
.op-lgpd:not([hidden]) ~ .op-wa { bottom: 150px; }
.op-wa__btn {
    display: grid; place-items: center; width: 62px; height: 62px; background: #25D366; color: #fff; border: 0; border-radius: 50%;
    box-shadow: 0 10px 28px rgba(37,211,102,.45); cursor: pointer; transition: .2s; padding: 0; position: relative;
}
.op-wa__btn:hover { background: #1fb85a; transform: translateY(-2px) scale(1.05); }
.op-wa__label { /* rótulo vira tooltip flutuante ao lado do botão */
    position: absolute; left: 72px; top: 50%; transform: translateY(-50%); white-space: nowrap;
    background: #5b2a86; color: #fff; font-size: .8rem; font-weight: 600; padding: 7px 14px; border-radius: 99px;
    opacity: 0; pointer-events: none; transition: .25s;
}
.op-wa__btn:hover .op-wa__label, .op-wa__btn.is-pulse .op-wa__label { opacity: 1; }
.op-wa__btn.is-pulse::after {
    content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(37,211,102,.65);
    animation: op-wa-pulse 1.6s ease-out infinite;
}
@keyframes op-wa-pulse { 0% { transform: scale(.8); opacity: 1 } 100% { transform: scale(1.3); opacity: 0 } }
.op-wa__popup { position: absolute; left: 0; bottom: 66px; width: 340px; max-width: calc(100vw - 36px); background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; animation: op-wa-in .25s ease-out; }
.op-wa__popup[hidden] { display: none; }
@keyframes op-wa-in { from { transform: translateY(10px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.op-wa__head { display: flex; align-items: center; gap: 12px; background: #5b2a86; color: #fff; padding: 14px 16px; }
.op-wa__head strong { display: block; font-size: 1rem; }
.op-wa__head small { display: flex; align-items: center; gap: 6px; color: #eadcf4; font-size: .78rem; }
.op-wa__dot { width: 8px; height: 8px; border-radius: 50%; background: #888; }
.op-wa__dot.is-on { background: #25D366; box-shadow: 0 0 0 3px rgba(37,211,102,.25); }
.op-wa__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #3a1b59; }
.op-wa__avatar--fallback { display: grid; place-items: center; font-size: 1.3rem; }
.op-wa__close { margin-left: auto; background: none; border: 0; color: #eadcf4; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.op-wa__body { padding: 14px; background: #efe9f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='1' fill='%23d9cbe8'/%3E%3C/svg%3E"); }
.op-wa__bubble { background: #fff; border-radius: 4px 14px 14px 14px; padding: 10px 12px; font-size: .92rem; line-height: 1.45; color: #222; box-shadow: 0 1px 2px rgba(0,0,0,.08); max-width: 90%; }
.op-wa__quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.op-wa__chip { background: #fff; border: 1px solid #05bdc9; color: #c21e5e; border-radius: 99px; padding: 6px 12px; font-size: .8rem; font-weight: 500; text-decoration: none; transition: .15s; }
.op-wa__chip:hover { background: #e62e73; color: #fff; border-color: #e62e73; }
.op-wa__form { display: flex; gap: 8px; }
.op-wa__form input { flex: 1; border-radius: 99px; border: 1px solid #ddd; padding: 10px 14px; margin: 0; box-shadow: none; font-size: .9rem; background: #fff; }
.op-wa__form button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--vk-wa, #14783a); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; margin: 0; }
.op-wa__hint { display: block; margin-top: 10px; color: #777; font-size: .75rem; text-align: center; }

/* Produto */
.op-wa-buy { display: inline-flex; align-items: center; gap: 10px; background: var(--vk-wa, #14783a); color: #fff !important; border-radius: 99px; padding: 12px 22px; font-weight: 600; margin: 6px 0 16px; text-decoration: none; transition: .2s; }
.op-wa-buy:hover { background: var(--vk-wa-hover, #0e6a32); }

/* Pedido */
.op-wa-order { margin: 0 0 24px; padding: 18px 20px; border-radius: 14px; background: #eafaf0; border: 1px solid #bfe9cf; }
.op-wa-order .button { background: var(--vk-wa, #14783a); color: #fff; border-radius: 99px; margin: 0; }

/* Desktop: o dock assume o botão; popup abre centralizado acima do dock */
@media (min-width: 850px) {
    .op-wa__btn { display: none; }
    .op-wa__popup {
        position: fixed; left: 50%; right: auto; bottom: 104px;
        margin-left: -170px; /* metade dos 340px — sem transform (conflita com a animação) */
    }
}

@media (max-width: 849px) {
    .op-wa { left: 12px; bottom: 78px; }             /* acima da barra inferior mobile */
    .op-lgpd:not([hidden]) ~ .op-wa { bottom: 78px; opacity: 0; pointer-events: none; } /* some enquanto o banner está aberto */
    .op-lgpd { bottom: 64px; }                         /* acima da barra inferior */
    .op-wa__label { display: none; }
    .op-wa__btn { width: 54px; height: 54px; }
}

/* Mobile: popup nunca corta no topo — altura limitada com rolagem interna */
@media (max-width: 849px) {
    .op-wa__popup {
        position: fixed; left: 12px; right: 12px; bottom: 84px; width: auto; max-width: none;
        max-height: calc(100vh - 190px); display: flex; flex-direction: column;
    }
    .op-wa__head { position: sticky; top: 0; z-index: 2; }
    .op-wa__body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
    /* some enquanto o menu lateral está aberto */
    body.off-canvas-active .op-wa, body.mfp-active .op-wa, body.op-menu-aberto .op-wa { opacity: 0 !important; pointer-events: none !important; }
}
