/* Just2Pay v3 header + footer chrome */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  /* sticky Design Hub header occupies flow — no fixed offset */
}

body.is-nav-open {
  overflow: hidden;
}

a {
  color: var(--j2p-secondary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

input,
textarea,
select {
  font-size: 16px;
}

.j2p-skip {
  position: absolute;
  inset-inline-start: 12px;
  top: 12px;
  z-index: 10050;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: var(--j2p-cta);
  color: var(--j2p-cta-text);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 150ms ease;
}

.j2p-skip:focus,
.j2p-skip:focus-visible {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.j2p-wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}


/* ── Header (Design Hub promoted) ───────────────────────── */

.j2p-skip {
  position: absolute;
  inset-inline-start: 12px;
  top: 12px;
  z-index: 10050;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: var(--j2p-cta);
  color: var(--j2p-cta-text);
  font-weight: 700;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.j2p-skip:focus,
.j2p-skip:focus-visible {
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  white-space: nowrap;
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.site-header {
  height: var(--header-h, 76px);
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(228, 234, 242, 0.75);
}

/* Public pages never inherit Design Hub approval-bar offset. */
html:not(:has(.hub-bar)) .site-header {
  top: 0;
}
body:has(.hub-bar) .site-header {
  top: 36px;
}

.site-header .container.nav,
.site-header .nav {
  max-width: var(--max);
  margin: auto;
  padding: 0 30px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  text-decoration: none;
  flex: 0 0 auto;
}

.site-header .brand img {
  display: block;
  height: var(--header-logo-h, 48px);
  width: auto;
  max-width: var(--header-logo-max, 240px);
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  font-weight: 780;
  color: #24334d;
}

.nav-link {
  padding: 28px 0;
  position: relative;
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-weight: 780;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--blue);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--blue);
}

.nav-link.is-current:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

.dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  inset-inline-start: -20px;
  width: 270px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 90;
  pointer-events: none;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.drop-item {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.drop-item:hover {
  background: var(--surface);
  text-decoration: none;
}

.drop-item b {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.drop-item span {
  display: block;
  color: var(--slate);
  font-size: 11px;
  margin-top: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-actions .login {
  font-size: 13px;
  font-weight: 850;
  color: var(--navy);
  padding: 12px 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-actions .login:hover {
  color: var(--blue);
  text-decoration: none;
}

.nav-actions .btn,
.nav-actions .btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  background: var(--j2p-cta);
  color: var(--j2p-cta-text);
  box-shadow: var(--j2p-cta-shadow);
}

.nav-actions .btn-gold:hover {
  background: var(--j2p-cta-hover);
  color: var(--j2p-cta-text);
  text-decoration: none;
}

.nav-actions .btn-gold:active {
  background: var(--j2p-cta-pressed);
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  margin-inline-start: 4px;
  padding-inline-start: 10px;
  border-inline-start: 1px solid var(--line);
}

.lang-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 850;
  color: var(--navy);
  padding: 0 7px;
  cursor: pointer;
  text-decoration: none;
}

.lang-btn.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.lang-btn:hover {
  text-decoration: none;
}

.lang-flag {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(11, 31, 77, 0.12);
  display: block;
}

.mobile-menu {
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--navy);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
}

.mobile-menu svg,
.mobile-menu .ph,
.drawer-close .ph {
  display: block;
}

.btn:focus-visible,
.nav-link:focus-visible,
.login:focus-visible,
.drop-item:focus-visible,
.lang-btn:focus-visible,
.mobile-menu:focus-visible,
.drawer-link:focus-visible,
.drawer-close:focus-visible,
.drawer-login:focus-visible,
.drawer-signup:focus-visible,
.drawer-lang-switch:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.drawer-backdrop {
  display: none;
  pointer-events: none;
}

.mobile-drawer {
  display: none;
}

.mobile-drawer[hidden] {
  display: none !important;
}

html.j2p-nav-open,
html.hub-nav-open,
html.j2p-nav-open body,
html.hub-nav-open body {
  overflow: hidden;
}

@media (max-width: 1279px) {
  :root {
    --header-h: 68px;
  }

  .nav-links {
    display: none;
  }

  .nav-actions .login,
  .nav-actions .lang-switch,
  .nav-actions .btn,
  .nav-actions .btn-gold {
    display: none;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .site-header {
    height: 68px;
  }

  .site-header .container.nav,
  .site-header .nav {
    padding: 0 20px;
  }

  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(6, 19, 47, 0.52);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.2s ease;
  }

  html.j2p-nav-open .drawer-backdrop,
  html.hub-nav-open .drawer-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    inset-inline-start: auto;
    inset-inline-end: 0;
    z-index: 210;
    width: min(400px, 92vw);
    height: 100%;
    height: 100dvh;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    box-shadow: -24px 0 60px rgba(6, 19, 47, 0.22);
  }

  html[dir="rtl"] .mobile-drawer {
    transform: translateX(-100%);
    box-shadow: 24px 0 60px rgba(6, 19, 47, 0.22);
  }

  html.j2p-nav-open .mobile-drawer,
  html.hub-nav-open .mobile-drawer,
  html.j2p-nav-open[dir="rtl"] .mobile-drawer,
  html.hub-nav-open[dir="rtl"] .mobile-drawer {
    transform: none;
  }

  html.j2p-cc-banner-open.j2p-nav-open .mobile-drawer,
  html.j2p-cc-banner-open.hub-nav-open .mobile-drawer {
    padding-bottom: var(--j2p-cc-banner-space, env(safe-area-inset-bottom, 0px));
  }

  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    min-height: 72px;
    padding: 12px 16px;
    background: var(--navy);
    border-bottom: 1px solid rgba(231, 207, 163, 0.28);
    overflow: hidden;
  }

  .drawer-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: calc(100% - 56px);
  }

  .drawer-brand img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
  }

  .drawer-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 8px;
    border: 1px solid rgba(231, 207, 163, 0.55);
    background: transparent;
    color: var(--champagne);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
  }

  .drawer-close:hover {
    background: rgba(231, 207, 163, 0.12);
  }

  .drawer-close:focus-visible {
    outline: 2px solid var(--champagne);
    outline-offset: 2px;
  }

  .drawer-nav {
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px 4px;
    background: #fff;
  }

  .drawer-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 8px;
    border: 0;
    border-bottom: 1px solid #e8eef6;
    border-radius: 0;
    background: transparent;
    color: var(--navy);
    text-align: start;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
  }

  .drawer-link:hover {
    background: rgba(29, 78, 216, 0.06);
    text-decoration: none;
  }

  .drawer-link.is-current {
    background: rgba(29, 78, 216, 0.1);
    box-shadow: inset 3px 0 0 var(--champagne);
  }

  html[dir="rtl"] .drawer-link.is-current {
    box-shadow: inset -3px 0 0 var(--champagne);
  }

  .drawer-link:focus-visible {
    outline: 2px solid var(--champagne);
    outline-offset: -2px;
  }

  .drawer-caret {
    width: 14px;
    height: 14px;
    font-size: 14px;
    line-height: 1;
    flex: 0 0 auto;
    color: #64748b;
    transition: transform 0.18s ease;
  }

  .drawer-group.is-open > .drawer-toggle .drawer-caret {
    transform: rotate(180deg);
  }

  .drawer-link--sub {
    padding-inline-start: 18px;
    min-height: 48px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
  }

  .drawer-foot {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #e2e8f0;
  }

  .drawer-login,
  .drawer-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
  }

  .drawer-login {
    border: 1.5px solid var(--navy);
    color: var(--navy);
    background: #fff;
  }

  .drawer-signup {
    background: var(--j2p-cta);
    color: var(--j2p-cta-text);
    border: 1.5px solid transparent;
  }

  .drawer-login:hover {
    background: var(--surface);
    text-decoration: none;
  }

  .drawer-signup:hover {
    background: var(--j2p-cta-hover);
    text-decoration: none;
  }

  .drawer-lang {
    margin-top: 6px;
    padding: 10px 4px 2px;
  }

  .drawer-lang-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
  }

  .drawer-lang-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
  }

  .drawer-lang-flag {
    width: 28px;
    height: 19px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
    flex: 0 0 auto;
  }
}

