/* bfpcheckout — ⚡ "Pagar ahora" (Express OneClick) para la PÁGINA DE CARRITO (F0 DRY-RUN).
 *
 * Versión AUTOCONTENIDA del express: mismo lenguaje visual que el OPC (views/css/checkout.css,
 * bloque express) pero con clases propias `bfpx-*` y colores literales, para no depender de las
 * variables ni del árbol `.bfpchk` del OPC y no colisionar con él. El OPC está LIVE: no se toca.
 *
 * Sólo se muestra si el endpoint `expresspay?action=eligibility` declara al cliente elegible
 * (flag OFF + allowlist). El botón vive junto a "Proceder al pago"; la hoja/scrim/resultado son
 * position:fixed (su lugar en el DOM da igual). Paleta BFP verde (#6fae3f / #578d2f). */

/* ---- botón ⚡ (junto al CTA de checkout) ---- */
.bfpx-express{margin:10px 0 0}
.bfpx-xbtn{width:100%;border:none;border-radius:15px;cursor:pointer;padding:14px;
  background:linear-gradient(180deg,#6fae3f,#578d2f);color:#fff;
  box-shadow:0 8px 18px -6px rgba(111,174,63,.55);display:flex;flex-direction:column;gap:3px;
  align-items:center;line-height:1.15;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
.bfpx-xbtn .xb-lg{display:flex;align-items:center;gap:7px;font-size:16px;font-weight:700}
.bfpx-xbtn .xb-bolt{font-size:17px}
.bfpx-xbtn .xb-sub{font-size:11.5px;font-weight:500;opacity:.93}
.bfpx-xbtn:hover{filter:brightness(1.03)}
.bfpx-xbtn:focus-visible{outline:3px solid #578d2f;outline-offset:2px}
.bfpx-or{display:flex;align-items:center;gap:10px;color:#6b7785;font-size:12px;margin:10px 2px 2px}
.bfpx-or:before,.bfpx-or:after{content:"";flex:1;height:1px;background:#e6eaef}

/* ---- botón compacto del MINI-CARRITO de la cabecera (panel angosto) ----
   Se inyecta antes del CTA "proceder al pago". Verde BFP, ancho completo del panel, una línea. */
.blockcart .bfpx-mini{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;
  box-sizing:border-box;margin:0 0 8px;padding:11px 12px;border:none;border-radius:12px;cursor:pointer;
  background:linear-gradient(180deg,#6fae3f,#578d2f);color:#fff;font-size:14px;font-weight:700;
  line-height:1.1;text-align:center;
  box-shadow:0 6px 14px -6px rgba(111,174,63,.55);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
.blockcart .bfpx-mini .bfpx-mini-bolt{font-size:16px;line-height:1}
.blockcart .bfpx-mini:hover{filter:brightness(1.03)}
.blockcart .bfpx-mini:focus-visible{outline:3px solid #578d2f;outline-offset:2px}

/* Carrito: liberar la zona del pulgar para el ⚡ — fuera los flotantes globales que chocan
   (referido "Gana $2.000" y el launcher de Mateo). Solo en la página de carrito. */
body#cart #bfp_refer_top,body#cart #bfpc-launch{display:none !important}

/* ---- scrim ---- */
.bfpx-xscrim{position:fixed;inset:0;background:rgba(10,20,12,.42);opacity:0;
  transition:opacity .25s;z-index:2000}
.bfpx-xscrim.show{opacity:1}

/* ---- bottom-sheet ---- */
.bfpx-xsheet{position:fixed;left:0;right:0;bottom:0;z-index:2001;background:#fff;color:#1f2733;
  border-top-left-radius:22px;border-top-right-radius:22px;
  padding:8px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow:0 -14px 40px -12px rgba(24,40,20,.28);
  transform:translateY(102%);transition:transform .34s cubic-bezier(.2,.9,.25,1);
  max-width:520px;margin:0 auto;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
.bfpx-xsheet.up{transform:translateY(0)}
.bfpx-xsheet .xs-grab{width:40px;height:5px;border-radius:3px;background:#e6eaef;margin:6px auto 12px}
.bfpx-xsheet .xs-title{font-weight:700;font-size:16px;margin:0 0 12px;display:flex;align-items:center;gap:8px}
.bfpx-xsheet .xs-z{color:#578d2f}
.bfpx-xsheet .xs-dry{margin-left:auto;font-size:11px;font-weight:700;letter-spacing:.02em;
  color:#578d2f;background:#e7f3da;border-radius:999px;padding:3px 9px}
.bfpx-xsheet .xs-row{display:flex;align-items:center;gap:12px;padding:11px 0;
  border-bottom:1px solid #eef2ef;font-size:14px}
.bfpx-xsheet .xs-ic{width:34px;height:34px;border-radius:9px;background:#f6faf1;display:flex;
  align-items:center;justify-content:center;flex:0 0 auto;font-size:17px}
.bfpx-xsheet .xs-main{flex:1;min-width:0}
.bfpx-xsheet .xs-t{color:#6b7785;font-size:12px}
.bfpx-xsheet .xs-v{font-weight:600;word-break:break-word}
.bfpx-xsheet .xs-right{margin-left:auto;text-align:right;white-space:nowrap;font-weight:700}
.bfpx-xsheet .xs-totrow{display:flex;align-items:baseline;margin:14px 2px}
.bfpx-xsheet .xs-totrow .l{color:#6b7785;font-weight:600}
.bfpx-xsheet .xs-totrow .v{margin-left:auto;font-size:23px;font-weight:800;letter-spacing:-.02em}

/* ---- deslizar para pagar ---- */
.bfpx-xsheet .xs-slide{position:relative;height:58px;border-radius:15px;background:#f0f3f0;
  overflow:hidden;user-select:none;touch-action:none}
.bfpx-xsheet .xs-fill{position:absolute;inset:0;width:58px;
  background:linear-gradient(180deg,#6fae3f,#578d2f);border-radius:15px}
.bfpx-xsheet .xs-lbl{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-weight:700;color:#6b7785;font-size:14px;pointer-events:none}
.bfpx-xsheet .xs-knob{position:absolute;top:5px;left:5px;width:48px;height:48px;border:none;
  border-radius:11px;background:#fff;box-shadow:0 3px 8px rgba(0,0,0,.2);display:flex;
  align-items:center;justify-content:center;color:#578d2f;font-size:22px;cursor:grab;z-index:2;
  touch-action:none;font-family:inherit}
.bfpx-xsheet .xs-knob:active{cursor:grabbing}
.bfpx-xsheet .xs-knob:focus-visible{outline:3px solid #578d2f;outline-offset:2px}
.bfpx-xsheet .xs-cancel{display:block;width:100%;text-align:center;background:none;border:none;
  color:#93a1ad;font:inherit;font-size:13px;padding:14px 0 4px;cursor:pointer}

/* ---- resultado (overlay dry-run) ---- */
.bfpx-xresult{position:fixed;inset:0;z-index:2002;background:rgba(10,20,12,.5);display:flex;
  align-items:flex-end;justify-content:center;opacity:0;transition:opacity .28s}
.bfpx-xresult.show{opacity:1}
.bfpx-xresult .xr-inner{background:#fff;color:#1f2733;width:100%;max-width:520px;
  border-top-left-radius:22px;border-top-right-radius:22px;
  padding:30px 24px calc(28px + env(safe-area-inset-bottom));text-align:center;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
.bfpx-xresult .xr-check{width:66px;height:66px;border-radius:50%;background:#6fae3f;margin:0 auto;
  display:flex;align-items:center;justify-content:center;color:#fff;font-size:36px;
  box-shadow:0 10px 24px -8px rgba(111,174,63,.7);animation:bfpxXpop .4s cubic-bezier(.2,1.5,.4,1)}
.bfpx-xresult .xr-x{width:66px;height:66px;border-radius:50%;background:#e2503f;margin:0 auto;
  display:flex;align-items:center;justify-content:center;color:#fff;font-size:36px;font-weight:800}
.bfpx-xresult .xr-h{font-size:20px;font-weight:800;margin:16px 0 4px}
.bfpx-xresult .xr-sub{color:#3a4552;font-size:14px;margin:0 0 6px}
.bfpx-xresult .xr-note{color:#6b7785;font-size:12.5px;margin:0}
.bfpx-xresult .xr-again{margin-top:18px;background:none;border:none;color:#578d2f;font:inherit;
  font-weight:700;cursor:pointer;font-size:14px}
.bfpx-xresult .xr-again:focus-visible{outline:2px solid #578d2f;outline-offset:2px}
.bfpx-xresult .xr-link{display:inline-block;text-decoration:none}
.bfpx-xresult .xr-cancel{margin-top:12px;background:none;border:1px solid #d5dbe0;border-radius:10px;
  color:#6b7785;font:inherit;font-size:13px;padding:8px 14px;cursor:pointer;display:block;width:100%}
.bfpx-xresult .xr-cancel:hover{border-color:#e2503f;color:#e2503f}
.bfpx-xresult .xr-cancel:disabled{opacity:.6;cursor:default}
.bfpx-xresult .xr-spin{background:#e7a52b;font-size:30px;line-height:66px;animation:bfpxXspin 1.1s linear infinite}
@keyframes bfpxXpop{0%{transform:scale(.4);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes bfpxXspin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}

@media (min-width:560px){
  .bfpx-xsheet,.bfpx-xresult{align-items:center}
  .bfpx-xresult .xr-inner{border-radius:22px;max-width:440px}
}
@media (prefers-reduced-motion:reduce){
  .bfpx-xsheet,.bfpx-xscrim,.bfpx-xresult{transition:none}
  .bfpx-xresult .xr-check{animation:none}
}
@media (prefers-color-scheme:dark){
  .bfpx-xsheet,.bfpx-xresult .xr-inner{background:#18201a;color:#e8efe8}
  .bfpx-xsheet .xs-grab{background:#26302a}
  .bfpx-xsheet .xs-row{border-bottom-color:#1c241e}
  .bfpx-xsheet .xs-ic{background:#1e2e14}
  .bfpx-xsheet .xs-t,.bfpx-xsheet .xs-totrow .l,.bfpx-xsheet .xs-lbl{color:#9fb0a2}
  .bfpx-xsheet .xs-slide{background:#212a22}
  .bfpx-xsheet .xs-knob{background:#e8efe8;color:#2a4a12}
  .bfpx-xresult .xr-sub{color:#c4d3c6}
  .bfpx-xresult .xr-note{color:#9fb0a2}
}
