/* Sign-in broker page (Telemed-bz7.16). Brand colours arrive from GET /public/tenant-config and
   are set on :root by auth.js through the CSSOM (allowed by the CSP, unlike style attributes).
   The defaults are the platform's neutral branding (apps/api/src/modules/tenancy/default-branding.ts). */
:root {
  --brand-primary: #0f172a;
  --brand-surface: #1e293b;
  --brand-accent: #38bdf8;
  --brand-on-primary: #f8fafc;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  background: var(--brand-surface);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    'Noto Sans Thai',
    'Noto Sans',
    sans-serif;
  color: #0f172a;
}

.card {
  width: 100%;
  max-width: 400px;
  padding: 32px 24px;
  border-radius: 16px;
  border-top: 6px solid var(--brand-accent);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.brand-logo {
  display: block;
  max-width: 160px;
  max-height: 64px;
  width: auto;
  height: auto;
  margin: 0 auto 12px;
  object-fit: contain;
}

.brand-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-primary);
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
  color: var(--brand-primary);
}

.subtitle {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
  color: #334155;
}

.google-button {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

/* The real Google button is an iframe. Until it loads, GIS draws a placeholder
   (div[role="button"]) and hides it afterwards with an inline <style> it injects
   itself - which this page's CSP (style-src without 'unsafe-inline') blocks, so
   the unstyled placeholder stayed on screen above the real button: a page-wide
   logo and doubled text (seen on staging, 01.10.2026). Hidden here instead of
   loosening the CSP; the min-height above keeps the space while the iframe loads. */
.google-button [role='button'] {
  display: none;
}

.status {
  min-height: 1.5em;
  margin: 16px 0 0;
  font-size: 14px;
  color: #475569;
}

.error {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #fef2f2;
  font-size: 14px;
  line-height: 1.5;
  color: #991b1b;
}

[hidden] {
  display: none !important;
}
