/* Styles for the example pages only. The widget brings its own styles. */
:root {
  --bg: #f7f5f0;
  --surface: #fff;
  --text: #1d2327;
  --muted: #5c6770;
  --border: #e2ddd3;
  --accent: #0f766e;
  --code-bg: #1e2428;
  --code-text: #e6edf3;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 16px 120px;
}

.demo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  padding: 12px 16px;
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 14px;
}
.demo-nav a { color: #9be7c4; text-decoration: none; }
.demo-nav a[aria-current="page"] { color: #fff; font-weight: 600; text-decoration: underline; }
.demo-nav strong { margin-right: auto; }

.hero {
  padding: 48px 0 32px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}
.hero p { margin: 0 0 24px; max-width: 40em; color: var(--muted); font-size: 1.15em; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.button svg { width: 20px; height: 20px; fill: currentColor; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.card h3 { margin: 0 0 4px; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: .95em; }

section { margin: 40px 0; }
h2 { font-size: 1.5rem; margin: 0 0 12px; }

pre {
  margin: 12px 0;
  padding: 16px;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 10px;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
p code, li code, td code { padding: 1px 5px; background: #ebe6db; border-radius: 4px; }

table { width: 100%; border-collapse: collapse; font-size: .95em; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }

.note {
  padding: 12px 16px;
  background: #fff7e0;
  border-left: 4px solid #e0a800;
  border-radius: 6px;
  font-size: .95em;
}

/* Demo log (see demo.js) */
.demo-log {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 10;
  width: min(380px, calc(100vw - 32px));
  max-height: 40vh;
  overflow: auto;
  padding: 10px 12px;
  background: rgba(30, 36, 40, .94);
  color: var(--code-text);
  border-radius: 10px;
  font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.demo-log.right { left: auto; right: 16px; }
.demo-log:empty { display: none; }
.demo-log div + div { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .12); }
.demo-log a { color: #9be7c4; word-break: break-all; }
.demo-log b { color: #fff; }

@media (max-width: 600px) {
  .demo-log { display: none; }
}
