/* ==========================================================================
   Vora polish layer — loaded after voramarket.css
   1. Tighter, consistent section spacing
   2. Navbar language + currency pickers
   3. Scroll progress bar, reveal animations, smooth scrolling
   ========================================================================== */

:root {
  --vora-section-y: clamp(32px, 4.5vw, 56px);
  --vora-header-gap: clamp(24px, 3vw, 40px);
  --vora-ease-out: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}

/* --------------------------------------------------------------------------
   1. Spacing — sections were 80px top + 80px bottom (160px between each),
      plus 60px header margins, a 100px CTA margin and an 80px footer margin.
   -------------------------------------------------------------------------- */
.voramarket-extracted {
  padding-top: var(--vora-section-y);
  padding-bottom: var(--vora-section-y);
}
/* The inner container carried a leftover 8em (128px) top + bottom padding,
   stacking with the section padding — this was the main source of the gaps. */
.voramarket-extracted .voramarket-container { padding-top: 0; padding-bottom: 0; }

.voramarket-extracted .voramarket-section-header,
.voramarket-categories .voramarket-section-header,
.voramarket-games .voramarket-section-header,
.voramarket-catalog .voramarket-section-header,
.voramarket-service-page .voramarket-section-header {
  margin-bottom: var(--vora-header-gap);
}
.voramarket-extracted .voramarket-badge-container { margin-bottom: 12px; }
.voramarket-extracted .voramarket-main-title { margin-bottom: 8px; }

/* Categories sit right under the payment strip */
.voramarket-categories { padding-top: clamp(20px, 3vw, 36px); padding-bottom: 0; }
.voramarket-category-actions { margin-top: clamp(20px, 2.5vw, 28px); }
.voramarket-category-divider { margin-top: clamp(28px, 3.5vw, 44px); }

/* CTA card had an extra 100px on top of the section padding */
.voramarket-extracted .voramarket-cta-section { margin-top: 0; }

/* Hero: no more full-screen of empty space on tall monitors */
.voramarket-hero-section { min-height: min(100vh, 860px); }
.voramarket-hero-section .voramarket-hero-image { min-height: min(700px, 72vh); }
.voramarket-hero-section .voramarket-hero-stats { margin-top: 28px; }
@media (max-width: 768px) {
  .voramarket-hero-section { min-height: min(92svh, 760px); }
  .voramarket-hero-section .voramarket-hero-image { min-height: 0; }
}

/* Payment strip */
.voramarket-payments { padding-top: 4px; padding-bottom: 8px; }
.voramarket-payments-title { margin-bottom: 14px; }

/* Footer */
.voramarket-footer { margin-top: clamp(16px, 3vw, 40px); padding-top: 48px; }
.voramarket-footer-grid { gap: 40px; margin-bottom: 36px; }
@media (max-width: 768px) {
  .voramarket-footer { padding-top: 36px; }
  .voramarket-footer-grid { gap: 28px; margin-bottom: 28px; }
}

/* Inner pages */
.voramarket-games { padding-top: 40px; padding-bottom: 32px; min-height: 0; }
.voramarket-service-page { padding-top: 40px; padding-bottom: 48px; min-height: 50vh; }

/* --------------------------------------------------------------------------
   2. Navbar pickers
   -------------------------------------------------------------------------- */
.vora-nav-pickers { display: flex; align-items: center; gap: 6px; }
.vora-nav-pickers:empty { display: none; }
.vora-picker { position: relative; font-family: Poppins, sans-serif; }

.vora-picker__trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 9px 0 9px;
  margin: 0;
  border: 1px solid rgba(143, 183, 255, .2);
  border-radius: 8px;
  background: rgba(77, 141, 247, .08);
  color: #fff;
  font: 600 12.5px/1 Poppins, sans-serif;
  letter-spacing: .3px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.vora-picker__trigger:hover,
.vora-picker__trigger[aria-expanded="true"] {
  background: rgba(77, 141, 247, .18);
  border-color: rgba(143, 183, 255, .38);
}
.vora-picker__trigger:focus-visible { outline: 2px solid #8fc8ff; outline-offset: 2px; }
.vora-picker__chev { width: 12px; height: 12px; opacity: .6; transition: transform .25s var(--vora-ease-out); }
.vora-picker__trigger[aria-expanded="true"] .vora-picker__chev { transform: rotate(180deg); }

.vora-picker__flag { display: inline-flex; flex: 0 0 auto; }
.vora-picker__flag svg {
  display: block;
  width: 19px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
.vora-picker__flag:empty { display: none; }

.vora-picker__symbol {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(77, 141, 247, .24);
  color: #d4e5ff;
  font-size: 11.5px;
  font-weight: 600;
}

.vora-picker__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  width: 264px;
  max-height: min(440px, 72vh);
  padding: 8px;
  background: rgba(7, 24, 62, .97);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(143, 183, 255, .16);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 6, 27, .55), 0 2px 8px rgba(0, 6, 27, .3);
  transform-origin: top right;
  animation: vora-pop .24s var(--vora-ease-out);
}
.vora-picker__panel[hidden] { display: none; }
@keyframes vora-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

