/* JaringanLogis Tools v3.5.1 — account workspace stabilization */

/* The recording showed the Account page being painted before v300 had inserted
   the manual-login UI and before the final session view settled. Keep the real
   Account document hidden until v351 explicitly marks the runtime stable, while
   showing a deterministic loading surface instead of a blank screen. */
html:not(.jl-account-runtime-stable).jl-page-booting body,
html:not(.jl-account-runtime-stable).jl-page-ready body,
html:not(.jl-account-runtime-stable) body {
  opacity: 1 !important;
  pointer-events: none !important;
  transition: none !important;
  overflow: hidden !important;
}

html:not(.jl-account-runtime-stable) body > * {
  visibility: hidden !important;
}

html:not(.jl-account-runtime-stable) body::before {
  content: "JaringanLogis Tools\A Menyiapkan workspace…";
  white-space: pre-line;
  visibility: visible !important;
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  display: grid;
  place-items: center;
  padding: 24px 24px 74px;
  box-sizing: border-box;
  background: var(--bg, #f7f7fc);
  color: var(--text, #20243a);
  text-align: center;
  font-family: Arial, "Segoe UI", sans-serif !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.85;
  letter-spacing: 0;
}

html:not(.jl-account-runtime-stable) body::after {
  content: "";
  visibility: visible !important;
  position: fixed;
  left: 50%;
  top: calc(50% + 42px);
  z-index: 2147483646;
  width: min(280px, calc(100vw - 64px));
  height: 4px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background-color: var(--surface-2, #e7e9f2);
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    var(--brand, #5b5ce2) 34%,
    var(--brand-2, #28a8d8) 66%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 45% 100%;
  animation: jl-account-loading-bar 1.05s ease-in-out infinite;
}

html.jl-account-runtime-stable body {
  transition: none !important;
}

html.jl-account-runtime-stable body::before,
html.jl-account-runtime-stable body::after {
  content: none !important;
  animation: none !important;
}

@keyframes jl-account-loading-bar {
  0% { background-position: -90% 0; }
  50% { background-position: 55% 0; }
  100% { background-position: 190% 0; }
}

/* Google Identity Services renders its own iframe after the host page is ready.
   Reserve the final geometry from the beginning and keep the widget hidden until
   its cross-origin button has mounted and settled. This prevents the visible
   font/border/width change reported on the Account login card. */
#accountGoogleButton {
  width: 320px !important;
  max-width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  contain: layout paint size !important;
  visibility: hidden !important;
  transition: none !important;
  animation: none !important;
}
html.jl-google-button-ready #accountGoogleButton {
  visibility: visible !important;
}
html.jl-google-button-unavailable #accountGoogleButton {
  display: none !important;
}
#accountGoogleButton > div,
#accountGoogleButton iframe {
  width: 320px !important;
  max-width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: none !important;
  animation: none !important;
}

#accountWorkspace.jl-frame-loading {
  position: relative;
}

#accountWorkspace.jl-frame-loading #accountWorkspaceFrame,
#accountWorkspace.jl-frame-loading .account-workspace-toolbar {
  visibility: hidden !important;
}

/* Embedded tools use the same feedback pattern while the child document is
   stabilizing, so opening Advanced Tools / Network Admin never looks frozen. */
#accountWorkspace.jl-frame-loading::before {
  content: "Menyiapkan layanan…";
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 20px 20px 58px;
  box-sizing: border-box;
  background: var(--bg, #f7f7fc);
  color: var(--muted, #69708a);
  text-align: center;
  font-family: Arial, "Segoe UI", sans-serif !important;
  font-size: 13px;
  font-weight: 600;
}

#accountWorkspace.jl-frame-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(50% + 26px);
  z-index: 4;
  width: min(240px, calc(100% - 64px));
  height: 4px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background-color: var(--surface-2, #e7e9f2);
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    var(--brand, #5b5ce2) 34%,
    var(--brand-2, #28a8d8) 66%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 45% 100%;
  animation: jl-account-loading-bar 1.05s ease-in-out infinite;
}

/* MikroTik TLS Host Rule is retired. Keep legacy patch output invisible even
   if an older compatibility layer briefly recreates the entry. */
[data-free-tool="mikrotik"],
[data-v260-subtool="website-checker:mikrotik"],
a[href*="/website-checker/mikrotik-rule/"] {
  display: none !important;
}

#accountWorkspaceFrame,
.account-workspace-toolbar {
  transition: none !important;
  animation: none !important;
}

#accountWorkspaceTitle,
#accountWorkspaceDescription,
#accountWorkspaceRoute,
.account-submenu-link,
.account-access-link {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html:not(.jl-account-runtime-stable) body::after,
  #accountWorkspace.jl-frame-loading::after {
    animation: none !important;
    background-position: 50% 0;
  }
}

@media(max-width:360px) {
  #accountGoogleButton,
  #accountGoogleButton > div,
  #accountGoogleButton iframe {
    width: 300px !important;
  }
}
