/* ══════════════════════════════════════════════════════════════
   BFCM 2026 popup (The Local Code)
   Temporal: link al dashboard de BFCM. Contenido fijo (solo inglés).
   Lo arma assets/js/bfcm-popup.js
   ══════════════════════════════════════════════════════════════ */

.bfcm-pop{
  --bp-bg:#054BE6;
  --bp-accent:#A9DCFF;
  --bp-w:640px;
  --bp-h:340px;
  --bp-gap:40px;
  position:fixed;
  right:var(--bp-gap);
  bottom:var(--bp-gap);
  z-index:9000;
  width:var(--bp-w);
  max-width:calc(100vw - 32px);
  pointer-events:none;
  font-family:'Plus Jakarta Sans',system-ui,sans-serif;
}

.bfcm-pop__box{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:var(--bp-h);
  padding:44px 40px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  border-radius:26px;
  color:#fff;
  background:var(--bp-bg) url("../img/bfcm-popup.jpg") 100% 30% / cover no-repeat;
  box-shadow:0 18px 48px rgba(0,10,60,.35);
  opacity:0;
  transform:translate3d(0,5%,0);
  pointer-events:auto;
}

/* blue gradient over the photo, softer towards the phone */
.bfcm-pop__box::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(90deg,
    #054BE6 0%,
    rgba(5,75,230,.95) 30%,
    rgba(5,75,230,.82) 48%,
    rgba(5,75,230,.62) 64%,
    rgba(5,75,230,.42) 80%,
    rgba(5,75,230,.3) 100%);
}

.bfcm-pop__content{
  max-width:318px;
}

.bfcm-pop__close{
  position:absolute;
  top:20px;
  right:20px;
  width:32px;
  height:32px;
  padding:0;
  border:0;
  background:none;
  cursor:pointer;
  z-index:2;
}
.bfcm-pop__close::before,
.bfcm-pop__close::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:22px;
  height:1.5px;
  background:#fff;
  transform:translate(-50%,-50%) rotate(45deg);
  transition:background-color .2s ease-out;
}
.bfcm-pop__close::after{ transform:translate(-50%,-50%) rotate(-45deg); }
.bfcm-pop__close:is(:hover,:focus-visible)::before,
.bfcm-pop__close:is(:hover,:focus-visible)::after{ background:var(--bp-accent); }

.bfcm-pop__heading{
  margin:0;
  font-size:30px;
  font-weight:500;
  line-height:1.12;
  letter-spacing:-.02em;
  color:#fff;
}
.bfcm-pop__heading em{
  font-style:italic;
  font-weight:500;
  color:var(--bp-accent);
}

.bfcm-pop__text{
  margin:12px 0 0;
  font-family:'Roboto',system-ui,sans-serif;
  font-size:14px;
  line-height:1.6;
  color:rgba(255,255,255,.86);
}

.bfcm-pop__btn{
  display:inline-flex;
  align-items:center;
  gap:12px;
  margin-top:22px;
  padding:5px 5px 5px 20px;
  border-radius:999px;
  background:#fff;
  color:#054BE6;
  font-family:'Roboto',system-ui,sans-serif;
  font-size:14px;
  font-weight:500;
  line-height:1;
  text-decoration:none;
  transition:background-color .2s ease-out, color .2s ease-out;
}
.bfcm-pop__btn i{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:50%;
  background:#054BE6;
  transition:transform .25s ease-out;
}
.bfcm-pop__btn svg{ width:14px; height:14px; }
@media (hover:hover){
  .bfcm-pop__btn:hover i{ transform:rotate(45deg); }
}

/* entrance / exit */
.bfcm-pop.is-visible .bfcm-pop__box{ animation:bfcmPopIn .4s ease-out forwards; }
.bfcm-pop.is-closing .bfcm-pop__box{ animation:bfcmPopOut .3s ease-out forwards; }

.bfcm-pop.is-visible :is(.bfcm-pop__heading,.bfcm-pop__text){
  animation:bfcmUp .6s cubic-bezier(.2,.7,.3,1) both;
}
.bfcm-pop.is-visible .bfcm-pop__heading{ animation-delay:.35s; }
.bfcm-pop.is-visible .bfcm-pop__text{ animation-delay:.5s; }
.bfcm-pop.is-visible .bfcm-pop__btn{ animation:bfcmPop .5s .65s cubic-bezier(.3,1.4,.5,1) both; }

@keyframes bfcmPopIn { from{opacity:0;transform:translate3d(0,5%,0)} to{opacity:1;transform:none} }
@keyframes bfcmPopOut{ from{opacity:1;transform:none} to{opacity:0;transform:translate3d(0,5%,0)} }
@keyframes bfcmUp    { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }
@keyframes bfcmPop   { from{opacity:0;transform:translateY(12px) scale(.9)} to{opacity:1;transform:none} }
@keyframes bfcmFade  { from{opacity:0} to{opacity:1} }
@keyframes bfcmFadeOut{ from{opacity:1} to{opacity:0} }

/* ── Mobile: full width at the bottom, photo on top, dark overlay behind ── */
@media (max-width:767px){
  .bfcm-pop{
    --bp-gap:16px;
    left:var(--bp-gap);
    right:var(--bp-gap);
    width:auto;
    max-width:none;
  }
  .bfcm-pop::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;
    background:rgba(0,3,25,.55);
    -webkit-backdrop-filter:blur(3px);
    backdrop-filter:blur(3px);
    opacity:0;
    pointer-events:none;
  }
  .bfcm-pop.is-visible::before{ animation:bfcmFade .4s ease-out forwards; }
  .bfcm-pop.is-closing::before{ animation:bfcmFadeOut .3s ease-out forwards; }

  .bfcm-pop__box{
    min-height:0;
    padding:150px 24px 28px;
    border-radius:20px;
    background-position:70% 20%;
  }
  .bfcm-pop__box::before{
    background:linear-gradient(180deg,
      rgba(5,75,230,.3) 0%,
      rgba(5,75,230,.8) 40%,
      #054BE6 62%);
  }
  .bfcm-pop__content{ max-width:none; }
  .bfcm-pop__heading{ font-size:24px; }
  .bfcm-pop__close{ top:14px; right:14px; }
}

@media (prefers-reduced-motion:reduce){
  .bfcm-pop.is-visible :is(.bfcm-pop__box,.bfcm-pop__heading,.bfcm-pop__text,.bfcm-pop__btn),
  .bfcm-pop.is-visible::before{
    animation:none;
    opacity:1;
    transform:none;
  }
}