.vora-picker__heading {
  padding: 6px 8px 8px;
  color: rgba(185, 205, 240, .55);
  font: 600 10.5px/1 Poppins, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.vora-picker__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin: 0 0 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(143, 183, 255, .14);
  border-radius: 9px;
  color: rgba(200, 218, 248, .55);
  transition: border-color .2s, background .2s;
}
.vora-picker__search:focus-within { border-color: rgba(77, 141, 247, .7); background: rgba(77, 141, 247, .06); }
.vora-picker__search svg { width: 15px; height: 15px; flex: 0 0 15px; }
.vora-picker__search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  outline: 0;
  box-shadow: none;
  color: #fff;
  font: 400 13px Poppins, sans-serif;
  user-select: text;
  -webkit-user-select: text;
}
.vora-picker__search input::placeholder { color: rgba(200, 218, 248, .45); }

.vora-picker__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.vora-picker__group {
  padding: 10px 10px 4px;
  color: rgba(185, 205, 240, .45);
  font: 600 10px/1 Poppins, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.vora-picker__group:first-child { padding-top: 4px; }

.vora-picker__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(223, 237, 255, .82);
  font: 500 13px/1.2 Poppins, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.vora-picker__option:hover,
.vora-picker__option.is-active { background: rgba(77, 141, 247, .12); color: #fff; }
.vora-picker__option[aria-selected="true"] { background: rgba(77, 141, 247, .2); color: #fff; }
.vora-picker__option[aria-selected="true"]::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-radius: 50%;
  background: #6ea6ff;
  box-shadow: 0 0 10px #4d8df7;
}
.vora-picker__option .vora-picker__symbol { min-width: 34px; background: rgba(77, 141, 247, .14); }
.vora-picker__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vora-picker__code { color: rgba(185, 205, 240, .5); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.vora-picker__empty { padding: 18px 10px; color: rgba(200, 218, 248, .5); font-size: 12.5px; text-align: center; }
.vora-picker__note {
  margin: 6px 0 0;
  padding: 8px 8px 2px;
  border-top: 1px solid rgba(143, 183, 255, .1);
  color: rgba(185, 205, 240, .45);
  font: 400 10.5px/1.45 Poppins, sans-serif;
}

/* Switching feedback */
.vora-picker.is-loading .vora-picker__trigger { opacity: .6; pointer-events: none; }
.vora-price-flash { animation: vora-price-flash .6s var(--vora-ease-out); }
@keyframes vora-price-flash { 0% { opacity: .2; filter: blur(3px); } 100% { opacity: 1; filter: none; } }

@media (max-width: 860px) {
  .vora-picker { position: static; }
  .vora-picker__panel {
    top: calc(100% + 6px);
    left: 12px;
    right: 12px;
    width: auto;
    max-height: min(460px, calc(100svh - 120px));
    transform-origin: top center;
  }
  .vora-picker__option { min-height: 44px; }
}
@media (max-width: 480px) {
  .voramarket-nav-logo { min-width: 0; flex-shrink: 1; }
  .voramarket-nav-logo img { max-width: 128px; object-fit: contain; object-position: left center; }
  .voramarket-nav-actions { gap: 6px; flex-shrink: 0; }
  .voramarket-nav-mobile { padding: 6px; }
}
@media (max-width: 420px) {
  .vora-picker--lang .vora-picker__label { display: none; }
  .vora-picker__trigger { gap: 5px; padding: 0 7px; }
  .vora-nav-pickers { gap: 4px; }
}
@media (max-width: 360px) {
  .vora-picker--currency .vora-picker__label { display: none; }
}

/* --------------------------------------------------------------------------
   3. Motion
   -------------------------------------------------------------------------- */

/* Scroll progress line along the bottom of the navbar */
.vora-scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}
.vora-scroll-progress span {
  display: block;
  height: 100%;
  transform: scaleX(var(--vora-progress, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(77, 141, 247, 0), #4d8df7 30%, #8fc8ff);
  box-shadow: 0 0 12px rgba(77, 141, 247, .7);
  will-change: transform;
}

/* Reveal on scroll. Uses the individual `translate`/`scale` properties so it
   never fights the theme's own `transform` animations. */
html.vora-anim .vora-reveal {
  opacity: 0;
  translate: 0 26px;
  transition:
    opacity .75s var(--vora-ease-out),
    translate .9s var(--vora-ease-out),
    scale .9s var(--vora-ease-out),
    filter .75s var(--vora-ease-out);
  transition-delay: var(--vora-delay, 0ms);
}
html.vora-anim .vora-reveal--soft { filter: blur(8px); }
html.vora-anim .vora-reveal--zoom { scale: .96; }
html.vora-anim .vora-reveal.vora-in { opacity: 1; translate: 0 0; scale: 1; filter: none; }

/* Hero drifts up and fades slightly as you scroll past it */
.voramarket-hero-section .voramarket-hero-container {
  translate: 0 calc(var(--vora-hero, 0) * 70px);
  filter: opacity(calc(1 - var(--vora-hero, 0) * .65));
}

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis.lenis-smooth:not(.lenis-scrolling) iframe { pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  html.vora-anim .vora-reveal { opacity: 1; translate: none; scale: none; filter: none; transition: none; }
  .voramarket-hero-section .voramarket-hero-container { translate: none; filter: none; }
  .vora-picker__panel { animation: none; }
  .vora-scroll-progress { display: none; }
}

/* --------------------------------------------------------------------------
   4. Full-page background snowfall (canvas, drawn by vora-polish.js)
   -------------------------------------------------------------------------- */
.vora-snowfall {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1020;           /* above page content, below navbar (1030) and modals */
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.vora-snowfall.is-ready { opacity: 1; }
/* The hero had its own snow that stopped at the bottom of the hero */
html.vora-snow-on .voramarket-hero-section .voramarket-snow { display: none; }
@media (prefers-reduced-motion: reduce) { .vora-snowfall { display: none; } }
