/* The live page of an example (layouts/_live): a neutral look for the plain HTML of the docs examples.
   Plain CSS on purpose (no Tailwind reset), so the examples look like they do on a fresh site. */

:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: rgb(75, 107, 175);
  --primary-dark: rgb(58, 87, 148);
}

* {
  box-sizing: border-box;
}

html {
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 24px;
  background: #fff;
}

h1, h2, h3, h4 {
  margin: 1.2em 0 0.5em;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1:first-child, h2:first-child, h3:first-child {
  margin-top: 0;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }

p, ul, ol, table, address, fieldset {
  margin: 0 0 1em;
}

address {
  font-style: normal;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-dark);
}

code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.9em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

table {
  border-collapse: collapse;
}

th, td {
  padding: 6px 14px 6px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tr.today th, tr.today td {
  font-weight: 600;
}

/* Forms */
form {
  margin: 0 0 1.5em;
}

label {
  display: inline-block;
  margin: 0 12px 6px 0;
  font-weight: 500;
}

input[type="text"], input[type="search"], input[type="email"], input[type="number"], input[type="tel"],
input[type="password"], input[type="date"], select, textarea {
  font: inherit;
  height: 40px;
  padding: 0 12px;
  margin: 0 12px 8px 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  max-width: 100%;
}

textarea {
  height: auto;
  min-height: 100px;
  padding: 8px 12px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(75, 107, 175, 0.2);
}

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--primary);
  margin-right: 6px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px 6px;
}

legend {
  padding: 0 6px;
  font-weight: 600;
}

button, input[type="submit"], input[type="button"] {
  font: inherit;
  font-weight: 500;
  height: 40px;
  padding: 0 16px;
  margin: 0 8px 8px 0;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

button[type="button"]:not([class*="maps"]) {
  background: #fff;
  color: var(--ink);
  border-color: #cbd5e1;
}

button[type="button"]:not([class*="maps"]):hover {
  background: #f8fafc;
}

/* Pagination lists of the examples */
ul:has(> li > a[href*="/P"]) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

/* A map always has some room */
.maps-map, [id^="maps_"] {
  border-radius: 10px;
}
