/* Boot pages while the runtime loads: the login page's look (service/views/login.xml),
   light or dark with the device. service/js/boot.js inserts the card and spinner. */


/* The root needs a height: the runtime leaves it 0, so a root gradient paints nothing.
   Set on html and body: cloudme.js writes an inline colour on both (phone status bar),
   and on html alone it would take the canvas from body. */
html { height: 100%; }
/* The solid colour under the gradient is what phone browsers paint the status
   bar and the bars around the page with while it loads: Safari ignores a
   gradient and painted them white. */
html, body {
  background: linear-gradient(160deg, #eaf2ff 0%, #f7f9fc 45%, #e6efff 100%) #eef4fe;
}

/* The runtime's busy spinner (#activityLayer, toggled by GUI_ActivityIcon): CloudMe blue in
   both colour schemes, over the app's light and dark themes alike */
#activityLayer .\!path { stroke: #408be7; }

/* The loading card in the login card's look; boot.js fades it out once the first view paints */
#bootCard {
  position: absolute; inset: 0; z-index: 9998;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body:has(#bootCard) #activityLayer { display: none !important; }
/* The view frame paints white, then black, until the view's style is in: hidden
   under the card, faded in as the card fades out */
#win { transition: opacity .25s ease; }
body:has(#bootCard) #win { opacity: 0; }
#bootCard .boot-card {
  width: 420px; max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 44px 32px 36px; text-align: center;
  background: #ffffff; border: 1px solid #e3e8f0; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.12), 0 2px 8px rgba(16, 24, 40, 0.06);
}
#bootCard .boot-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: #0f172a; }
#bootCard .boot-loading { font-size: 14px; color: #64748b; padding: 12px 0 10px; }
#bootCard .boot-spin { width: 30px; height: 30px; animation: boot-rotate 2s linear infinite; transform-origin: center center; }
#bootCard .boot-spin circle { stroke: #408be7; stroke-width: 3; fill: none; stroke-linecap: round; stroke-dasharray: 1, 200; animation: boot-dash 1.5s ease-in-out infinite; }
#bootCard .boot-copy { font-size: 12px; color: #94a3b8; }
@keyframes boot-rotate { 100% { transform: rotate(360deg); } }
@keyframes boot-dash {
  0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 89, 200; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124; }
}

@media (prefers-color-scheme: dark) {
  html, body {
    background: linear-gradient(160deg, #0b1220 0%, #0f1115 50%, #0c1424 100%) #0d1220;
  }
  #bootCard .boot-card { background: #171a21; border-color: #2a2f3a; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.30); }
  #bootCard .boot-title { color: #e6e8ec; }
  #bootCard .boot-loading { color: #9aa0aa; }
  #bootCard .boot-copy { color: #6b7280; }
}

/* Google reCAPTCHA (sign-up): its badge sat behind the help button; the
   sign-up card carries the "Protected by reCAPTCHA" line instead */
.grecaptcha-badge { visibility: hidden !important; }
