/* A form's page (page-form.php): a photo side with the welcome, the form in a card. Fluent Forms' fields in OCC's
   look follow below; this file loads on every page, so a form anywhere looks the same. */
.pub-formpage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: calc(100vh - 80px); background: var(--canvas); }
.pub-formpage__side { position: sticky; top: 0; display: flex; align-items: flex-end; height: 100vh; max-height: 100vh; padding: clamp(28px, 4vw, 56px); color: #fff; background: #121212 var(--photo) center / cover no-repeat; isolation: isolate; box-sizing: border-box; }
.pub-formpage__side::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(18, 18, 18, .1) 0, rgba(18, 18, 18, .35) 45%, rgba(18, 18, 18, .88) 100%); }
.pub .pub-formpage__title { margin: 0; color: #fff; font: 700 clamp(2.4rem, 4vw, 3.6rem)/1.04 var(--font-ui); letter-spacing: -.02em; text-wrap: balance; }
.pub-formpage__lead { max-width: 40ch; margin: 16px 0 0 !important; color: #F2EEEA; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.pub-formpage__form { padding: clamp(24px, 5vw, 72px) clamp(16px, 4vw, 64px) 96px; }
.pub-formpage__card { max-width: 720px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-2); box-sizing: border-box; }
@media (max-width: 900px) {
	.pub-formpage { grid-template-columns: minmax(0, 1fr); }
	.pub-formpage__side { position: relative; height: auto; min-height: 340px; }
	.pub-formpage__form { position: relative; z-index: 1; padding-top: 0; margin-top: -32px; }  /* over the photo, not under it */
}

/* ---- Fluent Forms in OCC's look, wherever a form shows: its page, a form placed on any other page, and Fluent Forms'
   own preview. :is(.pub-formpage, body) gives every rule a class's weight, so it outranks Fluent's own styles; its
   inline button colors need !important. Long lists are dropdowns; pick-one and pick-several are rows (occ-rows), the
   one picked in Mist. Optional fields say so in their label, so required ones carry no asterisk. ---- */
/* Fluent Forms' preview (wp-admin's Preview): the form on the site's grounds, light or dark like the site. */
.ff-form-preview-body { background: var(--canvas); color: var(--fg); }
.ff-form-preview-body :is(.ff_preview_body, .ff_form_preview_wrapper) { background: var(--surface) !important; color: var(--fg); }
.ff-form-preview-body #ff_preview_top { background: var(--surface); border-bottom: 1px solid var(--line); color: var(--fg); }  /* its title took the night text on a white bar */
:is(.pub-formpage, body) .fluentform { color: var(--fg); font: 400 16px/1.5 var(--font-body); }
:is(.pub-formpage, body) .fluentform .ff-el-group { margin-bottom: 26px; }
:is(.pub-formpage, body) .fluentform .ff-el-input--label { margin-bottom: 10px; }
:is(.pub-formpage, body) .fluentform .ff-el-input--label label { color: var(--fg); font: 600 16px/1.35 var(--font-body); }
:is(.pub-formpage, body) .fluentform .ff-el-is-required label::after { display: none; }
:is(.pub-formpage, body) .fluentform .ff-el-help-message { margin-top: 8px; color: var(--muted); font-size: 14px; font-style: normal; }
:is(.pub-formpage, body) .fluentform .ff-el-form-control { box-sizing: border-box; min-height: 48px; padding: 10px 14px; border: 1px solid var(--field); border-radius: 8px; background-color: var(--surface); color: var(--fg); font: 400 16px/1.4 var(--font-body); box-shadow: none; }
:is(.pub-formpage, body) .fluentform textarea.ff-el-form-control { min-height: 80px; }
:is(.pub-formpage, body) .fluentform select.ff-el-form-control { padding-right: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23231B17' stroke-width='1.75'/%3E%3C/svg%3E") right 14px center / 12px no-repeat; appearance: none; cursor: pointer; }  /* the same arrow as the site's other dropdowns */
html[data-theme="dark"] :is(.pub-formpage, body) .fluentform select.ff-el-form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23F6F1EC' stroke-width='1.75'/%3E%3C/svg%3E"); }
:is(.pub-formpage, body) .fluentform .ff-el-form-control::placeholder { color: var(--muted); opacity: 1; }
:is(.pub-formpage, body) .fluentform .ff-el-form-control:is(:focus, :hover) { background-color: var(--surface); color: var(--fg); }  /* Fluent turns the box you're in white */
:is(.pub-formpage, body) .fluentform .ff-el-form-control:focus { border-color: var(--primary); outline: 3px solid var(--focus); outline-offset: 1px; box-shadow: none; }
:is(.pub-formpage, body) .fluentform .ff-el-form-control:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--surface) inset; -webkit-text-fill-color: var(--fg); caret-color: var(--fg); }  /* the browser's autofill paints it light too */
:is(.pub-formpage, body) .fluentform .ff-el-is-error .ff-el-form-control { border-color: var(--error-line); }
:is(.pub-formpage, body) .fluentform .error, :is(.pub-formpage, body) .fluentform .text-danger { margin-top: 8px; color: var(--error); font-size: 14px; }
:is(.pub-formpage, body) .fluentform .ff-t-container { gap: 16px; }

