/* Shopgez 4.6 — visible yet quiet ambient motion on the two login steps.
 * Only backgrounds move; existing MantisBT forms, focus and center alignment do not.
 * Designed for CSS transform / opacity compositing and accessibility preferences.
 */
html.sg-ui-public body.login-layout.light-login .main-container {
  position: relative !important;
  isolation: isolate;
}

/* Two separate ambient layers, painted behind the existing centered login card. */
html.sg-ui-public body.login-layout.light-login .main-container::before,
html.sg-ui-public body.login-layout.light-login .main-container::after {
  content: '' !important;
  display: block !important;
  position: fixed !important;
  inset: -12% -10% !important;
  z-index: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  will-change: transform, opacity;
}

/* Blue highlights drift across the canvas in real time. */
html.sg-ui-public body.login-layout.light-login .main-container::before {
  background-image:
    radial-gradient(ellipse 34% 48% at 15% 58%, rgba(71, 170, 255, .40) 0%, rgba(46, 140, 255, .18) 35%, transparent 78%),
    radial-gradient(ellipse 37% 39% at 85% 21%, rgba(121, 211, 255, .38) 0%, rgba(70, 145, 255, .15) 36%, transparent 76%),
    radial-gradient(ellipse 30% 32% at 55% 92%, rgba(49, 155, 255, .25) 0%, transparent 77%) !important;
  opacity: .94 !important;
  animation: sg46-ambient-drift 10s ease-in-out infinite alternate !important;
}

/* Light ribbon and two small glints add visible motion without flashing. */
html.sg-ui-public body.login-layout.light-login .main-container::after {
  background-image:
    radial-gradient(circle at 18% 65%, rgba(226, 247, 255, .82) 0 3px, rgba(89, 183, 255, .40) 4px 12px, rgba(66, 166, 255, .11) 13px 47px, transparent 62px),
    radial-gradient(circle at 82% 25%, rgba(220, 245, 255, .73) 0 2px, rgba(107, 190, 255, .34) 3px 10px, rgba(66, 166, 255, .10) 11px 42px, transparent 58px),
    linear-gradient(108deg,
      transparent 34%,
      rgba(124, 205, 255, .025) 40%,
      rgba(180, 229, 255, .20) 49%,
      rgba(116, 194, 255, .045) 55%,
      transparent 65%) !important;
  opacity: .85 !important;
  animation: sg46-light-ribbon 11s ease-in-out infinite alternate !important;
}

/* Always above the decorative layers; unmodified authentication and tab order. */
html.sg-ui-public body.login-layout.light-login .main-content {
  position: relative !important;
  z-index: 1 !important;
}

/* Existing edge rings now have discernible, still unhurried motion. */
html.sg-ui-public body.login-layout.light-login::before {
  animation: sg46-edge-ring-1 15s ease-in-out infinite alternate !important;
}
html.sg-ui-public body.login-layout.light-login::after {
  animation: sg46-edge-ring-2 18s ease-in-out infinite alternate !important;
}

@keyframes sg46-ambient-drift {
  0%   { transform: translate3d(-7%, 2%, 0) scale(1.01); }
  50%  { transform: translate3d(1%, -3%, 0) scale(1.045); }
  100% { transform: translate3d(8%, 3%, 0) scale(1.015); }
}
@keyframes sg46-light-ribbon {
  0%   { transform: translate3d(-15%, -2%, 0); opacity: .62; }
  50%  { opacity: .95; }
  100% { transform: translate3d(15%, 2%, 0); opacity: .68; }
}
@keyframes sg46-edge-ring-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-65px, 52px, 0) scale(1.08); }
}
@keyframes sg46-edge-ring-2 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(62px, -45px, 0) scale(1.06); }
}

/* On small screens keep motion visible, but avoid large light flashes behind text. */
@media (max-width: 600px) {
  html.sg-ui-public body.login-layout.light-login .main-container::before {
    opacity: .73 !important;
    animation-duration: 14s !important;
  }
  html.sg-ui-public body.login-layout.light-login .main-container::after {
    opacity: .43 !important;
    animation-duration: 18s !important;
  }
}

/* Respect accessibility and OS/browser preferences. */
@media (prefers-reduced-motion: reduce) {
  html.sg-ui-public body.login-layout.light-login::before,
  html.sg-ui-public body.login-layout.light-login::after,
  html.sg-ui-public body.login-layout.light-login .main-container::before,
  html.sg-ui-public body.login-layout.light-login .main-container::after {
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
    transform: none !important;
  }
  html.sg-ui-public body.login-layout.light-login .main-container::after {
    opacity: 0 !important;
  }
}
