/* Catchall demos — layered on the help site's help.css, which supplies the palette, type, header
   and footer. Only what the forms, notices and admin tables need is here. */

/* No sidebar here, so the page is centred on its own. help.css caps `article` at 720px, which
   suits the public pages; the admin tables aren't in an article and get the full width. */
.demo { max-width: var(--max-width); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.demo > article { margin: 0 auto; }

.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }

.notice, .errors {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 20px;
  margin: 24px 0;
  background: var(--paper-alt);
}
.notice-public { border: 2px solid var(--accent); background: #fff; }
.notice-public h2 { margin-top: 16px; color: var(--accent); }
.errors { border-color: #b3261e; background: #fdf1f0; }
.status-link a { word-break: break-all; }

/* Forms */
.demo-form { margin: 24px 0; }
.field { display: block; margin: 0 0 22px; border: 0; padding: 0; }
.field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: 0.9em; margin-top: 4px; }
.choice { display: flex; gap: 10px; align-items: baseline; margin: 6px 0; font-weight: 400; }
.choice input { flex: none; }
.demo-form input[type=text], .demo-form input[type=email], .demo-form input[type=url],
.demo-form input[type=password], .demo-form textarea, .demo-form select {
  width: 100%; font: inherit; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.demo-form input[type=file] { font: inherit; }
.consents { background: var(--paper-alt); border-radius: 12px; padding: 12px 16px; }
button, .submit {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px;
}
button:disabled { opacity: 0.6; cursor: default; }
button.secondary { background: transparent; color: #b3261e; border: 1px solid #b3261e; }
button.link { background: none; color: var(--accent-dark); padding: 0; font-weight: 400; }
/* The honeypot: off screen rather than display:none, which some bots check for. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Status */
.status-pill {
  display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 0.9em;
  background: var(--paper-alt); border: 1px solid var(--line);
}
.status-published { background: #e6f4ea; border-color: #9fd3ad; }
.status-rejected, .status-withdrawn { background: #f3f0ec; color: var(--muted); }
.status-failed { background: #fdf1f0; border-color: #f0b8b3; }
.status-approved, .status-recording, .status-recorded { background: #e8f0f8; border-color: #b8cde3; }
.status-split { background: #e8f0f8; border-color: #b8cde3; }
.parts { padding-left: 20px; }
.parts li { margin: 0 0 14px; }
.parts a { word-break: break-all; }
.timeline { padding-left: 20px; }
.timeline .when { color: var(--muted); display: inline-block; min-width: 9em; }

/* Gallery. Screen recordings are portrait, so the frame is too; YouTube letterboxes the rest. */
.demo-video { margin: 32px 0; }
.demo-video h2 { margin-bottom: 0; }
.video-frame { position: relative; width: 100%; max-width: 420px; aspect-ratio: 9 / 16; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-bottom: 16px; font-size: 0.95em; }
.inline { display: inline; margin: 0; }
.tiles { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: #fff; min-width: 9em; }
.tile strong { display: block; font-size: 1.6em; }
.tile.warn { border-color: #b3261e; }
.facts th { text-align: left; white-space: nowrap; }
.pre { white-space: pre-wrap; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 16px 0; }
.photo-cell a { display: block; }
.photo-grid img { width: 100%; height: 200px; object-fit: contain; background: var(--paper-alt); border-radius: 8px; }
.moves { display: grid; gap: 10px; }
.move { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.move input[type=text], .move input[type=url], .move select { width: auto; flex: 1 1 12em; font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.issue-row { display: grid; grid-template-columns: minmax(16em, 1fr) 1fr; gap: 8px; align-items: center; }
.inline-form { display: flex; gap: 8px; margin: 12px 0; }
.inline-form input { flex: 1; }
.field-cloud span { display: inline-block; margin: 0 10px 6px 0; padding: 2px 10px; border-radius: 999px; background: var(--paper-alt); }
.field-cloud em { color: var(--muted); font-style: normal; }
