/*
 * fv2026 · Balloons (js/fv-globos.js). Loaded only by footer.tpl when fv-config.tpl sets $fv_globos.
 * Own colours (no theme tokens), every class prefixed fvg-, everything position: fixed (no layout shift).
 * Stacking, as the bulb (css/fv-bright.css): the card (95) under the canvas (96), so the confetti falls in front
 * of it; the canvas never takes taps. Hidden while the dafnesearch layer is open (html.ba-abierta).
 * The card is black with cream text and a gold rim, like the bulb's coupon card; every text is at least 4.5:1.
 */
.fvg-root [hidden] { display: none !important; }
html.ba-abierta .fvg-root { display: none !important; }

.fvg-canvas { position: fixed; top: 0; left: 0; z-index: 96; pointer-events: none; }
.fvg-root .fvg-hit { position: fixed; top: 0; left: 0; z-index: 97; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform; -webkit-tap-highlight-color: transparent; }
.fvg-root.fvg-drag .fvg-hit { cursor: grabbing; }
.fvg-root .fvg-hit:focus { outline: none; }
.fvg-root .fvg-hit:focus-visible { outline: 3px solid #ffcf5a; outline-offset: 4px; }

/* The card: centred on wide screens, a bottom sheet on phones. It materialises from the point where the balloon
   popped (JS sets transform-origin there): from a blurred, faint, small glow to sharp, like a ghost. */
.fvg-card { position: fixed; z-index: 95; left: 50%; top: 50%; width: 480px; max-width: calc(100vw - 32px); transform: translate(-50%, -50%); }
.fvg-box { position: relative; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding: 24px; border: 1.5px solid #ffcf5a; border-radius: 16px; background: #0b0c10; color: #fff1cf; text-align: left; color-scheme: dark;
  font: 400 15px/1.45 "Dafne Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  box-shadow: 0 0 0 4px rgba(255, 207, 90, .22), 0 0 40px 8px rgba(255, 207, 90, .35), 0 22px 60px -14px rgba(0, 0, 0, .65); }
.fvg-box:focus { outline: none; }
.fvg-box.fvg-in { animation: fvg-ghost .9s cubic-bezier(.2, .9, .25, 1) both; }
.fvg-box.fvg-out { animation: fvg-vanish .38s ease-in both; }
@keyframes fvg-ghost {
  0% { opacity: 0; transform: scale(.35); filter: blur(18px) brightness(2.2); }
  45% { opacity: .75; transform: scale(1.04); filter: blur(5px) brightness(1.5); }
  70% { opacity: .95; transform: scale(.99); filter: blur(1px) brightness(1.1); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes fvg-vanish { to { opacity: 0; transform: scale(.9) translateY(-10px); filter: blur(10px); } }

.fvg-root .fvg-kicker { margin: 0; font: 800 50px/1 "Dafne Lexend", "Trebuchet MS", system-ui, sans-serif; letter-spacing: -.02em; color: #ffcf5a; }
.fvg-root .fvg-box h2 { margin: -4px 0 0; padding-right: 32px; font: 700 24px/1.2 "Dafne Lexend", "Trebuchet MS", system-ui, sans-serif; color: #fff1cf; }
.fvg-root .fvg-prod { display: flex; gap: 16px; align-items: center; padding: 12px; border-radius: 12px; background: #17181d; color: #fff1cf; text-decoration: none; }
.fvg-root .fvg-prod:hover { background: #1f2027; color: #fff1cf; text-decoration: none; }
.fvg-root .fvg-prod:focus-visible { outline: 2px solid #ffcf5a; outline-offset: 2px; }
.fvg-foto { position: relative; flex: 0 0 auto; width: 168px; height: 168px; border-radius: 12px; background: #fff; overflow: hidden; }
.fvg-foto img { display: block; width: 100%; height: 100%; object-fit: contain; }
.fvg-pct { position: absolute; top: 6px; left: 6px; padding: 4px 9px; border-radius: 7px; background: #c2410c; color: #fff; font: 700 17px/1.1 "Dafne Inter", system-ui, sans-serif; }
.fvg-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fvg-tag { align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: #2a2412; color: #ffcf5a; font-size: 13px; font-weight: 600; }
.fvg-marca { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #cbbf9f; }
.fvg-nome { font-size: 18px; font-weight: 600; line-height: 1.3; color: #fff1cf; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fvg-precios b { font: 700 28px/1.2 "Dafne Lexend", "Trebuchet MS", system-ui, sans-serif; color: #fff1cf; }
.fvg-precios s { margin-left: 8px; font-size: 17px; color: #bfb399; }
.fvg-cupon { display: flex; flex-direction: column; gap: 6px; }
.fvg-root .fvg-cupon p { margin: 0; font-size: 16px; color: #e6d9b8; }
.fvg-root .fvg-cupon b { color: #ffcf5a; }
.fvg-codigo { display: flex; gap: 8px; }
.fvg-codigo output { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 6px 10px; border: 2px dashed #ffcf5a; border-radius: 8px;
  background: #1a1608; font: 700 20px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; color: #ffcf5a; user-select: all; -webkit-user-select: all; }
.fvg-root .fvg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; margin: 0; padding: 12px 16px; border: 1px solid #ffcf5a; border-radius: 12px;
  background: #ffcf5a; color: #0b0c10; font: 700 17px/1.2 "Dafne Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.fvg-root .fvg-btn:hover { background: #ffe08f; border-color: #ffe08f; color: #0b0c10; text-decoration: none; }
.fvg-root .fvg-btn.fvg-sec { min-height: 40px; background: transparent; color: #fff1cf; border-color: #8f7c4e; font-weight: 600; }
.fvg-root .fvg-btn.fvg-sec:hover { background: #221d10; color: #fff1cf; }
.fvg-root .fvg-btn:focus-visible, .fvg-root .fvg-x:focus-visible { outline: 2px solid #ffcf5a; outline-offset: 3px; }
.fvg-root .fvg-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0;
  border: 0; border-radius: 8px; background: none; color: #e8dcc0; font: 400 26px/1 system-ui, sans-serif; cursor: pointer; }
.fvg-root .fvg-x:hover { background: #221d10; color: #fff1cf; }
.fvg-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 719px) {
  .fvg-card { top: auto; bottom: 0; left: 0; width: auto; max-width: none; transform: none; }
  .fvg-box { max-height: 86vh; border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .fvg-box { padding: 20px 18px; }
  .fvg-root .fvg-kicker { font-size: 42px; }
  .fvg-root .fvg-box h2 { font-size: 21px; }
  .fvg-foto { width: 124px; height: 124px; }
  .fvg-nome { font-size: 16px; }
  .fvg-precios b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .fvg-box.fvg-in, .fvg-box.fvg-out { animation: none; }
}
@media print { .fvg-root { display: none !important; } }
