/* tienda/css/bienvenida.css — Popup "5 % en tu primera compra" (23-nov-2026, tienda/bienvenida.php).
   Estética Fast: negro, dorado y rojo; Anton para el número. Celular: hoja que sube desde abajo,
   inputs de 16px (iOS no hace zoom), X de 44px y alto con dvh. Transiciones suaves y sin
   movimiento si la persona lo pide (prefers-reduced-motion). */

.fb[hidden] { display: none !important; }
.fb { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; }
html.fb-bloqueo { overflow: hidden; }
.fb__fondo { position: absolute; inset: 0; background: rgba(10, 10, 10, .62); opacity: 0; transition: opacity .3s ease; }
.fb__caja {
  position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 34px 28px 22px; border-radius: 18px; color: #fafafa; text-align: center;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(201, 162, 39, .22), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, rgba(224, 18, 31, .2), transparent 60%),
    #0a0a0a;
  border: 1px solid rgba(201, 162, 39, .45); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  font-family: var(--fuente-cuerpo, 'Barlow', system-ui, sans-serif);
  opacity: 0; transform: translateY(18px) scale(.97);
  transition: opacity .32s ease, transform .38s cubic-bezier(.2, .9, .25, 1.1);
}
.fb--abierto .fb__fondo { opacity: 1; }
.fb--abierto .fb__caja { opacity: 1; transform: none; }

