/* Shared look for the Embed API example pages. Nothing here is needed to use the API. */
:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --panel: #121922;
  --line: #243040;
  --text: #e6edf3;
  --dim: #8b9aab;
  --accent: #35b8b2;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 13px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif;
}
.ex-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px 10px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.ex-bar .ex-label { color: var(--dim); margin-right: 2px; }
.ex-bar .ex-spacer { flex: 1; }
.ex-main { flex: 1; min-height: 0; display: flex; }
.ex-side {
  width: 250px; flex: none; overflow: auto; background: var(--panel);
  border-right: 1px solid var(--line); padding: 10px;
}
.ex-side h2 { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); margin: 12px 0 6px; }
.ex-side h2:first-child { margin-top: 0; }
#map { flex: 1; min-width: 0; min-height: 0; position: relative; }
/* This page is `color-scheme: dark` and the map's document is light. When a frame's colour scheme differs
   from its page's, the browser paints an OPAQUE backdrop behind the frame - so `background: "transparent"`
   appears to do nothing and the space round the globe is white. Matching the frame's scheme to the map's
   document removes the backdrop. */
#map iframe { color-scheme: light; }

button, select, input[type="text"] {
  font: inherit; color: var(--text); background: #1a2430; border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 10px;
}
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
button.on { background: var(--accent); border-color: var(--accent); color: #04211f; font-weight: 600; }
label.ex-check { display: flex; gap: 8px; align-items: center; padding: 3px 0; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--accent); }

ul.ex-list { list-style: none; margin: 0; padding: 0; }
ul.ex-list li {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 5px 8px; border-radius: 6px; cursor: pointer;
}
ul.ex-list li:hover { background: #1a2430; }
ul.ex-list li.on { background: color-mix(in srgb, var(--accent) 28%, transparent); }
ul.ex-list li span:last-child { color: var(--dim); font-variant-numeric: tabular-nums; }

.ex-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ex-chips button { padding: 3px 9px; border-radius: 999px; }

.ex-readout, .ex-log {
  font: 11.5px/1.5 ui-monospace, Consolas, monospace; color: var(--dim);
  white-space: pre-wrap; margin: 0;
}
.ex-log { max-height: 100%; overflow: auto; }
.ex-log b { color: var(--accent); font-weight: 600; }
.ex-ramp { height: 10px; border-radius: 3px; margin: 2px 0 6px; }
.ex-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }

.ex-notice {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px;
  align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--dim);
  background: radial-gradient(circle at 50% 40%, #16222e, var(--bg));
}
.ex-notice strong { color: var(--text); font-size: 15px; font-weight: 600; }

@media (max-width: 640px) { .ex-main { flex-direction: column; } .ex-side { width: auto; max-height: 40%; border-right: 0; border-bottom: 1px solid var(--line); } }
