/* P2P Meet — base tokens, reset, shared primitives (CORE) */
:root {
  --meet-bg:#202124; --tile-bg:#3c4043; --surface:#303134; --surface-2:#3c4043;
  --btn:#3c4043; --btn-hover:#4a4e52; --btn-off:#ea4335; --btn-off-hover:#d33b2f;
  --accent:#8ab4f8; --accent-strong:#1a73e8; --accent-on:#202124;
  --text:#e8eaed; --text-2:#9aa0a6; --panel-bg:#ffffff; --panel-text:#202124; --panel-text-2:#5f6368;
  --danger:#ea4335; --success:#34a853; --radius-tile:8px; --controls-h:80px; --topbar-h:56px;

  /* Light-theme tokens used by landing + prejoin (Meet home / green room) */
  --light-bg:#ffffff; --light-text:#202124; --light-text-2:#5f6368; --light-border:#dadce0;
  --light-hover:#f1f3f4; --light-blue:#1a73e8; --light-blue-hover:#1765cc; --light-blue-text:#1a73e8;
  --font: "Google Sans", Roboto, Arial, sans-serif;
  --font-body: Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  color: var(--light-text);
  background: var(--light-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.theme-dark { background: var(--meet-bg); color: var(--text); }
#app { height: 100%; min-height: 100vh; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
img, video, canvas { display: block; max-width: 100%; }
a { color: var(--light-blue-text); }

/* Material Symbols Rounded */
.msr {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none;
  flex-shrink: 0;
}
.msr.fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* Focus rings */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.theme-dark :focus-visible { outline-color: var(--accent); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Shared buttons (light screens) */
.btn-primary, .btn-text, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 24px; border-radius: 20px;
  font-family: var(--font); font-size: 14px; font-weight: 500; letter-spacing: .25px;
  white-space: nowrap; transition: background-color .15s, box-shadow .15s, color .15s, border-color .15s;
  text-decoration: none;
}
.btn-primary { background: var(--light-blue); color: #fff; }
.btn-primary:hover:not(:disabled) {
  background: var(--light-blue-hover);
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}
.btn-primary:disabled { background: rgba(60,64,67,.12); color: rgba(60,64,67,.38); }
.btn-primary .msr { font-size: 20px; margin-left: -6px; }
.btn-text { color: var(--light-blue-text); padding: 0 12px; }
.btn-text:hover:not(:disabled) { background: rgba(26,115,232,.06); }
.btn-text:disabled { color: rgba(60,64,67,.38); }
.btn-outline, .btn-outlined { border: 1px solid var(--light-border); color: var(--light-blue-text); background: transparent; }
.btn-outline:hover:not(:disabled), .btn-outlined:hover:not(:disabled) { background: rgba(26,115,232,.04); border-color: #d2e3fc; }
.btn-lg { height: 48px; padding: 0 24px; border-radius: 24px; font-size: 15px; }

/* Boot error (shown if a module fails to load/mount) */
.boot-error {
  max-width: 560px; margin: 15vh auto; padding: 24px; border-radius: 12px;
  border: 1px solid var(--light-border); font-family: var(--font); color: var(--light-text);
}
.boot-error h1 { font-size: 22px; font-weight: 400; margin-bottom: 8px; }
.boot-error pre { white-space: pre-wrap; font-size: 12px; color: var(--danger); background: #fce8e6; padding: 12px; border-radius: 8px; }

/* Fallback toast host (core) — UI agent supersedes with its own host */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
