/* Mira public demo — portal shell, same components as the client portal.
   Only page-level layout and the public plan card are defined here. */

html,
body {
  height: 100%;
}

body.demo-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#app-screen {
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

#app-screen.active {
  display: flex;
}

#view-container.demo-view {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

#view-container.demo-view .mira-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 0;
}

.demo-skip {
  position: fixed;
  top: -70px;
  left: 14px;
  z-index: 100;
  padding: 9px 13px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.demo-skip:focus { top: 12px; color: #fff; }

.demo-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Public plan card, built from the same tokens as the portal sidebar. */
.mira-demo-plan {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  margin: 0 0 9px;
  padding: 10px 10px 9px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.13), rgba(139, 92, 246, 0.045));
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.mira-demo-plan:hover {
  border-color: rgba(96, 165, 250, 0.58);
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.21), rgba(139, 92, 246, 0.08));
  color: #fff;
}
.mira-demo-plan-kicker {
  color: #93c5fd;
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
}
.mira-demo-plan b {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.mira-demo-plan b em {
  color: var(--text-muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 600;
}
.mira-demo-plan > span:not(.mira-demo-plan-kicker):not(.mira-demo-plan-cta) {
  color: var(--text-muted);
  font-size: 8px;
  line-height: 1.45;
}
.mira-demo-plan-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
  font-size: 8.5px;
  font-weight: 700;
}
.mira-demo-plan-cta .material-icons-round { font-size: 12px; }

/* Demo is text-only; keep the tabs visible, like the portal, but locked. */
.mira-mode:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.mira-mode:disabled:hover {
  color: var(--text-muted);
  border-color: transparent;
  background: transparent;
}

/* Voice input and read-aloud */
.mira-composer .mira-mic {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.24);
}
.mira-composer .mira-mic:hover {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(96, 165, 250, 0.08);
}
.mira-composer .mira-mic.is-recording {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.08);
}
.mira-composer .mira-mic .material-icons-round { font-size: 16px; }
.mira-msg-actions .mira-speak { color: #93c5fd; }
.mira-msg-actions button.is-speaking {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(96, 165, 250, 0.08);
}
.mira-composer .mira-mic:focus-visible,
.mira-msg-actions button:focus-visible,
.mira-send:focus-visible,
.mira-stop:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.72);
  outline-offset: 2px;
}

/* The demo volume card is informational, not a modal trigger. */
.mira-sidebar-quota { cursor: default; }
.mira-sidebar-quota:hover { border-color: rgba(96, 165, 250, 0.22); }

/* The plan banner uses the portal's quota-banner component. */
#mira-quota-banner .mira-banner-link { white-space: nowrap; }

.demo-noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg-deep);
  color: var(--text-primary);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 820px) {
  #app-screen {
    height: 100vh;
    height: 100dvh;
  }
  .mira-page { height: 100%; }
  .mira-composer .mira-mic {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .mira-composer .mira-mic .material-icons-round { font-size: 18px; }
  /* 16px prevents iOS Safari from zooming the page when the composer is focused. */
  .mira-composer textarea { font-size: 16px; }
}
