/* Expert login: app-side additions to the Relai standard theme (frontend/relai-theme/, never edited here).
   Used by index.html (desktop) and m.html (phone). Everything is scoped to the login wrapper, so the
   rest of the app is untouched. */

/* The wrapper is what app.js / m.js show and hide; the themed page fills it. */
.xp-login-wrap > .rth-login { flex: 1 1 auto; width: 100%; min-width: 0; }

/* Google renders its own "Sign in with Google" button into this slot (an iframe). Hold its height so the
   page does not jump while it loads. */
.xp-login .xp-gis { min-height: 44px; display: flex; justify-content: center; margin: 0; }

/* Messages use the theme's note style. The scripts set the text with textContent, so the icon is drawn
   here rather than as a child element. */
.xp-login .xp-note::before {
  content: ""; width: 18px; height: 18px; flex: none; margin-top: 1px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 16v.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 16v.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.xp-login .xp-note { overflow-wrap: anywhere; }

/* ── Desktop (index.html) ── */
/* main.css pins the page to 1440px wide; let the login use the real screen width while it shows. */
html.xp-login-on, html.xp-login-on body { min-width: 0; }
/* main.css sets html to 14px, and the theme sizes text in rem: give the login the 16px root it is drawn for. */
html.xp-login-on { font-size: 16px; }
#login-page .rth-title { letter-spacing: normal; }
#login-page .rth-login { font-feature-settings: normal; }
#login-error:not(.show) { display: none; }
/* app.js writes "Google Sign-In failed to load" into the button slot with inline colours; show it as a note. */
#login-page .g_id_signin > p {
  display: block; width: 100%; margin: 0 !important; padding: 12px 14px; border-radius: var(--rth-r-control);
  background: var(--rth-bad-tint); color: var(--rth-bad-text) !important; text-align: left !important;
  font: 400 var(--rth-fs-14)/1.4 var(--rth-font-body) !important;
}
#legacy-email-login { display: flex; flex-direction: column; gap: 12px; }
#login-page .xp-alt { align-self: flex-start; margin-left: -12px; }

/* ── Phone (m.html) ── */
/* Same cover-everything layer the old .login had (above popups, z-index 50), without the shared .login class
   that the PIN lock screen still uses. */
#login-view.xp-login-wrap { position: fixed; inset: 0; z-index: 60; display: flex; overflow-y: auto; background: var(--rth-white); }