/* Choices (occ-rows): a full-width row each, the box or circle first, the row picked in Mist */
:is(.pub-formpage, body) .fluentform .occ-rows .ff-el-input--content { display: grid; gap: 8px; }
:is(.pub-formpage, body) .fluentform .occ-rows .ff-el-form-check { margin: 0; padding: 0; }
:is(.pub-formpage, body) .fluentform .occ-rows .ff-el-form-check-label { display: flex; align-items: center; gap: 14px; box-sizing: border-box; min-height: 52px; margin: 0; padding: 12px 16px; border: 1px solid var(--field); border-radius: 8px; background: var(--surface); color: var(--fg); font: 400 16px/1.35 var(--font-body); cursor: pointer; transition: border-color .15s, background-color .15s; }
:is(.pub-formpage, body) .fluentform .occ-rows .ff-el-form-check-label:hover { border-color: var(--primary); }
:is(.pub-formpage, body) .fluentform .occ-rows .ff-el-form-check-label:has(input:checked) { border-color: var(--primary); background: var(--select-bg); color: var(--select-fg); }
:is(.pub-formpage, body) .fluentform .occ-rows .ff-el-form-check-input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--primary); cursor: pointer; }
:is(.pub-formpage, body) .fluentform .occ-rows .ff-el-form-check-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[data-theme="dark"] :is(.pub-formpage, body) .fluentform { color-scheme: dark; }  /* native boxes and dropdown lists at night */

/* Half-width fields (occ-half) pair up side by side: each step is a two-column grid, and everything else spans both
   columns. Hidden fields take no cell, so pairs stay paired whatever shows. */
@media (min-width: 640px) {
	:is(.pub-formpage, body) .fluentform .fluentform-step.active { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; }
	:is(.pub-formpage, body) .fluentform .fluentform-step.active > :not(.occ-half) { grid-column: 1 / -1; }
}

/* Sections inside the family step */
:is(.pub-formpage, body) .fluentform .ff-el-section-break { margin: 8px 0 22px; }
:is(.pub-formpage, body) .fluentform .ff-el-section-break .ff-el-section-title { margin: 0 0 4px; color: var(--fg); font: 800 1.45rem/1.2 var(--font-heading); }
:is(.pub-formpage, body) .fluentform .ff-el-section-break hr { display: none; }
:is(.pub-formpage, body) .fluentform .ff-section_break_desk, :is(.pub-formpage, body) .fluentform .ff-el-section-break div { color: var(--muted); }
:is(.pub-formpage, body) .fluentform .occ-person-head { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
:is(.pub-formpage, body) .fluentform .occ-person-head .ff-el-section-title { font: 700 1.1rem/1.2 var(--font-heading); }
:is(.pub-formpage, body) .fluentform .occ-save-note { margin: 0; color: var(--muted); font-size: 14px; }
:is(.pub-formpage, body) .occ-form-note { margin: 0; padding: 18px 20px; border-radius: 12px; background: var(--sunk); }

/* Kids and students (Repeater Containers): each row a card, "Child 1", "Child 2", with Add another and Remove in words
   instead of Fluent's small icons */
:is(.pub-formpage, body) .fluentform .ff-repeater-container > .ff-el-input--label label { font: 800 1.35rem/1.2 var(--font-heading); }
:is(.pub-formpage, body) .fluentform .ff_repeater_container_list { display: grid; gap: 14px; counter-reset: occrow; }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row { position: relative; display: flex; flex-wrap: wrap; gap: 0 16px; padding: 52px 18px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--canvas); counter-increment: occrow; }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row::before { content: "Child " counter(occrow); position: absolute; top: 18px; left: 18px; color: var(--fg); font: 700 1.05rem/1 var(--font-heading); }
:is(.pub-formpage, body) .fluentform [data-root_name="students"] .ff_repeater_cont_row::before { content: "Student " counter(occrow); }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row > .ff-t-cell { flex: 1 1 0 !important; min-width: 0; }  /* the row's two columns share it */
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row > .repeat_btn { position: absolute; top: 10px; right: 12px; flex: none !important; width: auto; margin: 0; padding: 0; }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row .ff-el-repeat-buttons-list { display: flex; gap: 6px; margin: 0; }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row :is(.repeat-plus, .repeat-minus) { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--field); border-radius: 999px; background: var(--surface); color: var(--fg); font: 600 13px/1 var(--font-body); cursor: pointer; }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row :is(.repeat-plus, .repeat-minus):hover { border-color: var(--primary); color: var(--primary); }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row :is(.repeat-plus, .repeat-minus) svg { display: none; }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row .repeat-plus::after { content: "+ Add another"; }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row .repeat-minus::after { content: "Remove"; }
@media (max-width: 640px) { :is(.pub-formpage, body) .fluentform .ff_repeater_cont_row > .ff-t-cell { flex: 1 1 100% !important; } }
:is(.pub-formpage, body) .fluentform .ff_repeater_cont_row :is(.ff-el-form-control, select) { width: 100%; }

