/* Nekon HUB v26.18 — correction layer loaded LAST.
   Scope: tester/public app only. Desktop spacing intentionally preserved. */

/* ---------- MOBILE HEADER / TOP SPACING ----------
   Previous builds could make the header sticky while keeping main's header offset,
   creating a second ~60px blank band. Force one layout model on phones. */
@media (max-width: 820px) {
  html.nekon-next body > header,
  html.is-installed-app.nekon-next body > header,
  html.nekon-next.nekon-layout-v2611 body > header,
  html.is-installed-app.nekon-next.nekon-layout-v2611 body > header {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    height: 60px !important;
    min-height: 60px !important;
  }

  html.nekon-next main,
  html.is-installed-app.nekon-next main,
  html.nekon-next.nekon-layout-v2611 main,
  html.is-installed-app.nekon-next.nekon-layout-v2611 main {
    padding-top: 60px !important;
    margin-top: 0 !important;
  }

  html.nekon-next main > .view,
  html.is-installed-app.nekon-next main > .view,
  html.nekon-next.nekon-layout-v2611 main > .view,
  html.is-installed-app.nekon-next.nekon-layout-v2611 main > .view {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  html.nekon-next main > .view.inner > .page-title,
  html.nekon-next main > .view > .page-title {
    margin-top: 0 !important;
    padding-top: 16px !important;
  }

  html.nekon-next #inicio {
    padding-top: 8px !important;
  }

  html.nekon-next #inicio > .v266-showcase,
  html.nekon-next .v266-showcase {
    margin-top: 0 !important;
  }
}

/* ---------- SHOWCASE: SAME SIZE IN DARK AND LIGHT ---------- */
@media (max-width: 820px) {
  html.nekon-next .v266-showcase__viewport,
  html.nekon-next .v266-slide,
  html[data-theme="light"].nekon-next .v266-showcase__viewport,
  html[data-theme="light"].nekon-next .v266-slide {
    min-height: 600px !important;
    height: 600px !important;
  }

  html.nekon-next .v266-slide__content,
  html[data-theme="light"].nekon-next .v266-slide__content {
    padding: 218px 18px 26px !important;
  }

  html.nekon-next .v266-slide__content h1,
  html[data-theme="light"].nekon-next .v266-slide__content h1 {
    font-size: clamp(2.2rem, 10.8vw, 3.35rem) !important;
  }

  html.nekon-next .v266-slide__visual,
  html[data-theme="light"].nekon-next .v266-slide__visual {
    left: 0 !important;
    right: 0 !important;
  }

  /* Avoid the large translucent colour block that was extending beneath buttons. */
  html.nekon-next .v266-slide::after,
  html[data-theme="light"].nekon-next .v266-slide::after {
    width: 46% !important;
    height: 34% !important;
    opacity: .52 !important;
  }
}

@media (max-width: 600px) {
  html.nekon-next .v266-showcase__viewport,
  html.nekon-next .v266-slide,
  html[data-theme="light"].nekon-next .v266-showcase__viewport,
  html[data-theme="light"].nekon-next .v266-slide {
    min-height: 585px !important;
    height: 585px !important;
  }

  html.nekon-next .v266-slide__content,
  html[data-theme="light"].nekon-next .v266-slide__content {
    padding: 208px 18px 24px !important;
  }
}

/* ---------- SLIDE 02: ENTERTAINMENT VISUAL ----------
   Use the real Premium artwork as a guaranteed background and keep the Free
   artwork as a foreground card. This prevents the empty black visual. */
html.nekon-next .v266-slide:nth-child(2) .v266-slide__visual--accounts {
  background-image:
    linear-gradient(90deg, rgba(8, 6, 14, .78) 0%, rgba(8, 6, 14, .18) 48%, rgba(8, 6, 14, .08) 100%),
    url("assets/hero/nekon-accounts-premium-v26-18.webp") !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center center !important;
}
html.nekon-next .v266-slide:nth-child(2) .v266-slide__visual--accounts::after {
  background: linear-gradient(90deg, rgba(10,7,17,.70), transparent 44%), linear-gradient(180deg, transparent 62%, rgba(10,7,17,.46)) !important;
}
html.nekon-next .v266-slide:nth-child(2) .v266-accounts-visual img:first-child {
  display: none !important;
}
html.nekon-next .v266-slide:nth-child(2) .v266-accounts-visual img:last-child {
  display: block !important;
  position: absolute !important;
  top: 26px !important;
  right: 22px !important;
  bottom: auto !important;
  left: auto !important;
  width: min(44%, 360px) !important;
  max-width: 360px !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  opacity: .98 !important;
  filter: saturate(1.02) contrast(1.04) brightness(.98) !important;
  border-radius: 18px !important;
  box-shadow: 0 22px 55px rgba(0,0,0,.44) !important;
}

