/* =====================================================================
   CYMART VISUAL V16.8 — corrective override
   Only visual rules. No PHP/AJAX/order logic is changed.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1) RESTORE THE CHOSEN SITE BACKGROUNDS DIRECTLY ON BODY.
   This is intentionally direct (not negative-z pseudo elements) so login
   and registration cannot cover the selected background with plain white.
   --------------------------------------------------------------------- */
html body:not(.cymart-theme-dark),
html body.cymart-theme-light {
  background-color:#eef6ff !important;
  background-image:url('/templates/default/images/cymart-visual/light-desktop.png') !important;
  background-repeat:no-repeat !important;
  background-position:center top !important;
  background-size:cover !important;
  background-attachment:fixed !important;
}
html body.cymart-theme-dark {
  background-color:#07091c !important;
  background-image:url('/templates/default/images/cymart-visual/dark-desktop.png') !important;
  background-repeat:no-repeat !important;
  background-position:center top !important;
  background-size:cover !important;
  background-attachment:fixed !important;
}

/* Background pseudo layers from older patches are no longer needed. */
html body::before,
html body::after {
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

/* Keep page canvases transparent so body background remains visible. */
html body .page-login,
html body .page-content,
html body .main-content,
html body .content,
html body .min-height,
html body .page-registration {
  background-color:transparent !important;
}

/* ---------------------------------------------------------------------
   2) LIGHT LOGIN: remove remaining dark surfaces, use dark readable text.
   --------------------------------------------------------------------- */
html body:not(.cymart-theme-dark) .page-login,
html body.cymart-theme-light .page-login {
  background:none !important;
  color:#121827 !important;
}
html body:not(.cymart-theme-dark) .page-login .login-panel,
html body.cymart-theme-light .page-login .login-panel {
  background:rgba(255,255,255,.91) !important;
  color:#121827 !important;
  border:1px solid rgba(112,151,224,.30) !important;
  box-shadow:0 22px 56px rgba(63,92,151,.15) !important;
}
html body:not(.cymart-theme-dark) .page-login .login-panel input,
html body:not(.cymart-theme-dark) .page-login .login-panel .form-control,
html body.cymart-theme-light .page-login .login-panel input,
html body.cymart-theme-light .page-login .login-panel .form-control {
  background:#f7faff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#cbd9ee !important;
  text-shadow:none !important;
}
html body:not(.cymart-theme-dark) .page-login .login-panel input::placeholder,
html body.cymart-theme-light .page-login .login-panel input::placeholder {
  color:#667085 !important;
  -webkit-text-fill-color:#667085 !important;
  opacity:1 !important;
}
html body:not(.cymart-theme-dark) .page-login .login-panel .login-subtitle,
html body:not(.cymart-theme-dark) .page-login .login-panel .text-right,
html body:not(.cymart-theme-dark) .page-login .login-panel .text-right *,
html body:not(.cymart-theme-dark) .page-login .login-panel .security-note,
html body:not(.cymart-theme-dark) .page-login .login-panel .security-note *,
html body.cymart-theme-light .page-login .login-panel .login-subtitle,
html body.cymart-theme-light .page-login .login-panel .text-right,
html body.cymart-theme-light .page-login .login-panel .text-right *,
html body.cymart-theme-light .page-login .login-panel .security-note,
html body.cymart-theme-light .page-login .login-panel .security-note * {
  color:#111827 !important;
  text-shadow:0 1px 1px rgba(255,255,255,.72) !important;
  opacity:1 !important;
}

/* ---------------------------------------------------------------------
   3) LIGHT FOOTER: no dark blocks. Dark text on a soft light surface.
   --------------------------------------------------------------------- */
html body:not(.cymart-theme-dark) footer,
html body:not(.cymart-theme-dark) footer .footer-top,
html body:not(.cymart-theme-dark) footer .footer-bottom,
html body.cymart-theme-light footer,
html body.cymart-theme-light footer .footer-top,
html body.cymart-theme-light footer .footer-bottom {
  background:rgba(248,251,255,.93) !important;
  color:#111827 !important;
  border-color:rgba(119,151,212,.24) !important;
  box-shadow:none !important;
}
html body:not(.cymart-theme-dark) footer .container,
html body:not(.cymart-theme-dark) footer .page-container,
html body:not(.cymart-theme-dark) footer .row,
html body.cymart-theme-light footer .container,
html body.cymart-theme-light footer .page-container,
html body.cymart-theme-light footer .row {
  background:transparent !important;
}
html body:not(.cymart-theme-dark) footer h1,
html body:not(.cymart-theme-dark) footer h2,
html body:not(.cymart-theme-dark) footer h3,
html body:not(.cymart-theme-dark) footer h4,
html body:not(.cymart-theme-dark) footer h5,
html body:not(.cymart-theme-dark) footer h6,
html body:not(.cymart-theme-dark) footer p,
html body:not(.cymart-theme-dark) footer span,
html body:not(.cymart-theme-dark) footer small,
html body:not(.cymart-theme-dark) footer li,
html body:not(.cymart-theme-dark) footer a,
html body:not(.cymart-theme-dark) footer .nav-link,
html body.cymart-theme-light footer h1,
html body.cymart-theme-light footer h2,
html body.cymart-theme-light footer h3,
html body.cymart-theme-light footer h4,
html body.cymart-theme-light footer h5,
html body.cymart-theme-light footer h6,
html body.cymart-theme-light footer p,
html body.cymart-theme-light footer span,
html body.cymart-theme-light footer small,
html body.cymart-theme-light footer li,
html body.cymart-theme-light footer a,
html body.cymart-theme-light footer .nav-link {
  color:#111827 !important;
  text-shadow:none !important;
  opacity:1 !important;
}
html body:not(.cymart-theme-dark) footer .btn-newsletter,
html body.cymart-theme-light footer .btn-newsletter {
  background:#ffffff !important;
  color:#111827 !important;
  border:1px solid #8f79ef !important;
}
html body:not(.cymart-theme-dark) footer .footer-bottom img,
html body.cymart-theme-light footer .footer-bottom img {
  filter:brightness(0) saturate(100%) opacity(.68) !important;
}

/* ---------------------------------------------------------------------
   4) REGISTRATION: readable light card + black form text.
   --------------------------------------------------------------------- */
html body:not(.cymart-theme-dark) .card-registration,
html body.cymart-theme-light .card-registration {
  background:rgba(255,255,255,.82) !important;
  color:#111827 !important;
  border:1px solid rgba(114,151,220,.30) !important;
  box-shadow:0 22px 55px rgba(67,97,157,.14) !important;
  border-radius:20px !important;
  backdrop-filter:blur(14px) saturate(108%) !important;
  -webkit-backdrop-filter:blur(14px) saturate(108%) !important;
}
html body:not(.cymart-theme-dark) .card-registration::before,
html body:not(.cymart-theme-dark) .card-registration::after,
html body.cymart-theme-light .card-registration::before,
html body.cymart-theme-light .card-registration::after {
  display:none !important;
  content:none !important;
}
html body:not(.cymart-theme-dark) .page-registration,
html body:not(.cymart-theme-dark) .page-registration .registration-steps,
html body:not(.cymart-theme-dark) .page-registration .tab-content,
html body:not(.cymart-theme-dark) .page-registration .tab-pane,
html body.cymart-theme-light .page-registration,
html body.cymart-theme-light .page-registration .registration-steps,
html body.cymart-theme-light .page-registration .tab-content,
html body.cymart-theme-light .page-registration .tab-pane {
  background:transparent !important;
  color:#111827 !important;
}
html body:not(.cymart-theme-dark) .page-registration .wizard-title,
html body:not(.cymart-theme-dark) .page-registration label,
html body:not(.cymart-theme-dark) .page-registration .form-label,
html body:not(.cymart-theme-dark) .page-registration .custom-control-label,
html body:not(.cymart-theme-dark) .page-registration p,
html body:not(.cymart-theme-dark) .page-registration .text-muted,
html body.cymart-theme-light .page-registration .wizard-title,
html body.cymart-theme-light .page-registration label,
html body.cymart-theme-light .page-registration .form-label,
html body.cymart-theme-light .page-registration .custom-control-label,
html body.cymart-theme-light .page-registration p,
html body.cymart-theme-light .page-registration .text-muted {
  color:#111827 !important;
  text-shadow:0 1px 1px rgba(255,255,255,.60) !important;
  opacity:1 !important;
}
html body:not(.cymart-theme-dark) .page-registration input,
html body:not(.cymart-theme-dark) .page-registration select,
html body:not(.cymart-theme-dark) .page-registration textarea,
html body:not(.cymart-theme-dark) .page-registration .form-control,
html body.cymart-theme-light .page-registration input,
html body.cymart-theme-light .page-registration select,
html body.cymart-theme-light .page-registration textarea,
html body.cymart-theme-light .page-registration .form-control {
  background:#ffffff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #c8d6eb !important;
  box-shadow:inset 0 1px 2px rgba(42,62,95,.04) !important;
  text-shadow:none !important;
  opacity:1 !important;
}
html body:not(.cymart-theme-dark) .page-registration input::placeholder,
html body:not(.cymart-theme-dark) .page-registration textarea::placeholder,
html body.cymart-theme-light .page-registration input::placeholder,
html body.cymart-theme-light .page-registration textarea::placeholder {
  color:#657086 !important;
  -webkit-text-fill-color:#657086 !important;
  opacity:1 !important;
}
html body:not(.cymart-theme-dark) .page-registration input:-webkit-autofill,
html body.cymart-theme-light .page-registration input:-webkit-autofill {
  -webkit-text-fill-color:#111827 !important;
  -webkit-box-shadow:0 0 0 1000px #ffffff inset !important;
  box-shadow:0 0 0 1000px #ffffff inset !important;
}
html body:not(.cymart-theme-dark) .page-registration .show-pass,
html body:not(.cymart-theme-dark) .page-registration .show-pass i,
html body.cymart-theme-light .page-registration .show-pass,
html body.cymart-theme-light .page-registration .show-pass i {
  color:#17233c !important;
}

/* ---------------------------------------------------------------------
   5) RECHARGE RAY V16.8
   The moving beam is now SVG <animateMotion>; it physically travels the
   full rounded path: top -> right -> bottom -> left -> top.
   No CSS dash-offset is used anymore.
   --------------------------------------------------------------------- */
html body .cymart-recharge-panel {
  position:relative !important;
  overflow:visible !important;
  isolation:isolate !important;
}
html body .cymart-recharge-panel::before,
html body .cymart-recharge-panel::after {
  content:none !important;
  display:none !important;
  animation:none !important;
}
html body .cymart-recharge-ray-svg {
  display:block !important;
  position:absolute !important;
  inset:-2px !important;
  width:calc(100% + 4px) !important;
  height:calc(100% + 4px) !important;
  z-index:80 !important;
  pointer-events:none !important;
  overflow:visible !important;
}
html body .cymart-recharge-ray-base {
  fill:none !important;
  stroke-width:1.5 !important;
  vector-effect:non-scaling-stroke !important;
}
html body:not(.cymart-theme-dark) .cymart-recharge-ray-base,
html body.cymart-theme-light .cymart-recharge-ray-base {
  stroke:rgba(94,122,238,.30) !important;
}
html body.cymart-theme-dark .cymart-recharge-ray-base {
  stroke:rgba(255,137,205,.28) !important;
}
html body .cymart-recharge-ray-runner-light { display:block !important; }
html body .cymart-recharge-ray-runner-dark { display:none !important; }
html body.cymart-theme-dark .cymart-recharge-ray-runner-light { display:none !important; }
html body.cymart-theme-dark .cymart-recharge-ray-runner-dark { display:block !important; }
html body .cymart-recharge-ray-glow { opacity:.70 !important; }
html body .cymart-recharge-ray-core { opacity:1 !important; }
html body .cymart-recharge-panel > :not(.cymart-recharge-ray-svg) {
  position:relative !important;
  z-index:2 !important;
}

/* Preserve the approved panel surfaces. */
html body:not(.cymart-theme-dark) .cymart-recharge-panel,
html body.cymart-theme-light .cymart-recharge-panel {
  background:rgba(250,252,255,.91) !important;
  border:1px solid rgba(128,158,235,.20) !important;
  border-radius:24px !important;
  box-shadow:0 18px 42px rgba(71,109,187,.12) !important;
}
html body.cymart-theme-dark .cymart-recharge-panel {
  background:linear-gradient(145deg,rgba(31,24,62,.92),rgba(50,26,65,.87)) !important;
  border:1px solid rgba(255,156,211,.18) !important;
  border-radius:24px !important;
  box-shadow:0 22px 48px rgba(7,4,24,.30) !important;
}

@media (max-width:767.98px) {
  html body:not(.cymart-theme-dark),
  html body.cymart-theme-light {
    background-image:url('/templates/default/images/cymart-visual/light-mobile.png') !important;
    background-position:center top !important;
    background-attachment:scroll !important;
  }
  html body.cymart-theme-dark {
    background-image:url('/templates/default/images/cymart-visual/dark-mobile.png') !important;
    background-position:center top !important;
    background-attachment:scroll !important;
  }
  html body .cymart-recharge-panel { border-radius:18px !important; }
}