@media (max-width: 767px) {
  .mobile-drawer {
    width: min(92vw, 400px);
  }

  .site-header .container.nav,
  .site-header .nav {
    padding: 0 16px;
  }
}

@media (min-width: 1280px) {
  html:not(.j2p-nav-open):not(.hub-nav-open) .drawer-backdrop,
  html:not(.j2p-nav-open):not(.hub-nav-open) .mobile-drawer {
    display: none !important;
  }
}

html[dir="rtl"] .drawer-lang-label {
  letter-spacing: 0;
  text-transform: none;
}

.j2p-chrome-noscript-note {
  margin: 0;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--slate);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

/*
 * Progressive enhancement: before chrome.js sets data-j2p-enhanced,
 * keep desktop-style nav usable (including at mobile widths) so script
 * failure / late load does not leave an empty hamburger-only header.
 */
html:not([data-j2p-enhanced]) .mobile-menu {
  display: none !important;
}

html:not([data-j2p-enhanced]) .drawer-backdrop,
html:not([data-j2p-enhanced]) .mobile-drawer {
  display: none !important;
}

@media (max-width: 1279px) {
  html:not([data-j2p-enhanced]) .site-header {
    height: auto;
    min-height: 68px;
  }

  html:not([data-j2p-enhanced]) .site-header .container.nav,
  html:not([data-j2p-enhanced]) .site-header .nav {
    flex-wrap: wrap;
    height: auto;
    min-height: 68px;
    row-gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  html:not([data-j2p-enhanced]) .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    width: 100%;
    order: 3;
  }

  html:not([data-j2p-enhanced]) .nav-link {
    padding: 8px 0;
  }

  html:not([data-j2p-enhanced]) .nav-link.is-current:after {
    bottom: 0;
  }

  html:not([data-j2p-enhanced]) .nav-actions .login,
  html:not([data-j2p-enhanced]) .nav-actions .lang-switch,
  html:not([data-j2p-enhanced]) .nav-actions .btn,
  html:not([data-j2p-enhanced]) .nav-actions .btn-gold {
    display: inline-flex;
  }

  html:not([data-j2p-enhanced]) .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    width: auto;
    padding: 0 0 0 12px;
    background: transparent;
  }

  html:not([data-j2p-enhanced]) .drop-item {
    padding: 4px 0;
  }

  html:not([data-j2p-enhanced]) .drop-item span {
    display: none;
  }
}

