/* Smooth MPA transitions for /test (browser + PWA) */

/* Snap cookie sheet: /test auto-dismisses; hide before JS to kill flash */
#root > .pointer-events-none.fixed.inset-x-0.bottom-0 {
  display: none !important;
}

/* Wrong guest/member chrome until auth boot sets data-sd-auth */
html[data-sd-auth='0'] header.bg-brand-500 [data-slot='avatar'],
html[data-sd-auth='0'] header.bg-brand-500 [data-slot='avatar-fallback'],
html[data-sd-auth='0'] header.bg-brand-500 [aria-label^='Balance'],
html[data-sd-auth='0'] header.bg-brand-500 [aria-label='Account Balance'],
html[data-sd-auth='0'] header.bg-brand-500 [aria-label='Saved Domains'],
html[data-sd-auth='0'] header.bg-brand-500 [aria-label='Cart'],
html[data-sd-auth='0'] header.bg-brand-500 [aria-label='Account'],
html[data-sd-auth='0'] header.bg-brand-500 [aria-label='Help'] {
  visibility: hidden !important;
}

html[data-sd-auth='1'] header.bg-brand-500 a[href*='/login/'],
html[data-sd-auth='1'] header.bg-brand-500 a[href*='/register/'] {
  visibility: hidden !important;
}

html.sd-soft-nav #root,
html.sd-soft-nav body > #content {
  opacity: 0;
}

html.sd-soft-nav.sd-soft-ready #root,
html.sd-soft-nav.sd-soft-ready body > #content {
  animation: sdSoftPageIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Account panel: keep header + sidebar painted; only the content column swaps */
html.sd-account.sd-soft-nav #root,
html.sd-account.sd-soft-nav body > #content {
  opacity: 1 !important;
  animation: none !important;
}

body.sd-soft-leaving #root,
body.sd-soft-leaving #content {
  opacity: 0 !important;
  transition: opacity 0.14s ease-out !important;
  pointer-events: none !important;
}

body.sd-soft-leaving.sd-account-leaving #root,
body.sd-soft-leaving.sd-account-leaving #content {
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.sd-soft-leaving.sd-account-leaving
  .bg-background.max-w-full.min-w-0.flex-1.self-stretch.overflow-x-clip
  > *:not(#sd-splash) {
  opacity: 0 !important;
  transition: opacity 0.12s ease-out !important;
  pointer-events: none !important;
}

@keyframes sdSoftPageIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.sd-soft-nav #root,
  html.sd-soft-nav body > #content,
  html.sd-soft-nav.sd-soft-ready #root,
  html.sd-soft-nav.sd-soft-ready body > #content,
  body.sd-soft-leaving #root,
  body.sd-soft-leaving #content,
  body.sd-soft-leaving.sd-account-leaving
    .bg-background.max-w-full.min-w-0.flex-1.self-stretch.overflow-x-clip
    > *:not(#sd-splash) {
    opacity: 1 !important;
    animation: none !important;
    transition: none !important;
  }
}
