/* Placeholder styling. The real form theme is built to match the existing
   Formsite forms once they have been inventoried. */
:root {
  --ink: #1b1f2a;
  --muted: #5b6272;
  --bg: #f6f7f9;
  --card: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap {
  max-width: 720px;
  margin: 48px auto;
  padding: 32px 16px;
  background: var(--card);
  border-radius: 8px;
}
h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
p { color: var(--muted); }

/* ---- forms ------------------------------------------------------------ */

.wrap { max-width: 860px; }

.form { display: flex; flex-wrap: wrap; gap: 0 16px; }
.form > * { flex: 1 1 100%; min-width: 0; }

h2.section {
  flex-basis: 100%;
  margin: 28px 0 4px;
  padding: 10px 14px;
  font-size: 1.05rem;
  color: #fff;
  background: #009688;      /* the teal the Formsite bursaries form used */
  border-radius: 6px;
}
.prose { color: var(--muted); }
.prose p { margin: .4rem 0; }

.field { margin: 0 0 16px; }
.field-half    { flex: 1 1 calc(50% - 16px); }
.field-quarter { flex: 1 1 calc(25% - 16px); }
@media (max-width: 640px) {
  .field-half, .field-quarter { flex-basis: 100%; }
}

.field label,
.signature legend { display: block; font-weight: 600; margin: 0 0 4px; }
.required { color: #c62828; }
.help { margin: 2px 0 6px; font-size: .875rem; color: var(--muted); }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=password], select, textarea {
  width: 100%;
  padding: 9px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bdbdbd;
  border-radius: 8px;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(0, 150, 136, .35);
  border-color: #009688;
  outline-offset: 1px;
}

.choices { display: grid; gap: 6px 16px; }
.choices.columns-2 { grid-template-columns: repeat(2, 1fr); }
.choices.columns-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .choices[class*="columns-"] { grid-template-columns: 1fr; } }
.choice { display: flex; gap: 8px; align-items: baseline; font-weight: 400; }

.files { margin: 0 0 8px; padding: 0; list-style: none; }
.files li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; }
.filesize { color: var(--muted); font-size: .85rem; }

.signature { margin: 0; padding: 0; border: 0; }
.signature-pad {
  width: 100%; max-width: 600px; height: 180px;
  background: #fff; border: 1px dashed #bdbdbd; border-radius: 8px;
  touch-action: none;                 /* so a drawn line does not scroll the page */
}
.signature-actions { display: flex; gap: 12px; align-items: baseline; margin-top: 6px; }
.signed { color: #00695c; font-size: .875rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0 0; }
button, .button {
  padding: 12px 22px;
  font: inherit; font-weight: 600;
  color: #fff; background: #009688;
  border: 0; border-radius: 10px; cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: #00796b; }
button.secondary { color: var(--ink); background: #e0f2f1; }
button.secondary:hover { background: #b2dfdb; }
button.link, .link {
  padding: 0; color: #00695c; background: none;
  font-weight: 400; text-decoration: underline; cursor: pointer;
}

.notice { padding: 10px 14px; background: #e0f2f1; border-radius: 8px; color: var(--ink); }
.error-summary {
  padding: 10px 14px; background: #ffebee; border-radius: 8px;
  color: #b71c1c; font-weight: 600;
}
ul.error-summary { padding-left: 32px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c62828; }
p.error { margin: 4px 0 0; color: #c62828; font-size: .875rem; }
.progress { color: var(--muted); font-size: .875rem; }
.save-note { flex-basis: 100%; margin-top: 18px; font-size: .9rem; }
.reference { font-size: 1.05rem; }
.form.narrow { max-width: 420px; }
[hidden] { display: none !important; }

/* ---- admin ------------------------------------------------------------ */

.adminbar {
  display: flex; gap: 16px; align-items: center;
  margin: -12px 0 24px; padding: 0 0 12px;
  border-bottom: 1px solid #e0e0e0;
}
.adminbar .spacer { flex: 1; }
.adminbar a { color: #00695c; }
.adminbar form { margin: 0; }
.crumbs { margin: 0 0 4px; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

table.grid { width: 100%; border-collapse: collapse; margin: 12px 0 20px; }
table.grid th, table.grid td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid #eceff1; vertical-align: top;
}
table.grid th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.grid td.num, table.grid th.num { text-align: right; }
table.grid tbody tr:hover { background: #f5fbfa; }

table.meta { border-collapse: collapse; margin: 0 0 20px; }
table.meta th { padding: 3px 16px 3px 0; text-align: left; font-weight: 600; color: var(--muted); }
table.meta td { padding: 3px 0; }

.searchbar { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; }
.searchbar input[type=search] {
  flex: 1 1 340px; padding: 9px 10px; font: inherit;
  border: 1px solid #bdbdbd; border-radius: 8px;
}
.pager { display: flex; gap: 10px; }

.answer { display: flex; gap: 16px; padding: 8px 0; border-bottom: 1px solid #f1f3f4; }
.answer-label { flex: 0 0 38%; font-weight: 600; }
.answer-value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shot { margin: 0 0 10px; }
.shot img {
  max-width: 340px; max-height: 180px;
  background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
}
.shot figcaption, .file { font-size: .875rem; }
.secret {
  padding: 10px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem; letter-spacing: .08em; background: #f5f5f5; border-radius: 8px;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }

/* The suitability score's workings, folded away until somebody wants them. */
.scoring { margin: 0 0 20px; }
.scoring > summary { cursor: pointer; font-weight: 600; }
.scoring table.grid { margin-top: 10px; }
.warn {
  padding: 8px 12px; border-left: 3px solid #b26a00; background: #fff8e6;
  border-radius: 4px; color: #4a3b1a;
}
