/* elitesoft — the campaign popup (inc/bfpop.php). A small stage, like a poster: a floor in
 * perspective with a warm pool of light, a streak of light across it, the largest discount as a
 * gold number with real depth and a shine that runs over it, three offers as cards turned in
 * space. One orchestrated entrance; it is seen at most once a day (bfpop.js), so it can afford it. */
.bfpop { --pop-ease: cubic-bezier(0.23, 1, 0.32, 1); --gold-hi: #FFF6DE; --gold: #F6C27A; --gold-lo: #B9692A; width: min(900px, calc(100% - 32px)); max-width: none; max-height: calc(100svh - 32px); margin: auto; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.bfpop::backdrop { background: radial-gradient(60% 60% at 50% 45%, rgba(40, 22, 6, .55), rgba(4, 5, 7, .86)); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }

/* the card: a gold edge (border-box gradient) around a black stage */
.bfpop__in { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); max-height: calc(100svh - 32px); overflow: auto; overscroll-behavior: contain; padding: clamp(26px, 3.8vw, 48px); border: 1px solid transparent; border-radius: 22px; background: linear-gradient(#08090B, #08090B) padding-box, linear-gradient(135deg, #FFE3A6 0%, #6B3F14 30%, #F2B05E 55%, #3A230B 80%, #F6C27A 100%) border-box; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 50px 140px -30px rgba(0, 0, 0, .95), 0 0 90px -20px rgba(255, 140, 40, .35); }

/* stage effects, behind the content */
.bfpop__fx { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.bfpop__fx i { position: absolute; display: block; }
.bfpop__glow { inset: 0; background: radial-gradient(70% 55% at 8% 0%, rgba(255, 140, 40, .30), transparent 60%), radial-gradient(45% 30% at 28% 78%, rgba(255, 170, 70, .28), transparent 70%), radial-gradient(50% 60% at 100% 100%, rgba(242, 176, 94, .14), transparent 65%); }
/* the floor: gold lines in perspective that run towards the viewer */
.bfpop__floor { left: -30%; right: -30%; bottom: 0; height: 130%; background-image: linear-gradient(to bottom, rgba(246, 194, 122, 0) 0, rgba(246, 194, 122, .34) 1px, rgba(246, 194, 122, .34) 2px, rgba(246, 194, 122, 0) 3px, transparent 3px), linear-gradient(to right, rgba(246, 194, 122, 0) 0, rgba(246, 194, 122, .24) 1px, rgba(246, 194, 122, .24) 2px, rgba(246, 194, 122, 0) 3px, transparent 3px); background-size: 46px 46px; transform-origin: 50% 100%; transform: perspective(520px) rotateX(58deg); will-change: transform; backface-visibility: hidden; animation: bfpop-floor 2.6s linear infinite; }
@keyframes bfpop-floor { to { transform: perspective(520px) rotateX(58deg) translateY(46px); } }
/* the far end of the floor sinks into the dark: a still layer over it, not a mask (a mask on a moving 3D layer is repainted every frame) */
/* only the near part of the floor shows: further up the lines are squeezed below a few pixels and flicker as they move (Firefox, 1× screens) */
.bfpop__fade { left: 0; right: 0; bottom: 0; height: 100%; background: linear-gradient(to top, rgba(8, 9, 11, 0) 0, rgba(8, 9, 11, 0) 36px, rgba(8, 9, 11, .7) 78px, #08090B 112px); }
/* the streak: a beam of light that crosses the card on opening, then now and then */
.bfpop__streak { top: -30%; bottom: -30%; left: 0; width: 32%; background: linear-gradient(90deg, transparent, rgba(255, 214, 150, .0) 20%, rgba(255, 226, 170, .28) 48%, rgba(255, 255, 255, .55) 50%, rgba(255, 226, 170, .28) 52%, transparent 80%); transform: translateX(-160%) rotate(16deg); animation: bfpop-streak 7s var(--pop-ease) .35s infinite; }
@keyframes bfpop-streak { 0% { transform: translateX(-160%) rotate(16deg); } 22%, 100% { transform: translateX(420%) rotate(16deg); } }

.bfpop__copy, .bfpop__side { position: relative; }

/* entrance: the card swings up out of the floor, then the number, then the cards one by one */
.bfpop[open] .bfpop__in { animation: bfpop-in 560ms var(--pop-ease) both; }
.bfpop[open]::backdrop { animation: bfpop-fade 320ms ease both; }
.bfpop.is-leaving .bfpop__in { animation: bfpop-out 180ms ease-out both; }
.bfpop.is-leaving::backdrop { animation: bfpop-fade 180ms ease-out reverse both; }
@keyframes bfpop-in { from { opacity: 0; transform: perspective(1400px) rotateX(14deg) translateY(36px) scale(.95); } }
@keyframes bfpop-out { to { opacity: 0; transform: perspective(1400px) rotateX(6deg) translateY(12px) scale(.98); } }
@keyframes bfpop-fade { from { opacity: 0; } }

.bfpop__x { position: absolute; top: 14px; right: 14px; margin: 0; z-index: 2; }
.bfpop__x button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(246, 194, 122, .35); background: rgba(8, 9, 11, .7); color: var(--ink); cursor: pointer; transition: background-color 150ms ease, transform 160ms var(--pop-ease); }
.bfpop__x button:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .bfpop__x button:hover { background: rgba(246, 194, 122, .14); } }

.bfpop__when { margin: 0 0 8px; color: var(--gold); font: 600 var(--t-sm) var(--sans); }
.bfpop__name { margin: 0; font: 800 clamp(32px, 3.6vw, 48px)/1 var(--display); letter-spacing: -0.03em; color: #F4EFE7; text-shadow: 0 1px 0 #cfc6b8, 0 2px 0 #9d958a, 0 3px 0 #6f685f, 0 10px 24px rgba(0, 0, 0, .7); }

/* the number: depth (stacked shadows), face (gold), shine (a bright band across the face) */
.bfpop__max { display: flex; align-items: flex-end; gap: 12px; margin: 14px 0 0; }
.bfpop__max > i { padding-bottom: .5em; font: 600 18px/1 var(--sans); font-style: normal; color: var(--muted); }
.bfpop__num { position: relative; display: inline-block; padding: 0 .12em .14em 0; font: 800 clamp(70px, 7vw, 112px)/.92 var(--display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; white-space: nowrap; transform-origin: 0 70%; transform: perspective(700px) rotateY(-16deg) rotateX(8deg); }
.bfpop[open] .bfpop__num { animation: bfpop-num 760ms var(--pop-ease) 120ms both; }
@keyframes bfpop-num { from { opacity: 0; transform: perspective(700px) rotateY(-55deg) rotateX(24deg) translateY(28px) scale(.82); } }
.bfpop__depth, .bfpop__shine { position: absolute; left: 0; top: 0; }
.bfpop__depth { color: #6A3A10; text-shadow: 1px 1px 0 #7A4414, 2px 2px 0 #713F12, 3px 3px 0 #683A10, 4px 4px 0 #5F350F, 5px 5px 0 #56300D, 6px 6px 0 #4D2B0B, 7px 7px 0 #44260A, 8px 8px 0 #3B2108, 9px 9px 0 #321C07, 18px 22px 30px rgba(0, 0, 0, .75), 0 0 70px rgba(255, 122, 26, .5); }
.bfpop__face { position: relative; display: block; background: linear-gradient(180deg, var(--gold-hi) 0%, #FFE2A6 28%, var(--gold) 50%, var(--gold-lo) 78%, #E9A458 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.bfpop__shine { background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%); background-size: 300% 100%; background-position: 120% 0; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: bfpop-shine 4.2s ease-in-out 900ms infinite; }
@keyframes bfpop-shine { 0% { background-position: 120% 0; } 35%, 100% { background-position: -20% 0; } }

.bfpop__lead { margin: 16px 0 0; color: var(--ink-soft); font-size: var(--t-sm); max-width: 40ch; }

/* the clock: little blocks with a lit top and a thick dark base */
.bfpop__clock { margin-top: 22px; }
.bfpop__clock p { margin: 0 0 8px; color: var(--muted); font-size: var(--t-xs); }
.bfpop__count { display: flex; gap: 8px; }
.bfpop__count span { display: grid; justify-items: center; gap: 5px; min-width: 60px; padding: 10px 6px 9px; border-radius: 10px; background: linear-gradient(180deg, #2B2B30 0%, #1A1A1E 49.5%, #101013 50.5%, #18181B 100%); border: 1px solid rgba(255, 255, 255, .09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 5px 0 #050506, 0 6px 0 rgba(246, 194, 122, .4), 0 16px 24px -10px rgba(0, 0, 0, .9); }
.bfpop__count b { font: 700 26px/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.bfpop__count i { font: 500 11px/1 var(--sans); font-style: normal; color: var(--muted); }

/* the offers: three cards turned in space; the pointer turns the deck a little more (bfpop.js) */
.bfpop__side { display: flex; flex-direction: column; gap: 16px; padding-top: 44px; perspective: 1000px; }
.bfpop__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; transform-style: preserve-3d; transform: rotateY(-14deg) rotateX(5deg); transition: transform 500ms var(--pop-ease); }
/* the cards further back sit behind the plane of the list in 3D, so the list itself caught their clicks
 * (Κώστας 2026-11-24: only the first one opened): the list lets clicks through, the cards take them */
.bfpop__list { pointer-events: none; }
.bfpop__list li { transform-style: preserve-3d; transform: translateZ(calc(var(--i) * -14px)); pointer-events: auto; }
.bfpop[open] .bfpop__list li { animation: bfpop-card 620ms var(--pop-ease) both; animation-delay: calc(260ms + var(--i) * 70ms); }
@keyframes bfpop-card { from { opacity: 0; transform: translateX(60px) translateZ(-120px) rotateY(-30deg); } }
.bfpop__list a { position: relative; overflow: hidden; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-areas: "i n c" "i p c"; gap: 2px 12px; align-items: center; padding: 12px 14px 12px 12px; border-radius: 14px; border: 1px solid rgba(246, 194, 122, .22); background: linear-gradient(160deg, rgba(48, 40, 30, .92) 0%, rgba(20, 20, 23, .95) 55%, rgba(12, 12, 14, .98) 100%); box-shadow: inset 0 1px 0 rgba(255, 236, 200, .16), 0 18px 30px -14px rgba(0, 0, 0, .9); color: var(--ink); text-decoration: none; transition: border-color 150ms ease, transform 200ms var(--pop-ease); }
/* the gloss on each card */
.bfpop__list a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 38%); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .bfpop__list a:hover { border-color: rgba(246, 194, 122, .7); transform: translateZ(18px); } }
.bfpop__pi { grid-area: i; width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; background: linear-gradient(145deg, #3A2A16, #15120E); border: 1px solid rgba(246, 194, 122, .35); color: var(--gold); font: 800 20px/1 var(--display); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .8); }
.bfpop__pi img { width: 100%; height: 100%; object-fit: cover; }
.bfpop__pn { grid-area: n; font-weight: 600; font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bfpop__pp { grid-area: p; font-size: var(--t-xs); color: var(--muted); }
.bfpop__pp b { color: var(--ink); font-weight: 600; }
.bfpop__pc { grid-area: c; padding: 6px 10px; border-radius: 999px; background: linear-gradient(180deg, #FFE3A6, #E39A47); color: #2A1604; font: 800 13px/1 var(--sans); font-variant-numeric: tabular-nums; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 4px 12px -4px rgba(255, 140, 40, .6); }

/* the way in: a gold pill that catches the light */
.bfpop .bfpop__go { position: relative; overflow: hidden; min-height: 56px; margin-top: auto; justify-content: center; text-align: center; border: 0; border-radius: 999px; background: linear-gradient(180deg, #FFEBC0 0%, #F8C878 42%, #DC8E3C 100%); color: #2A1604; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -3px 0 rgba(120, 58, 10, .45), 0 0 0 1px rgba(255, 214, 150, .5), 0 14px 34px -8px rgba(255, 140, 40, .65); transition: transform 160ms var(--pop-ease), box-shadow 200ms ease; }
.bfpop .bfpop__go::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent); transform: translateX(-160%) skewX(-18deg); animation: bfpop-btn 4.2s var(--pop-ease) 1.6s infinite; }
@keyframes bfpop-btn { 0% { transform: translateX(-160%) skewX(-18deg); } 30%, 100% { transform: translateX(360%) skewX(-18deg); } }
.bfpop .bfpop__go:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .bfpop .bfpop__go:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -3px 0 rgba(120, 58, 10, .45), 0 0 0 1px rgba(255, 214, 150, .7), 0 18px 44px -8px rgba(255, 140, 40, .85); } }
.bfpop__later { margin: 0; text-align: center; }
.bfpop__later button { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: 500 var(--t-sm) var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bfpop :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 720px) {
  .bfpop__in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .bfpop__side { padding-top: 0; }
  .bfpop__list { transform: rotateY(-8deg) rotateX(4deg); }
  .bfpop__count span { min-width: 0; flex: 1; }
  .bfpop__floor { height: 70%; }
}
@media (prefers-reduced-motion: reduce) {
  .bfpop[open] .bfpop__in, .bfpop[open] .bfpop__num, .bfpop[open] .bfpop__list li { animation: bfpop-fade 200ms ease both; }
  .bfpop.is-leaving .bfpop__in { animation: bfpop-fade 150ms ease reverse both; }
  .bfpop__floor, .bfpop__streak, .bfpop__shine, .bfpop .bfpop__go::after { animation: none; }
  .bfpop__streak { display: none; }
  .bfpop__list { transition: none; }
}