.fb__x {
  position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: transparent; color: #cfcfc7; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.fb__x svg { width: 22px; height: 22px; }
.fb__x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.fb__x:focus-visible, .fb__btn:focus-visible, .fb__no:focus-visible { outline: 2px solid var(--dorado-claro, #e6c75a); outline-offset: 2px; }

.fb__eyebrow { margin: 0 0 6px; font: 800 12px/1.3 var(--fuente-cuerpo, 'Barlow', sans-serif); letter-spacing: .18em; text-transform: uppercase; color: var(--dorado-claro, #e6c75a); }
.fb__titulo { margin: 0 0 12px; font-family: var(--fuente-display, 'Anton', sans-serif); font-weight: 400; text-transform: uppercase; line-height: .95; letter-spacing: .01em; }
.fb__titulo > span:last-child { display: block; font-size: 30px; color: #fafafa; }
.fb__pct {
  display: block; font-size: 104px; line-height: .9; color: var(--dorado, #c9a227);
  background: linear-gradient(180deg, #f3dc86 0%, #c9a227 55%, #9b7a14 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 6px 30px rgba(201, 162, 39, .25);
}
.fb__titulo--listo { font-size: 30px; outline: none; }
.fb__bajada { margin: 0 auto 18px; max-width: 34ch; font-size: 16px; line-height: 1.45; color: #dcdcd4; }
.fb__bajada b { color: #fff; }

.fb__form { margin: 0; text-align: left; }
.fb__lbl { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #cfcfc7; }
.fb__fila { display: flex; gap: 8px; }
.fb__fila input {
  flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #3a3a3a; background: #151515; color: #fff;
  font: 500 16px var(--fuente-cuerpo, 'Barlow', sans-serif); transition: border-color .15s ease, box-shadow .15s ease;
}
.fb__fila input::placeholder { color: #85857d; }
.fb__fila input:focus { outline: none; border-color: var(--dorado, #c9a227); box-shadow: 0 0 0 3px rgba(201, 162, 39, .25); }
.fb__fila input[aria-invalid="true"] { border-color: #ff5a4f; }
.fb__btn {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px;
  border: none; border-radius: 10px; background: var(--rojo, #e0121f); color: #fff; cursor: pointer;
  font: 400 17px/1 var(--fuente-display, 'Anton', sans-serif); letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(224, 18, 31, .35); transition: transform .15s ease, filter .2s ease;
}
.fb__btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.fb__btn[disabled] { cursor: progress; filter: saturate(.7); transform: none; }
.fb__btn--ancho { width: 100%; margin-top: 4px; }
.fb__spin { display: none; width: 17px; height: 17px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: fbGira .7s linear infinite; }
.fb__btn.cargando .fb__spin { display: inline-block; }
@keyframes fbGira { to { transform: rotate(360deg); } }
.fb__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb__err { margin: 8px 0 0; font-size: 14px; line-height: 1.35; color: #ff8a80; font-weight: 600; }
.fb__err[hidden] { display: none; }
.fb__legal { margin: 12px 0 0; font-size: 12.5px; line-height: 1.45; color: #9a9a92; }
.fb__legal a { color: #cfcfc7; text-decoration: underline; text-underline-offset: 2px; }
.fb__no {
  display: inline-block; margin-top: 10px; min-height: 44px; padding: 10px 14px; border: none; background: none; cursor: pointer;
  font: 600 14px var(--fuente-cuerpo, 'Barlow', sans-serif); color: #9a9a92; text-decoration: underline; text-underline-offset: 3px;
}
.fb__no:hover { color: #fff; }

/* Paso "listo": ticket con el código y confeti */
.fb__paso--listo { position: relative; }
.fb__ticket {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 16px; padding: 16px 18px;
  border-radius: 12px; background: #fafafa; color: #0a0a0a; text-align: left;
  border: 2px dashed var(--dorado, #c9a227);
}
.fb__ticket::before, .fb__ticket::after { content: ''; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #0a0a0a; }
.fb__ticket::before { left: -10px; }
.fb__ticket::after { right: -10px; }
.fb__ticket-lbl { position: absolute; top: -10px; left: 16px; padding: 0 6px; background: #fafafa; font: 800 11px/1.6 var(--fuente-cuerpo, 'Barlow', sans-serif); letter-spacing: .14em; text-transform: uppercase; color: #6b6b6b; border-radius: 4px; }
.fb__ticket-cod { font: 400 26px/1 var(--fuente-display, 'Anton', sans-serif); letter-spacing: .06em; }
.fb__ticket-pct { flex: none; padding: 6px 10px; border-radius: 8px; background: var(--rojo, #e0121f); color: #fff; font: 400 20px/1 var(--fuente-display, 'Anton', sans-serif); }
.fb__confeti { position: absolute; inset: -34px -28px auto; height: 220px; pointer-events: none; overflow: hidden; }
.fb__confeti i { position: absolute; top: -14px; width: 8px; height: 13px; border-radius: 2px; background: var(--dorado, #c9a227); opacity: 0; }
.fb__confeti i:nth-child(1)  { left: 5%;  background: var(--rojo, #e0121f); }
.fb__confeti i:nth-child(2)  { left: 12%; }
.fb__confeti i:nth-child(3)  { left: 20%; background: #fafafa; }
.fb__confeti i:nth-child(4)  { left: 28%; background: var(--rojo, #e0121f); }
.fb__confeti i:nth-child(5)  { left: 35%; background: var(--dorado-claro, #e6c75a); }
.fb__confeti i:nth-child(6)  { left: 43%; }
.fb__confeti i:nth-child(7)  { left: 51%; background: var(--rojo, #e0121f); }
.fb__confeti i:nth-child(8)  { left: 58%; background: #fafafa; }
.fb__confeti i:nth-child(9)  { left: 66%; background: var(--dorado-claro, #e6c75a); }
.fb__confeti i:nth-child(10) { left: 73%; background: var(--rojo, #e0121f); }
.fb__confeti i:nth-child(11) { left: 80%; }
.fb__confeti i:nth-child(12) { left: 87%; background: #fafafa; }
.fb__confeti i:nth-child(13) { left: 93%; background: var(--rojo, #e0121f); }
.fb__confeti i:nth-child(14) { left: 97%; background: var(--dorado-claro, #e6c75a); }

.fb__paso { animation: fbPaso .35s ease-out; }
@keyframes fbPaso { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .fb__paso--listo:not([hidden]) .fb__confeti i { animation: fbCae 1.6s cubic-bezier(.25, .6, .4, 1) forwards; }
  .fb__paso--listo:not([hidden]) .fb__confeti i:nth-child(odd) { animation-delay: .12s; animation-duration: 1.9s; }
  .fb__paso--listo:not([hidden]) .fb__confeti i:nth-child(3n) { animation-delay: .25s; }
  .fb__paso--listo:not([hidden]) .fb__ticket { animation: fbTicket .6s cubic-bezier(.3, 1.6, .5, 1) .1s backwards; }
  .fb--abierto .fb__pct { animation: fbLatido 2.6s ease-in-out 1s infinite; }
}
@keyframes fbCae { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(210px) rotate(540deg); } }
@keyframes fbTicket { from { opacity: 0; transform: scale(.7) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes fbLatido { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.06); } 16% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .fb__fondo, .fb__caja { transition: opacity .2s ease; transform: none; }
  .fb__paso { animation: none; }
}

/* Celular: hoja desde abajo, el botón bajo el correo (ancho completo) */
@media (max-width: 520px) {
  .fb { align-items: flex-end; padding: 0; }
  .fb__caja {
    width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; border-bottom: none;
    padding: 30px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%);
  }
  .fb--abierto .fb__caja { transform: none; }
  .fb__pct { font-size: 88px; }
  .fb__titulo > span:last-child { font-size: 26px; }
  .fb__fila { flex-direction: column; }
  .fb__btn { width: 100%; }
  .fb__confeti { inset: -30px -16px auto; }
}
