/* ============================================================
   Adsrek Pay v25 — unified public page shell
   Landing keeps its own layout. Cabinet keeps its wider layout.
   ============================================================ */

:root{
  --arpay-public-max:1240px;
  --arpay-public-edge:20px;
  --arpay-public-gap:24px;
}

/* Public header/footer mirror the landing page shell instead of the cabinet card shell. */
body.is-guest:not(.page-landing) .pc-header,
body.is-guest:not(.page-landing) .pc-footer{
  width:min(var(--arpay-public-max),calc(100% - (var(--arpay-public-edge) * 2)))!important;
}

body.is-guest:not(.page-landing) .pc-header{
  position:relative!important;
  top:auto!important;
  min-height:76px!important;
  margin:0 auto!important;
  padding:0!important;
  border:0!important;
  border-bottom:1px solid var(--ap-border)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}

body.is-guest:not(.page-landing) .pc-header::before{
  display:none!important;
}

body.is-guest:not(.page-landing) .pc-header__left{
  gap:11px!important;
}

body.is-guest:not(.page-landing) .pc-brand{
  min-width:210px!important;
  gap:11px!important;
}

body.is-guest:not(.page-landing) .pc-brand__mark{
  width:42px!important;
  height:42px!important;
}

body.is-guest:not(.page-landing) .pc-brand__text b{
  font-size:18px!important;
}

body.is-guest:not(.page-landing) .pc-topnav{
  min-width:0!important;
}

body.is-guest:not(.page-landing) .pc-header__right{
  gap:8px!important;
}

body.is-guest:not(.page-landing) .pc-login{
  padding:0 8px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

body.is-guest:not(.page-landing) .pc-register{
  min-height:40px!important;
  padding:0 18px!important;
  border-radius:11px!important;
}

body.is-guest:not(.page-landing) .ap-lang-switch{
  border-radius:11px!important;
}

body.is-guest:not(.page-landing) .adsrek-theme-toggle--cabinet{
  width:38px!important;
  height:38px!important;
  min-height:38px!important;
  border-radius:11px!important;
}

body.is-guest:not(.page-landing) .pc-footer{
  margin:42px auto 0!important;
  padding:28px 0 24px!important;
  border:0!important;
  border-top:1px solid var(--ap-border)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  grid-template-columns:auto minmax(220px,1fr) auto!important;
  gap:22px!important;
}

body.is-guest:not(.page-landing) .pc-footer__brand{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}

body.is-guest:not(.page-landing) .pc-footer__copy{
  text-align:center!important;
  font-size:10px!important;
}

body.is-guest:not(.page-landing) .pc-footer nav{
  gap:18px!important;
}

body.is-guest:not(.page-landing) .pc-footer a{
  font-size:10px!important;
}

/* Shared vertical rhythm for all public pages. */
body.is-guest .pc-public-unified{
  width:min(var(--arpay-public-max),calc(100% - (var(--arpay-public-edge) * 2)))!important;
  max-width:var(--arpay-public-max)!important;
  margin:0 auto!important;
  padding:28px 0 20px!important;
  box-sizing:border-box!important;
}

body.is-guest .pc-app{
  min-height:100vh;
}

/* Sign in / registration / checkout: same outer shell, focused inner content. */
body.is-guest .pc-auth-layout{
  min-height:auto!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
}

body.is-guest .pc-auth-layout>.pc-content-card{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

body.page-auth-sign-in.is-guest .pc-auth-layout>.pc-content-card{
  max-width:580px!important;
}

body.page-auth-sign-up.is-guest .pc-auth-layout>.pc-content-card{
  max-width:960px!important;
}

body.page-checkout.is-guest .pc-auth-layout>.pc-content-card{
  max-width:860px!important;
}

/* Help and docs now share the same 1240px content line. */
body.is-guest .pc-help-layout,
body.is-guest .pc-public-docs-layout{
  width:min(var(--arpay-public-max),calc(100% - (var(--arpay-public-edge) * 2)))!important;
  max-width:var(--arpay-public-max)!important;
  margin:0 auto!important;
  padding:28px 0 20px!important;
}

body.is-guest .pc-help-layout .pc-help-card,
body.is-guest .pc-public-docs-inner{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}

/* Terms / Privacy / public 404 no longer use the cabinet sidebar. */
.pc-public-page-layout{
  flex:1 0 auto;
}

.pc-public-page-inner{
  width:100%;
  min-width:0;
}

body.page-terms.is-guest .ap-legal,
body.page-privacy.is-guest .ap-legal{
  width:100%;
  max-width:960px;
  margin:0 auto;
  gap:16px;
}

body.page-terms.is-guest .ap-legal__intro,
body.page-privacy.is-guest .ap-legal__intro{
  padding:28px 30px;
  border-radius:24px;
}

body.page-terms.is-guest .ap-legal__section,
body.page-privacy.is-guest .ap-legal__section{
  padding:22px 26px;
  border-radius:20px;
}

body.page-not-found.is-guest .pc-public-page-inner{
  max-width:960px;
  margin:0 auto;
}

/* Keep page bottoms visually attached to the shared footer. */
body.is-guest.page-help .ap-help,
body.is-guest.page-api-docs .api-doc-page,
body.is-guest.page-terms .ap-legal,
body.is-guest.page-privacy .ap-legal,
body.is-guest.page-not-found .nf-page{
  margin-bottom:0!important;
}

/* Light theme keeps the same transparent public shell as the landing page. */
html[data-theme="light"] body.is-guest:not(.page-landing) .pc-header,
html[data-theme="light"] body.is-guest:not(.page-landing) .pc-footer{
  border-color:rgba(31,99,180,.10)!important;
  background:transparent!important;
  box-shadow:none!important;
}

html[data-theme="light"] body.is-guest:not(.page-landing) .pc-login{
  background:transparent!important;
}

/* Mobile and tablet: same gutters everywhere. */
@media(max-width:900px){
  :root{--arpay-public-edge:14px;--arpay-public-gap:18px}

  body.is-guest .pc-public-unified,
  body.is-guest .pc-help-layout,
  body.is-guest .pc-public-docs-layout{
    padding-top:18px!important;
    padding-bottom:16px!important;
  }

  body.page-auth-sign-up.is-guest .pc-auth-layout>.pc-content-card,
  body.page-checkout.is-guest .pc-auth-layout>.pc-content-card{
    max-width:100%!important;
  }

  body.page-terms.is-guest .ap-legal,
  body.page-privacy.is-guest .ap-legal{
    max-width:100%;
  }
}

@media(max-width:620px){
  :root{--arpay-public-edge:9px}

  body.is-guest:not(.page-landing) .pc-header{
    margin-top:9px!important;
  }

  body.is-guest:not(.page-landing) .pc-footer{
    margin-top:16px!important;
    margin-bottom:14px!important;
  }

  body.is-guest .pc-public-unified,
  body.is-guest .pc-help-layout,
  body.is-guest .pc-public-docs-layout{
    padding-top:12px!important;
    padding-bottom:12px!important;
  }

  body.page-terms.is-guest .ap-legal__intro,
  body.page-privacy.is-guest .ap-legal__intro,
  body.page-terms.is-guest .ap-legal__section,
  body.page-privacy.is-guest .ap-legal__section{
    padding:18px;
    border-radius:18px;
  }
}