/* Steps: "Step 1 of 3 - Your visit" over a slim bar */
:is(.pub-formpage, body) .fluentform .ff-step-header { margin-bottom: 28px; }
:is(.pub-formpage, body) .fluentform .ff-el-progress-status { margin-bottom: 10px; padding: 0; color: var(--muted); font: 600 14px/1.3 var(--font-body); }
:is(.pub-formpage, body) .fluentform .ff-el-progress { height: 6px; overflow: hidden; border-radius: 3px; background: var(--line); }
:is(.pub-formpage, body) .fluentform .ff-el-progress-bar { height: 100%; border-radius: 3px; background: var(--primary); transition: width .3s; }
:is(.pub-formpage, body) .fluentform .ff-el-progress-bar span { display: none; }  /* Fluent's percent */

/* Buttons: Continue and Send are the one filled action; Back is a quiet link beside it */
:is(.pub-formpage, body) .fluentform .step-nav, :is(.pub-formpage, body) .fluentform .ff_submit_btn_wrapper { display: flex; align-items: center; gap: 22px; margin-top: 10px; }
:is(.pub-formpage, body) .fluentform .ff-btn { float: none !important; min-height: 48px; padding: 0 30px; border: 0 !important; border-radius: 999px !important; font: 600 13px/1 var(--font-ui) !important; letter-spacing: .06em; text-transform: uppercase; box-shadow: none !important; opacity: 1; }
:is(.pub-formpage, body) .fluentform :is(.ff-btn-next, .ff-btn-submit) { order: -1; background: var(--primary) !important; color: var(--primary-fg) !important; }
:is(.pub-formpage, body) .fluentform :is(.ff-btn-next, .ff-btn-submit):hover { background: var(--primary-hover) !important; }
:is(.pub-formpage, body) .fluentform .ff-inner_submit_container { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 22px; }  /* the last step: Send first too, then Back */
:is(.pub-formpage, body) .fluentform .ff-inner_submit_container > .ff-t-cell { flex: none !important; width: auto; }
:is(.pub-formpage, body) .fluentform .ff-inner_submit_container :is(.step-nav, .ff_submit_btn_wrapper) { margin: 0; }
:is(.pub-formpage, body) .fluentform .ff-btn-prev { min-height: 44px; padding: 0 4px; background: none !important; color: var(--muted) !important; letter-spacing: 0; text-transform: none; font: 600 15px/1 var(--font-body) !important; }
:is(.pub-formpage, body) .fluentform .ff-btn-prev:hover { color: var(--fg) !important; text-decoration: underline; }

/* After sending */
:is(.pub-formpage, body) .ff-message-success { padding: 8px 0; border: 0; box-shadow: none; color: var(--fg); font-size: 17px; }
:is(.pub-formpage, body) .ff-message-success h3 { margin: 0 0 10px; font: 800 1.8rem/1.15 var(--font-heading); }

@media (max-width: 640px) {
	:is(.pub-formpage, body) .fluentform :is(.ff-btn-next, .ff-btn-submit) { flex: 1; }
	:is(.pub-formpage, body) .fluentform .ff-inner_submit_container > .ff-t-cell:has(.ff-btn-submit) { flex: 1 !important; }
	:is(.pub-formpage, body) .fluentform .ff-inner_submit_container .ff-btn-submit { width: 100%; }
}

/* Two columns of rows (Find a Life Group's days) */
:is(.pub-formpage, body) .fluentform .occ-rows.occ-two .ff-el-input--content { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Find a Life Group, once sent: the groups that fit (Planning Center Groups for BuddyBoss prints .pcogb-fit) */
.pcogb-fit { display: flex; flex-direction: column; gap: 16px; }
:is(.pub-formpage, body) .pcogb-fit h2 { margin: 0; font: 700 clamp(22px, 3vw, 28px)/1.2 var(--font-ui); letter-spacing: -.01em; color: var(--fg); }
.pcogb-fit p { margin: 0; color: var(--muted); }
.pcogb-fit__list { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.pcogb-fit__card, .pcogb-fit__team { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
:is(.pub-formpage, body) .pcogb-fit__card h3, :is(.pub-formpage, body) .pcogb-fit__team h3 { margin: 0; font: 700 18px/1.3 var(--font-ui); color: var(--fg); }
.pcogb-fit__tags { font-size: 14px; }
.pcogb-fit button { min-height: 48px; padding: 0 22px; border: 2px solid transparent; border-radius: 999px; background: var(--primary); color: #fff; font: 600 15px/1 var(--font-ui); cursor: pointer; align-self: flex-start; }
.pcogb-fit button:hover { background: var(--primary-hover); }
.pcogb-fit button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.pcogb-fit .pcogb-fit__quiet { background: transparent; border-color: var(--field); color: var(--fg); }
.pcogb-fit .pcogb-fit__quiet:hover { background: var(--sunk, #EFE7E0); }
.pcogb-fit__team { background: transparent; border-style: dashed; }