html[data-theme="light"].nekon-next .v266-slide:nth-child(2) .v266-slide__visual--accounts {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(248,243,249,.12) 40%, rgba(248,243,249,.84) 88%, #f8f3f9 100%),
    url("assets/hero/nekon-accounts-premium-v26-18.webp") !important;
  background-size: cover !important;
  background-position: center center !important;
}
html[data-theme="light"].nekon-next .v266-slide:nth-child(2) .v266-slide__visual--accounts::after {
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(249,244,250,.06) 48%, rgba(249,244,250,.72) 88%, #f8f3f9 100%) !important;
}

@media (max-width: 820px) {
  html.nekon-next .v266-slide:nth-child(2) .v266-slide__visual--accounts,
  html[data-theme="light"].nekon-next .v266-slide:nth-child(2) .v266-slide__visual--accounts {
    display: block !important;
    padding: 0 !important;
    background-size: auto 250px !important;
    background-position: center top !important;
    background-color: #0b0813 !important;
  }

  html[data-theme="light"].nekon-next .v266-slide:nth-child(2) .v266-slide__visual--accounts {
    background-color: #f8f3f9 !important;
  }

  html.nekon-next .v266-slide:nth-child(2) .v266-accounts-visual {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 250px !important;
    pointer-events: none !important;
  }

  html.nekon-next .v266-slide:nth-child(2) .v266-accounts-visual img:last-child {
    top: 118px !important;
    right: 16px !important;
    width: 43% !important;
    max-width: 190px !important;
    border-radius: 12px !important;
  }
}

/* ---------- WALLET HISTORY ---------- */
html.nekon-next #billetera .wallet-private {
  display: block !important;
  width: min(1240px, calc(100% - 56px)) !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
}
html.nekon-next #billetera .wallet-workspace-nav {
  width: min(1120px, 100%) !important;
  margin: 16px auto !important;
}
html.nekon-next #billetera .wallet-tab-panel[hidden],
html.nekon-next #billetera .wallet-history-list[hidden] {
  display: none !important;
}
html.nekon-next #billetera .wallet-history-panel:not([hidden]) {
  display: grid !important;
  width: min(1120px, 100%) !important;
  max-width: 1120px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 24px !important;
  grid-template-columns: minmax(0,1fr) !important;
  gap: 14px !important;
  align-content: start !important;
}
html.nekon-next #billetera .wallet-history-tabs {
  width: 100% !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
html.nekon-next #billetera .wallet-history-list {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 130px !important;
}
html.nekon-next #billetera .wallet-empty {
  width: 100% !important;
  min-height: 118px !important;
  display: grid !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 8px !important;
  padding: 22px !important;
}
html.nekon-next #billetera .wallet-empty strong,
html.nekon-next #billetera .wallet-empty p {
  margin: 0 !important;
}

@media (max-width: 820px) {
  html.nekon-next #billetera .wallet-private {
    width: calc(100% - 28px) !important;
  }
  html.nekon-next #billetera .wallet-history-panel:not([hidden]) {
    width: 100% !important;
    padding: 16px !important;
  }
  html.nekon-next #billetera .wallet-history-tabs button {
    min-height: 44px !important;
    font-size: .65rem !important;
  }
}

/* ---------- MENU EXPAND ARROW ---------- */
html.nekon-next #menu .menu-group-toggle {
  grid-template-columns: 34px minmax(0,1fr) 46px !important;
}
html.nekon-next #menu .menu-group-indicator {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  font-size: 0 !important;
  line-height: 1 !important;
  position: relative !important;
}
html.nekon-next #menu .menu-group-indicator::before {
  content: "" !important;
  width: 9px !important;
  height: 9px !important;
  border-right: 2.5px solid currentColor !important;
  border-bottom: 2.5px solid currentColor !important;
  transform: rotate(45deg) translate(-1px,-1px) !important;
  transform-origin: center !important;
}
html.nekon-next #menu .menu-group-toggle[aria-expanded="true"] .menu-group-indicator::before {
  transform: rotate(225deg) translate(-1px,-1px) !important;
}

@media (max-width: 820px) {
  html.nekon-next #menu .menu-group-toggle {
    grid-template-columns: 34px minmax(0,1fr) 48px !important;
    min-height: 58px !important;
  }
  html.nekon-next #menu .menu-group-indicator {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
}
