/* Synced from the Olive Data platform by tools/Sync-Theme.ps1 on 2026-09-24. Edit there, then re-sync. */
/* ==========================================================================
   Olive Data: public forms shell
   The pages people reach from a link or a QR code: a form, a survey, and the
   thank-you, failed and not-found pages. Loads after olive-forms.css and
   olive-ui.css in _LayoutOnline. Paired with js/olive-public.js.
   ========================================================================== */

/* ===== Shell =============================================================== */
.pub-shell { max-width: 920px; margin: 0 auto; padding: 0 16px 6rem; }
.layout-wrapper .container-xxl.container-p-y { padding-top: 0 !important; }
.content-footer { background: transparent !important; }

/* The top bar: small wordmark, the organisation's logo when it has one, and a progress line along the bottom edge. */
.pub-top {
  position: sticky; top: 0; z-index: 40; margin: 0 -16px 1.5rem; padding: .7rem 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(255, 248, 241, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(228, 218, 200, .6);
}
.pub-top .brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink-700); font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.pub-top .brand img { height: 30px; width: auto; }
.pub-top .brand small { font-weight: 600; color: var(--ink-500); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.pub-top .org img { max-height: 40px; width: auto; border-radius: 6px; }
.pub-top .org img[src=""], .pub-top .org img:not([src]) { display: none; }
.pub-top .bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; }
.pub-top .bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--plum-700), var(--olive-600)); transition: width var(--dur-3, 320ms) var(--ease, ease); border-radius: 0 999px 999px 0; }
.pub-top .status { font-size: .78rem; font-weight: 600; color: var(--ink-500); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pub-top .status b { color: var(--olive-700); }
.pub-top .status.done { color: var(--olive-700); }
@media (max-width: 575.98px) { .pub-top .brand small, .pub-top .status .lbl { display: none; } }

/* The title block */
.pub-hero { margin: .25rem 0 1.5rem; animation: ol-rise var(--dur-3, 320ms) var(--ease-out, ease) both; }
.pub-hero .eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--olive-700); margin-bottom: .35rem; }
.pub-hero h1 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.1rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5rem; color: var(--ink-900); }
.pub-hero .meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .84rem; color: var(--ink-500); }
.pub-hero .meta span { display: inline-flex; align-items: center; gap: .35rem; }
.pub-hero .meta i { color: var(--plum-500); font-size: 1rem; }

/* Sections arrive as they scroll into view */
.pub-reveal { opacity: 0; transform: translateY(10px); transition: opacity var(--dur-3, 320ms) var(--ease-out, ease), transform var(--dur-3, 320ms) var(--ease-out, ease); }
.pub-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .pub-reveal { opacity: 1; transform: none; transition: none; } }

