/* Guest waiver page. Deliberately plain - Confluence OMP 524337: "Guest
   pages are deliberately plain in structure... What varies per client is
   the surface layer: logo, colours, hero, a few strings." Not governed by
   the platform Style Guide (pages-ophub-hub's styles.css) - that governs
   the fixed Ophub identity, this is the client's.

   Every colour a client can affect goes through these three custom
   properties, never a literal value elsewhere in this file - "the existing
   AAG themes span pale sand (#d3c199) to near-black (#000000) as primary;
   any layout that assumes a mid-tone brand colour breaks on one of them."
   app.js sets these from the client's theme_json on load; the values below
   are the neutral platform default shown before that resolves (or if a
   client hasn't configured a theme yet). */
:root {
  --color-primary: #219761;
  --color-primary-contrast: #ffffff;
  --color-accent: #3f83cb;
  --radius: 10px;
  --ink: #16202b;
  --ink-muted: #5a6472;
  --border: #d8dce1;
  --surface: #ffffff;
  --canvas: #f7f8fa;
  --danger: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

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

.state {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--ink-muted);
  font-size: 17px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.brand img {
  height: 40px;
  width: auto;
}

.brand h1 {
  font-size: 20px;
  margin: 0;
}

.guest-summary {
  color: var(--ink-muted);
  font-size: 15px;
  margin: 0 0 24px;
}

section#terms-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

section#terms-section h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 0 0 12px;
}

.terms-body {
  max-height: 260px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
}

.terms-body :first-child { margin-top: 0; }
.terms-body :last-child { margin-bottom: 0; }

.field {
  display: block;
  margin-bottom: 20px;
}

.field label:not(.field__check label) {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.field input[type="text"],
.field input:not([type]),
.field input[type="date"],
.field select,
.field textarea,
#signed-name {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.field textarea { resize: vertical; min-height: 90px; }

.field__required {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-muted);
}

.field__check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
}

.field__check input { margin-top: 3px; width: 20px; height: 20px; }

#signature-canvas {
  width: 100%;
  height: 160px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  touch-action: none;
  display: block;
  margin-bottom: 8px;
}

.btn {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 20px;
  min-height: 50px;
  border: none;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  cursor: pointer;
}

.btn:disabled { opacity: 0.5; cursor: default; }

.btn--ghost {
  width: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--ink-muted);
  padding: 8px 14px;
  min-height: 0;
  font-size: 14px;
  font-weight: 500;
}

.slot {
  min-height: 1.3em;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--danger);
}

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