/* ===================================================
   WhatsApp QR Button — wqrb.css  v1.2.0
   =================================================== */

/* ── Botón flotante ──────────────────────────────── */
#wqrb-float-btn {
    position: fixed;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(0,0,0,.28);
    transition: transform .2s, box-shadow .2s;
    animation: wqrb-bounce-in .5s cubic-bezier(.34,1.56,.64,1) both;
}

#wqrb-float-btn:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

#wqrb-float-btn:active { transform: scale(.97); }

/* Posiciones */
#wqrb-float-btn.pos-bottom-right { bottom: 28px; right: 28px; }
#wqrb-float-btn.pos-bottom-left  { bottom: 28px; left:  28px; }
#wqrb-float-btn.pos-top-right    { top: 28px;    right: 28px; }
#wqrb-float-btn.pos-top-left     { top: 28px;    left:  28px; }

/* ── Overlay / Backdrop ─────────────────────────── */
#wqrb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 100000;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: wqrb-fade-in .2s ease both;
}

#wqrb-overlay.active { display: flex; align-items: center; justify-content: center; }

/* ── Popup / Modal ──────────────────────────────── */
#wqrb-popup {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: wqrb-pop-in .3s cubic-bezier(.34,1.56,.64,1) both;
}

/* Badge dispositivo */
#wqrb-device-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f9f4;
    color: #1a7a3c;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: .3px;
}

#wqrb-popup h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #111;
    line-height: 1.3;
}

#wqrb-popup p {
    margin: 0 0 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Logo */
#wqrb-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Imagen QR */
#wqrb-qr-img {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    border: 3px solid #25D366;
    padding: 6px;
    margin: 0 auto 18px;
    display: block;
    background: #fff;
}

/* Botón "Abrir WhatsApp" */
#wqrb-open-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 22px;
    border-radius: 50px;
    background: #25D366;
    box-shadow: 0 4px 14px rgba(37,211,102,.35);
    transition: transform .15s, box-shadow .15s;
    margin-bottom: 4px;
}
#wqrb-open-link:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(37,211,102,.45);
}

/* Botón cerrar */
#wqrb-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    transition: color .15s;
    padding: 4px 8px;
    border-radius: 50%;
}
#wqrb-close-btn:hover { color: #333; background: #f0f0f0; }

/* ── Animaciones ────────────────────────────────── */
@keyframes wqrb-bounce-in {
    from { opacity: 0; transform: scale(.7) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes wqrb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes wqrb-pop-in {
    from { opacity: 0; transform: scale(.8) translateY(30px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Responsive: en móvil el popup ocupa más ──── */
@media (max-width: 480px) {
    #wqrb-popup {
        padding: 28px 20px 22px;
        border-radius: 16px;
    }
    #wqrb-float-btn {
        font-size: 14px;
        padding: 12px 18px;
    }
    #wqrb-float-btn .wqrb-label {
        /* En móvil muy pequeño ocultamos el texto del botón */
        display: none;
    }
    #wqrb-float-btn.pos-bottom-right,
    #wqrb-float-btn.pos-bottom-left { bottom: 16px; }
    #wqrb-float-btn.pos-bottom-right { right: 16px; }
    #wqrb-float-btn.pos-bottom-left  { left:  16px; }
}

/* ── Accesibilidad: respetar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    #wqrb-float-btn,
    #wqrb-overlay,
    #wqrb-popup { animation: none; }
}
