/* ==========================================================================
   AIRDROP · Event page - immersive mobile hero + edge alignment (October 2026)

   Same idea as the home hero (home-immersive.css): on phones the event artwork
   runs edge to edge from the very top of the page, under the brand header,
   with a soft frosted veil behind the header that fades into the sharp
   picture. The empty space above the title holds a round poster; tapping it
   opens the full image (lightbox from event-v2.js).

   Switched on by `body.ev2-imm` (pages/preview_event.php). --ev2-imm-above is
   the header height, measured in event-v2.js.

   Also: content under the hero lines up with the home page shelves exactly
   (20px from the screen edge on phones, the shelves' 48px→1096px column on
   desktop - .sp-content's 24px gutter + 4px).
   ========================================================================== */

/* Buy button: cart icon in front of the label, no purple glow, and one
   shine sweep 3s after the page loads (same light as the floating dock). */
body.sp-event .ev2-hero .ev2-buy { position: relative; isolation: isolate; overflow: hidden; box-shadow: none; }
/* Background = Airbot's orb: periwinkle with lilac light and violet/peach ribbons that
   drift slowly (one big blurred layer rotating behind the label). Same on the
   floating dock's "לכרטיסים" button. */
body.sp-event .ev2-hero .ev2-buy, body.sp-event .ev2-dock__cta {
  background: #7465e2; isolation: isolate;
  /* the orb's glassy sheen: a soft light top edge and a deeper bottom */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -12px 22px rgba(42, 35, 120, .28);
  text-shadow: 0 1px 2px rgba(20, 14, 70, .35);
}
body.sp-event .ev2-hero .ev2-buy::before, body.sp-event .ev2-dock__cta::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: max(160%, 520px); aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  /* the orb's palette: periwinkle body, near-white lilac light, a deep violet
     ribbon and a thin peach streak */
  background:
    radial-gradient(28% 22% at 30% 46%, rgba(221, 214, 255, .85), transparent 70%),
    radial-gradient(22% 14% at 68% 40%, rgba(243, 166, 121, .5), transparent 70%),
    radial-gradient(30% 20% at 56% 62%, rgba(58, 46, 166, .9), transparent 72%),
    radial-gradient(24% 20% at 42% 70%, rgba(162, 148, 246, .95), transparent 70%),
    linear-gradient(100deg, #5a4bd0, #8a7cf0 50%, #b4aaf8);
  filter: blur(14px);
  animation: ev2-buy-flow 11s linear infinite;
}
@keyframes ev2-buy-flow { to { transform: rotate(360deg); } }
/* the dock button is small: a smaller layer so the colours visibly pass through it */
body.sp-event .ev2-dock__cta::before { width: 300px; filter: blur(10px); }
body.sp-event .ev2-dock__cta { font-weight: 700; font-size: 14.5px; font-family: inherit; }
body.sp-event .ev2-hero .ev2-buy > *, body.sp-event .ev2-dock__cta > * { position: relative; z-index: 1; }
body.sp-event .ev2-hero .ev2-buy::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: ev2-buy-shine 1.5s ease-in-out 3s 1 both;
}
@keyframes ev2-buy-shine { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { body.sp-event .ev2-hero .ev2-buy::after { animation: none; opacity: 0; } body.sp-event .ev2-hero .ev2-buy::before, body.sp-event .ev2-dock__cta::before { animation: none; } }

/* "ב-שלוותה" stays on one line (preview_event.php wraps it) */
.ev2-nobr { white-space: nowrap; }

/* A little air between the event title and its description */
body.sp-event .ev2-hero .ev2-lead { margin-top: 6px; }

/* Buy button: cart icon in front of the label (all sizes) */
.ev2-buy__label { display: inline-flex; align-items: center; gap: 9px; }
.ev2-buy__label svg { flex: none; width: 20px; height: 20px; }

/* ── Content gutters = home shelves ── */
body.sp-event .ev2-layout { max-width: none; padding-inline: 4px; gap: 48px; }
@media (max-width: 900px) {
  body.sp-event .ev2-layout { padding-inline: 4px; }
}

/* ── "פרטים יבשים" as an event pass (all sizes) ──
   One ticket-like card instead of a grid of boxes: a calendar tile with the
   when, a perforated tear line, the where with Maps / Waze, then the price.
   No borders; the notches are cut in the page colour. */
.ev2-pass {
  --pass-bg: #1e1e20; --pass-cut: var(--sp-bg, #121212);
  position: relative; margin-top: 18px; border-radius: 22px; overflow: hidden;
  background: var(--pass-bg);              /* one even dark grey, no tint */
}
.ev2-pass__row { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.ev2-pass__txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ev2-pass__label { color: rgba(255, 255, 255, .45); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.ev2-pass__txt strong { color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3; }
.ev2-pass__sub { color: rgba(255, 255, 255, .62); font-size: 13.5px; line-height: 1.4; }

/* calendar tile */
.ev2-pass__cal {
  flex: none; width: 60px; border-radius: 14px; overflow: hidden; text-align: center;
  background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}
.ev2-pass__cal small { display: block; padding: 4px 0 3px; background: linear-gradient(100deg, #be43d5, #8e3ef4); color: #fff; font-size: 11.5px; font-weight: 700; }
.ev2-pass__cal b { display: block; padding: 3px 0 6px; color: #17151f; font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.ev2-pass__soon {
  flex: none; align-self: flex-start; padding: 4px 10px; border-radius: 999px;
  background: rgba(201, 140, 255, .16); color: #e2c6ff; font-size: 12px; font-weight: 700; font-style: normal; white-space: nowrap;
}

/* round icon for where / tickets */
.ev2-pass__ic { flex: none; width: 60px; display: grid; place-items: center; }
.ev2-pass__ic svg { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: rgba(255, 255, 255, .07); color: #d9a8f0; }

/* tear line with half-circle notches on both sides */
.ev2-pass__tear { position: relative; display: block; height: 0; margin: 0 22px; border-top: 1.5px dashed rgba(255, 255, 255, .32); }
.ev2-pass__tear::before, .ev2-pass__tear::after {
  content: ""; position: absolute; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--pass-cut);
}
.ev2-pass__tear::before { left: -33px; }
.ev2-pass__tear::after { right: -33px; }

/* Maps / Waze */
.ev2-pass__nav { flex: none; display: flex; gap: 6px; }
.ev2-pass__nav a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: 999px;
  background: rgba(255, 255, 255, .09); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none;
  transition: background .2s ease;
}
.ev2-pass__nav a:hover { background: rgba(255, 255, 255, .16); }
@media (max-width: 520px) {
  .ev2-pass__row { padding: 16px; gap: 12px; }
  .ev2-pass__tear { margin: 0 18px; }
  .ev2-pass__tear::before { left: -29px; } .ev2-pass__tear::after { right: -29px; }
  /* the nav pills drop under the address on narrow phones */
  .ev2-pass__where { flex-wrap: wrap; }
  .ev2-pass__where .ev2-pass__nav { width: 100%; padding-inline-start: 72px; }
}

/* ── Full image popup (all sizes) ── */
body.sp .ev2-image-lightbox {
  padding: calc(env(safe-area-inset-top, 0px) + 72px) 16px calc(env(safe-area-inset-bottom, 0px) + 32px);
  background: rgba(6, 6, 10, .8);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  animation: ev2-lb-fade .28s ease both;
}
body.sp .ev2-image-lightbox img {
  max-width: min(100%, 1100px); max-height: calc(100svh - 140px);
  border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: ev2-lb-zoom .5s cubic-bezier(.34, 1.4, .64, 1) both;
}
body.sp .ev2-image-lightbox button {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px); inset-inline-end: 16px;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: #15131c; font-size: 28px; line-height: 1; font-weight: 300;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); cursor: pointer;
  animation: ev2-lb-fade .3s ease .12s both;
}
@keyframes ev2-lb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ev2-lb-zoom { from { opacity: 0; transform: scale(.86) translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  /* `hidden` would clip the hero that now reaches up under the header */
  body.ev2-imm .sp-content { overflow-x: clip; overflow-y: visible; }

  body.ev2-imm .ev2-hero {
    --above: var(--ev2-imm-above, 62px);
    margin: calc(-1 * var(--above)) -16px 6px;          /* .sp-content's 16px gutter */
    padding: calc(var(--above) + 26px) 20px 26px;
    /* ends above the floating Airbot button, so the buy button is never under it */
    min-height: min(calc(100svh - 146px), 686px); max-height: none;
    display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch;
    border-radius: 0; box-shadow: none; overflow: hidden;
  }
  body.ev2-imm .ev2-hero__image { background-position: 50% 30%; transform: none; filter: none; }

  /* A dark veil at the top for the logo, the picture clear in the middle, and
     a long fade at the bottom into the exact page colour (.sp-main = --sp-bg). */
  body.ev2-imm .ev2-hero__scrim {
    background:
      linear-gradient(180deg, rgba(10,10,16,.6) 0, rgba(10,10,16,.28) calc(var(--above) + 40px), rgba(10,10,16,0) calc(var(--above) + 170px)),
      linear-gradient(0deg,
        var(--sp-bg, #121212) 0,
        rgba(18,18,18,.96) 40px,
        rgba(18,18,18,.88) 32%,
        rgba(18,18,18,.6) 48%,
        rgba(18,18,18,.2) 64%,
        rgba(18,18,18,0) 78%);
  }
  /* Frosted veil behind the header, fading out below it (blur and tint are
     masked together, so there is no hard edge). */
  body.ev2-imm .ev2-hero::before {
    content: ""; position: absolute; z-index: -1; inset: 0 0 auto;
    height: calc(var(--above) + 96px);
    background: rgba(10, 12, 20, .26);
    -webkit-backdrop-filter: blur(20px) saturate(1.05); backdrop-filter: blur(20px) saturate(1.05);
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 var(--above), rgba(0,0,0,.6) calc(var(--above) + 40px), transparent 100%);
            mask-image: linear-gradient(180deg, #000 0, #000 var(--above), rgba(0,0,0,.6) calc(var(--above) + 40px), transparent 100%);
    pointer-events: none;
  }

  /* Round poster in the empty space above the title: a hairline ring with a
     clear gap (like the artist stories) and a small zoom key. Auto margins
     centre it between the header and the copy. */
  body.ev2-imm .ev2-hero__art {
    display: block; position: relative; z-index: 1; inset: auto; transform: none;
    align-self: center; flex: none; margin: auto 0;
    width: 172px; height: 172px; aspect-ratio: 1; padding: 0;   /* the auto margins give the 20px back: 10px above, 10px below */
    border: 5px solid transparent; border-radius: 50%;
    background: none; background-clip: padding-box;
    /* ring + a light, low shadow so it lifts off the same artwork behind it */
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 0 32px 4px rgba(0, 0, 0, .16), 0 12px 26px rgba(0, 0, 0, .26);
    overflow: visible; cursor: zoom-in;
    animation: ev2-art-in .9s cubic-bezier(.34, 1.4, .64, 1) .1s both;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  }
  body.ev2-imm .ev2-hero__art:hover { transform: none; }
  body.ev2-imm .ev2-hero__art:active { transform: scale(.96); }
  body.ev2-imm .ev2-hero__art img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
  body.ev2-imm .ev2-hero__art span {
    position: absolute; inset: auto auto 2px 2px; z-index: 1;
    width: 32px; height: 32px; padding: 0; border-radius: 50%;
    background: #fff; opacity: 1; font-size: 0; color: transparent;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  }
  body.ev2-imm .ev2-hero__art span::before {
    content: ""; position: absolute; inset: 8px; background: #15131c;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M20 20l-4.2-4.2M11 8.5v5M8.5 11h5'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M20 20l-4.2-4.2M11 8.5v5M8.5 11h5'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  @keyframes ev2-art-in { from { opacity: 0; transform: scale(.7) translateY(10px); } to { opacity: 1; transform: none; } }

  /* Lineup artists popping out from behind the round poster (event-v2.js).
     The layer sits at the circle's centre, under it, so they emerge from it. */
  body.ev2-imm .ev2-orbit { position: absolute; z-index: 0; width: 0; height: 0; }
  body.ev2-imm .ev2-bub {
    --s: 50px; position: absolute; left: calc(var(--s) / -2); top: calc(var(--s) / -2);
    width: var(--s); height: var(--s); display: block; border-radius: 50%;
    text-decoration: none; will-change: transform, opacity; -webkit-tap-highlight-color: transparent;
  }
  body.ev2-imm .ev2-bub__img {
    display: block; width: 100%; height: 100%; border-radius: 50%;
    background: #2a2838 center/cover no-repeat;
    box-shadow: 0 10px 24px rgba(0,0,0,.45), inset 0 0 0 1.5px rgba(255,255,255,.4);
  }
  body.ev2-imm .ev2-bub__name {
    position: absolute; left: 50%; top: calc(100% + 5px); transform: translateX(-50%);
    max-width: 96px; padding: 2px 8px; border-radius: 999px;
    background: rgba(14,14,20,.6); color: #fff;
    -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
    font-size: 10.5px; font-weight: 700; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* two lines at most (event-v2.js shrinks long titles first; this clamp is the safety net) */
  body.ev2-imm .ev2-hero h1 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  body.ev2-imm .ev2-hero__content { width: 100%; max-width: none; padding: 0; margin-top: 12px; }
  /* Share sits just under the header now that the hero starts behind it */
  body.ev2-imm .ev2-hero .ev2-hero__share { top: calc(var(--above) + 12px); left: 20px; }
  /* Share: bold, borderless frosted glass (like the home hero's glass key) */
  body.sp-event .ev2-hero .ev2-hero__share {
    border: 0; box-shadow: none; font-weight: 700;
    background: rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  }
  body.sp-event .ev2-hero .ev2-hero__share span { font-weight: 700; }
}

@media (prefers-reduced-motion: reduce) {
  body.ev2-imm .ev2-hero__art, body.sp .ev2-image-lightbox, body.sp .ev2-image-lightbox img, body.sp .ev2-image-lightbox button { animation: none; }
}