.j2p-chrome-noscript {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}

.j2p-chrome-noscript a {
  color: var(--navy);
}

.j2p-chrome-noscript--footer {
  background: var(--j2p-primary);
  border-bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 0;
}

.j2p-chrome-noscript--footer a {
  color: rgba(255, 255, 255, 0.88);
}


/* ── Footer ─────────────────────────────────────────────── */

.j2p-footer {
  background: var(--j2p-primary);
  color: rgba(255, 255, 255, 0.82);
  margin-top: 0;
}

.j2p-footer a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.j2p-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.j2p-footer__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) repeat(5, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  padding: 3.5rem 0 2.2rem;
}

.j2p-footer__brand img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.j2p-footer__lede {
  margin: 1rem 0 1.25rem;
  max-width: 28ch;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.j2p-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.j2p-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.j2p-social a:hover {
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

.j2p-social svg,
.j2p-social .ph {
  width: 18px;
  height: 18px;
  font-size: 18px;
  color: inherit;
}

.j2p-footer__col h4,
.j2p-footer__col .j2p-footer__title {
  margin: 0 0 0.85rem;
  color: var(--j2p-accent-tint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.j2p-footer__col {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.55rem;
}

html[dir="rtl"] .j2p-footer__col h4,
html[dir="rtl"] .j2p-footer__col .j2p-footer__title {
  letter-spacing: 0;
  text-transform: none;
}

.j2p-footer__col a,
.j2p-footer__col button {
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: inherit;
}
.j2p-footer__col button,
.j2p-footer [data-cookie-open] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.j2p-footer__col button:hover {
  color: #fff;
  text-decoration: underline;
}

.j2p-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1rem 0 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.j2p-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  align-items: center;
}

.j2p-footer__legal a + a::before,
.j2p-footer__langs a + a::before {
  content: "";
}

.j2p-footer__langs {
  display: inline-flex;
  gap: 0.65rem;
}

.j2p-footer__langs a.is-active {
  color: var(--j2p-accent-tint);
  font-weight: 700;
}

.j2p-footer :is(a, button):focus-visible {
  outline: 2px solid var(--j2p-accent-tint);
  outline-offset: 3px;
}

@media screen and (max-width: 1180px) {
  .j2p-footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media screen and (max-width: 720px) {
  .j2p-footer__grid {
    grid-template-columns: 1fr 1fr;
    padding-top: 2.4rem;
  }

  .j2p-footer__brand {
    grid-column: 1 / -1;
  }

  .j2p-footer__col a,
  .j2p-footer__col button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    line-height: 1.5;
  }

  .j2p-footer__legal a,
  .j2p-footer__langs a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
  }
}

@media screen and (max-width: 480px) {
  .j2p-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Cookie dialog ──────────────────────────────────────── */

.j2p-dialog {
  border: 0;
  padding: 0;
  max-width: min(480px, calc(100% - 2rem));
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-float);
  color: var(--ink);
}

.j2p-dialog::backdrop {
  background: rgba(11, 31, 77, 0.5);
}

.j2p-dialog__inner {
  padding: 1.5rem 1.5rem 1.25rem;
}

.j2p-dialog h2 {
  margin: 0 0 0.5rem;
  color: var(--j2p-primary);
  font-size: 1.2rem;
}

.j2p-dialog p {
  margin: 0 0 1rem;
  color: var(--slate);
}

.j2p-dialog label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.65rem 0;
  cursor: pointer;
  font-size: 0.92rem;
}

.j2p-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.j2p-dialog .j2p-btn--ghost {
  color: var(--j2p-primary);
  background: var(--surface);
}
