/*
 * Demo Sites — host page styles.
 *
 * This is a pure static site with no bundler, so @maison-labs/ui-theme tokens
 * are declared inline here rather than imported from the package. These values
 * mirror the canonical token values from packages/ui-theme/src/tokens.css.
 *
 * The chat widget handles its own theming — only the host page is themed here.
 */

/* ── Light mode tokens (default) ──────────────────────────────────────────── */
:root {
  --m-bg: #ffffff;
  --m-surface: #f8f8f8;
  --m-surface-raised: #efefef;
  --m-border: #e2e2e2;
  --m-border-muted: #ebebeb;
  --m-text: #111111;
  --m-text-muted: #555555;
  --m-text-subtle: #888888;

  --m-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --m-sp-4: 1rem;

  --m-radius-md: 6px;

  --m-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);

  --m-transition-fast: 150ms ease;
  --m-transition-base: 200ms ease;

  --m-focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.35);
}

/* ── Dark mode token overrides ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --m-bg: #0f0f0f;
  --m-surface: #1a1a1a;
  --m-surface-raised: #252525;
  --m-border: #2e2e2e;
  --m-border-muted: #222222;
  --m-text: #f0f0f0;
  --m-text-muted: #a0a0a0;
  --m-text-subtle: #666666;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
}

body {
  background-color: var(--m-bg);
  color: var(--m-text);
  font-family: var(--m-font-sans);
  transition:
    background-color var(--m-transition-base),
    color var(--m-transition-base);
}

/* ── Title / logo ──────────────────────────────────────────────────────────── */
/* Currently commented out in index.html; styles preserved for future use. */
.title {
  font-size: 2em;
  color: var(--m-text);
  margin-top: 60px;
  width: 100vw;
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-evenly;
  position: absolute;
  top: 60px;
  width: 100%;
}

.title img {
  width: 50vw;
}

/* ── Theme toggle button ───────────────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  top: var(--m-sp-4);
  right: var(--m-sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  color: var(--m-text-muted);
  cursor: pointer;
  z-index: 9999;
  transition:
    background-color var(--m-transition-fast),
    border-color var(--m-transition-fast),
    color var(--m-transition-fast);
}

.theme-toggle:hover {
  background: var(--m-surface-raised);
  border-color: var(--m-border);
  color: var(--m-text);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--m-focus-ring);
}

.theme-toggle span {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