/* ===== Form content ======================================================== */
/* The intro card (a form's own Information section): banner image, title, blurb */
#_frm > .row:first-child .card > .card-body > .card-body img:first-child { max-height: 220px; width: 100%; object-fit: cover; border-radius: 12px; margin-bottom: 1.1rem; }
#_frm h1 { text-transform: none; }
/* Section headings carry a number */
#_frm .card { counter-increment: pub-section; }
#_frm h5.mb-1, #_frm .card-body > h5.text-black, #_frm .card-body > h4.text-black { display: flex; align-items: baseline; gap: .6rem; }
.form-label { font-size: .95rem; color: var(--ink-900); }
.form-label .text-danger { font-weight: 700; margin-left: .15rem; }
.form-control, .form-select { min-height: 46px; font-size: 1rem; }
textarea.form-control { min-height: 7rem; }
.form-check { padding: .1rem 0; }
.form-check-input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; border-color: var(--line-2); cursor: pointer; }
.form-check-input:checked { background-color: var(--plum-900); border-color: var(--plum-900); }
.form-check-input:focus { box-shadow: var(--focus-ring, 0 0 0 4px rgba(var(--om-secondary-rgb), .15)); border-color: var(--plum-500); }
.form-check-label { cursor: pointer; }
/* Choice rows as cards, with enough room for a thumb */
#_frm .form-check.border, #_frm .form-check[class*="border"] { min-height: 46px; display: flex; align-items: center; padding: .55rem .85rem .55rem 2.4rem; border-radius: 10px; transition: background-color var(--dur-1, 120ms) ease, border-color var(--dur-1, 120ms) ease; }
#_frm .form-check.border:hover { background: var(--plum-50); border-color: var(--plum-300) !important; }
#_frm .form-check.border:has(:checked) { background: var(--plum-50); border-color: var(--plum-500) !important; }
/* Validation, matching the app */
.form-control.is-invalid, .form-select.is-invalid { border-color: #C0392B; box-shadow: 0 0 0 4px rgba(192, 57, 43, .12); }
.ol-error { color: #8B1C44; font-size: .82rem; font-weight: 600; margin-top: .3rem; }
.form-disclaimer { font-size: .78rem; color: var(--ink-500); line-height: 1.5; margin: 1.5rem 0 1rem; padding: .85rem 1rem; background: rgba(255, 255, 255, .55); border: 1px dashed var(--line-2); border-radius: 10px; }

/* ===== Action bar ========================================================== */
/* Sticks to the bottom while the form is longer than the screen. */
.pub-actions {
  position: sticky; bottom: 0; z-index: 30; margin: 1rem -16px 0 !important; padding: .8rem 16px calc(.8rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: .6rem; flex-wrap: wrap;
}
.pub-actions > [class*="col-"] { width: auto; flex: 0 0 auto; padding: 0; }
.pub-actions .prev-btn { margin-right: auto; }
.pub-actions .btn { margin-top: 0; min-height: 46px; }
#saveBtn2, #saveBtn { padding: .75rem 1.8rem; min-width: 180px; }
#saveBtn2[disabled], #saveBtn[disabled] { background: var(--plum-300); border-color: var(--plum-300); box-shadow: none; cursor: not-allowed; }
@media (max-width: 575.98px) {
  .pub-actions { justify-content: stretch; }
  .pub-actions > [class*="col-"] { width: 100%; }
  #saveBtn2, #saveBtn, .pub-actions .next-btn { width: 100%; }
  .pub-actions .prev-btn { width: 100%; margin-right: 0; order: 2; }
}

/* ===== Survey wizard (OpenSurvey) ========================================== */
.form-step { animation: ol-rise var(--dur-3, 320ms) var(--ease-out, ease) both; }
.form-step > h5 { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); border: 0; padding: 0; margin-bottom: 1rem; }
.form-step > h5 .pull-right { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-500); font-size: .8rem; }
.form-step .form-label { font-size: 1.15rem; font-weight: 700; color: var(--ink-900); line-height: 1.35; }

/* ===== Outcome pages ======================================================= */
.pub-outcome { max-width: 520px; margin: 3rem auto 0; text-align: center; animation: ol-rise var(--dur-3, 320ms) var(--ease-out, ease) both; }
.pub-outcome .card-body { padding: 3rem 2rem 2.5rem; }
.pub-outcome h1 { font-size: 1.6rem; margin: 0 0 .5rem; letter-spacing: -.02em; }
.pub-outcome p { color: var(--ink-500); margin: 0 auto 1.25rem; max-width: 38ch; line-height: 1.55; }
.pub-outcome .hint { font-size: .8rem; color: var(--ink-300); }
.pub-outcome .btn { min-width: 160px; }
/* The check draws itself */
.pub-check { width: 96px; height: 96px; margin: 0 auto 1.4rem; }
.pub-check circle { fill: var(--lime-100); stroke: var(--olive-600); stroke-width: 3; stroke-dasharray: 300; stroke-dashoffset: 300; animation: pub-draw .7s var(--ease-out, ease) forwards; }
.pub-check path { fill: none; stroke: var(--olive-700); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: pub-draw .45s var(--ease-out, ease) .45s forwards; }
@keyframes pub-draw { to { stroke-dashoffset: 0; } }
.pub-mark { width: 84px; height: 84px; border-radius: 24px; margin: 0 auto 1.4rem; display: grid; place-items: center; font-size: 2.4rem; }
.pub-mark.bad { background: var(--bad-bg); color: var(--bad-fg); }
.pub-mark.missing { background: var(--plum-50); color: var(--plum-900); }
@media (prefers-reduced-motion: reduce) { .pub-check circle, .pub-check path { animation: none; stroke-dashoffset: 0; } }

/* ===== Footer ============================================================= */
.pub-foot { text-align: center; font-size: .78rem; color: var(--ink-500); padding: 2rem 0 1rem; }
.pub-foot a { color: var(--ink-700); text-decoration: none; font-weight: 600; }
.pub-foot a:hover { color: var(--plum-900); }
.pub-foot .dot { margin: 0 .5rem; color: var(--ink-300); }

/* Previewed from the app: a slim ribbon across the top of the public page. */
.pub-preview-ribbon {
  position: sticky; top: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap;
  padding: .5rem 1rem; background: var(--plum-900, #391D66); color: #fff; font-size: .85rem; text-align: center;
}
.pub-preview-ribbon i { font-size: 1.1rem; color: var(--lime-300, #D6E35A); }
.pub-preview-ribbon a { color: var(--lime-300, #D6E35A); font-weight: 700; text-decoration: none; }
.pub-preview-ribbon a:hover { text-decoration: underline; }
.pub-preview-note {
  position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%); z-index: 1200; padding: .6rem 1.1rem; border-radius: 999px;
  background: var(--ink-900, #1F1A2E); color: #fff; font-size: .9rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  animation: pub-note 3.5s ease both;
}
@keyframes pub-note { 0% { opacity: 0; transform: translate(-50%, 8px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
