/*
 * HCFB Campaign Engine -- staff-only Fundraise Experience preview.
 * Loaded only on /fundraise-preview/. Large, calm, one task per step; builds on
 * campaign-engine.css and campaign-preview.css (staff strip and hero).
 */

.hcfb-fr { width: min(100% - 2rem, 54rem); margin: clamp(1.5rem, 4vw, 2.5rem) auto clamp(3rem, 7vw, 5rem); color: var(--hcfb-ce-navy, #262760); font-size: 1.125rem; line-height: 1.55; }
.hcfb-fr *, .hcfb-fr *::before, .hcfb-fr *::after { box-sizing: border-box; }
.hcfb-fr-main .hcfb-fr__hero h1 { max-width: 24ch; }
/* The theme resets margins on #hcfb-primary-content children (body.home); keep breathing room under the hero. */
#hcfb-primary-content.hcfb-fr-main > .hcfb-fr { margin-top: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: clamp(3rem, 7vw, 5rem); }
.hcfb-fr__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Step indicator */
.hcfb-fr__steps ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; counter-reset: none; }
.hcfb-fr__steps li { display: flex; align-items: center; gap: 0.55rem; min-width: 0; padding: 0.55rem 0.7rem; border-radius: 0.75rem; background: #fff; border: 1px solid #d8d3c6; color: #5a5a66; font-size: 0.95rem; font-weight: 600; line-height: 1.25; }
.hcfb-fr__steps li.is-current { border: 2px solid var(--hcfb-ce-navy, #262760); color: var(--hcfb-ce-navy, #262760); box-shadow: 0 2px 8px rgba(38, 39, 96, 0.08); }
.hcfb-fr__steps li.is-done { color: var(--hcfb-ce-navy, #262760); }
.hcfb-fr__step-n { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 1.85rem; height: 1.85rem; border-radius: 999px; background: #ece8dd; font-weight: 800; }
.hcfb-fr__step-name { min-width: 0; overflow-wrap: anywhere; }
.hcfb-fr__steps li.is-current .hcfb-fr__step-n { background: var(--hcfb-ce-navy, #262760); color: #fff; }
.hcfb-fr__steps li.is-done .hcfb-fr__step-n { background: var(--hcfb-ce-green, #a2c13d); color: var(--hcfb-ce-navy, #262760); }

/* Panel */
.hcfb-fr__panel { padding: clamp(1.25rem, 4vw, 2.5rem); border-radius: 1.25rem; background: #fff; border: 1px solid #d8d3c6; box-shadow: 0 1px 3px rgba(38, 39, 96, 0.06), 0 8px 24px rgba(38, 39, 96, 0.05); }
.hcfb-fr__panel > :last-child { margin-bottom: 0; }
.hcfb-fr__title { margin: 0 0 0.6rem; padding: 0; color: var(--hcfb-ce-navy, #262760); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); font-weight: 800; line-height: 1.15; text-wrap: balance; }
.hcfb-fr__lead { margin: 0 0 1.5rem; color: #3d3e5c; }
.hcfb-fr__empty { margin: 0; font-size: 1.15rem; }
.hcfb-fr h3 { margin: 0 0 0.35rem; color: var(--hcfb-ce-navy, #262760); font-size: 1.3rem; font-weight: 800; line-height: 1.2; }

/* "Fundraising as" chip with an inline Change link (44px tall tap target that stays visually a light text link). */
.hcfb-fr__chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 0.35rem; margin: 0 0 1.5rem; padding: 0.15rem 0.35rem 0.15rem 0.9rem; border-radius: 0.9rem; background: #f4f2fb; color: #3d3e5c; font-size: 1rem; font-weight: 600; }
.hcfb-fr__chip a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.6rem; border-radius: 999px; color: var(--hcfb-ce-navy, #262760); font-weight: 800; text-decoration: underline; text-underline-offset: 0.15em; }
.hcfb-fr__chip a:hover { background: #fff; }

/* Campaign cards */
.hcfb-fr__campaigns { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.hcfb-fr__campaign { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); overflow: hidden; border: 1px solid #d8d3c6; border-radius: 1rem; background: #fff; }
.hcfb-fr__campaign-media { display: flex; align-items: center; justify-content: center; min-height: 11rem; background: var(--hcfb-ce-navy, #262760); }
.hcfb-fr__campaign-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hcfb-fr__campaign-mark { color: var(--hcfb-ce-orange, #f78d22); font-size: 4rem; font-weight: 800; }
.hcfb-fr__campaign-body { padding: 1.25rem 1.4rem; }
.hcfb-fr__campaign h3 { margin: 0 0 0.4rem; font-size: 1.45rem; line-height: 1.2; }
.hcfb-fr__campaign-desc { margin: 0 0 0.6rem; color: #3d3e5c; }
.hcfb-fr__campaign-facts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 0.9rem; padding: 0; list-style: none; color: #3d3e5c; }

/* Choices */
.hcfb-fr__choices { min-width: 0; margin: 0; padding: 0; border: 0; }
.hcfb-fr__legend { float: left; width: 100%; margin: 0; padding: 0; }
.hcfb-fr__legend + * { clear: both; }
.hcfb-fr__choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0.75rem; }
.hcfb-fr__choice { display: flex; align-items: center; gap: 0.85rem; min-height: 3.75rem; margin: 0; padding: 0.85rem 1.1rem; border: 2px solid #c9c2b0; border-radius: 0.9rem; background: #fff; font-size: 1.15rem; font-weight: 700; line-height: 1.25; cursor: pointer; }
.hcfb-fr__choice:hover { border-color: var(--hcfb-ce-navy, #262760); }
.hcfb-fr__choice:has(input:checked) { border-color: var(--hcfb-ce-navy, #262760); background: #f4f2fb; box-shadow: inset 0 0 0 1px var(--hcfb-ce-navy, #262760); }
.hcfb-fr__choice input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--hcfb-ce-navy, #262760); }

/* Fields */
.hcfb-fr__form { margin: 0; }
.hcfb-fr__field { margin: 0 0 1.5rem; }
.hcfb-fr__field label { display: block; margin: 0 0 0.3rem; font-size: 1.15rem; font-weight: 700; }
.hcfb-fr__req { color: #5a5a66; font-size: 0.95rem; font-weight: 600; }
.hcfb-fr__help { margin: 0 0 0.45rem; color: #4a4b66; font-size: 1rem; }
.hcfb-fr__field input[type="text"],
.hcfb-fr__field input[type="email"],
.hcfb-fr__field textarea { display: block; width: 100%; min-height: 3.25rem; padding: 0.7rem 0.9rem; border: 2px solid #8c8aa3; border-radius: 0.6rem; background: #fff; color: var(--hcfb-ce-navy, #262760); font: inherit; font-size: 1.125rem; }
.hcfb-fr__field textarea { min-height: 8.5rem; resize: vertical; }
.hcfb-fr__field input[type="file"] { display: block; width: 100%; max-width: 100%; min-height: 3.25rem; padding: 0.65rem; border: 2px dashed #8c8aa3; border-radius: 0.6rem; background: #faf8f3; font: inherit; font-size: 1rem; }
.hcfb-fr__field--error input,
.hcfb-fr__field--error textarea { border-color: #b3261e; }
.hcfb-fr__error { margin: 0 0 0.45rem; color: #b3261e; font-weight: 700; }
.hcfb-fr__error::before { content: "! "; content: "! " / ""; }
.hcfb-fr__count { margin: 0.3rem 0 0; color: #5a5a66; font-size: 0.95rem; }
.hcfb-fr__thumb { margin-top: 0.6rem; }
.hcfb-fr__thumb img { display: block; max-width: 10rem; max-height: 10rem; border-radius: 0.5rem; border: 1px solid #d8d3c6; }
.hcfb-fr__summary { margin: 0 0 1.5rem; padding: 1rem 1.2rem; border: 3px solid #b3261e; border-radius: 0.8rem; background: #fdf3f2; }
.hcfb-fr__summary p, .hcfb-fr__summary ul { margin: 0; }
.hcfb-fr__summary ul { padding-left: 1.2rem; margin-top: 0.35rem; }
.hcfb-fr__summary a { color: #8c1d18; font-weight: 700; }
.hcfb-fr__notice { margin: 0 0 1.25rem; padding: 0.9rem 1.1rem; border-left: 5px solid var(--hcfb-ce-orange, #f78d22); border-radius: 0 0.6rem 0.6rem 0; background: #fff8ef; }
.hcfb-fr__notice p { margin: 0; }
.hcfb-fr__notice--ok { border-left-color: var(--hcfb-ce-green, #a2c13d); background: #f5f9ea; }

/* Fundraiser link: a fixed justgiving.com/fundraising/ prefix joined to the slug input */
.hcfb-fr__slug { display: flex; align-items: stretch; max-width: 40rem; border: 2px solid #8c8aa3; border-radius: 0.6rem; background: #fff; overflow: hidden; }
.hcfb-fr__slug:focus-within { outline: 3px solid var(--hcfb-ce-orange, #f78d22); outline-offset: 3px; }
.hcfb-fr__slug-prefix { display: flex; align-items: center; padding: 0 0.2rem 0 0.9rem; background: #f4f2fb; color: #3d3e5c; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.hcfb-fr__field .hcfb-fr__slug input[type="text"] { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 0; }
.hcfb-fr__field .hcfb-fr__slug input[type="text"]:focus-visible { outline: none; }
.hcfb-fr__field--error .hcfb-fr__slug { border-color: #b3261e; }

/* Goal with a $ prefix */
.hcfb-fr__money { display: flex; align-items: center; gap: 0.5rem; max-width: 16rem; }
.hcfb-fr__money span { font-size: 1.25rem; font-weight: 800; }

/* Review */
.hcfb-fr__review { margin: 0 0 1.75rem; border-top: 1px solid #e4dfd2; }
.hcfb-fr__review > div { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 0.25rem 1.25rem; padding: 0.85rem 0; border-bottom: 1px solid #e4dfd2; }
.hcfb-fr__review dt { color: #4a4b66; font-size: 1rem; font-weight: 700; }
.hcfb-fr__review dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Contact details (unclaimed Create) */
.hcfb-fr__contact { min-width: 0; margin: 0 0 1.5rem; padding: clamp(1rem, 3vw, 1.4rem); border: 1px solid #d8d3c6; border-radius: 1rem; background: #faf8f3; }
.hcfb-fr__contact legend { padding: 0 0.4rem; font-size: 1.2rem; font-weight: 800; }
.hcfb-fr__contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.hcfb-fr__contact .hcfb-fr__field { margin-bottom: 1rem; }
.hcfb-fr__contact .hcfb-fr__field:last-child { margin-bottom: 0; }
.hcfb-fr__field--wide { grid-column: 1 / -1; }

/* What happens next / unavailable */
.hcfb-fr__next { margin: 0 0 0.25rem; padding: 1rem 1.15rem; border-radius: 0.8rem; background: #f4f2fb; }
.hcfb-fr__next h3 { font-size: 1.1rem; }
.hcfb-fr__next p { margin: 0; }
.hcfb-fr__unavailable { margin: 0 0 0.25rem; padding: 1rem 1.15rem; border-left: 5px solid var(--hcfb-ce-orange, #f78d22); border-radius: 0 0.8rem 0.8rem 0; background: #fff8ef; }
.hcfb-fr__unavailable p { margin: 0; }

/* Success */
.hcfb-fr__success { position: relative; }
.hcfb-fr__badge { display: inline-flex; align-items: center; justify-content: center; width: 3.25rem; height: 3.25rem; margin: 0 0 0.85rem; border-radius: 999px; background: var(--hcfb-ce-green, #a2c13d); color: var(--hcfb-ce-navy, #262760); }
.hcfb-fr__success .hcfb-fr__title { font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem); overflow-wrap: anywhere; }
.hcfb-fr__claim,
.hcfb-fr__share { margin: 1.75rem 0 0; padding: 1.75rem 0 0; border-top: 1px solid #e4dfd2; }
.hcfb-fr__claim p, .hcfb-fr__share > p { margin: 0 0 0.75rem; color: #3d3e5c; }
.hcfb-fr__share > p.hcfb-fr__actions { margin: 1rem 0 0; }
.hcfb-fr__share > p.hcfb-fr__count { margin: 0.5rem 0 0; }
.hcfb-fr__claim .hcfb-fr__actions { margin-top: 0.5rem; }
.hcfb-fr__share .hcfb-fr__field { margin: 0; }
.hcfb-fr__share-row { display: flex; gap: 0.75rem; }
.hcfb-fr__share-row input[readonly] { flex: 1 1 auto; min-width: 0; background: #faf8f3; }
.hcfb-fr__share-row .hcfb-fr__btn { flex: none; }

/* Staff-only area: collapsed, quiet, clearly secondary */
.hcfb-fr__staff { margin: 2rem 0 0; border: 1px dashed #c8b469; border-radius: 0.8rem; background: #fffbea; color: #4a3b00; font-size: 0.95rem; line-height: 1.45; }
.hcfb-fr__staff summary { display: list-item; list-style: disclosure-closed inside; min-height: 2.75rem; padding: 0.7rem 1rem; border-radius: 0.8rem; font-weight: 700; cursor: pointer; }
.hcfb-fr__staff[open] summary { list-style-type: disclosure-open; }
.hcfb-fr__staff summary::marker { color: #7a6413; }
.hcfb-fr__staff-body { padding: 0 1rem 1rem; }
.hcfb-fr__staff-body p { margin: 0.5rem 0 0; }
.hcfb-fr__missing { margin: 0.35rem 0 0; padding-left: 1.2rem; overflow-wrap: anywhere; }
.hcfb-fr__staff-facts { margin: 0.5rem 0 0; }
.hcfb-fr__staff-facts > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 0 0.75rem; padding: 0.3rem 0; border-bottom: 1px solid #efe3b5; }
.hcfb-fr__staff-facts dt { font-weight: 700; }
.hcfb-fr__staff-facts dd { margin: 0; overflow-wrap: anywhere; }

/* Buttons (44px+ targets) */
.hcfb-fr__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1.5rem 0 0; }
.hcfb-fr__btn { display: inline-flex; min-height: 3.25rem; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border: 2px solid var(--hcfb-ce-navy, #262760); border-radius: 999px; background: transparent; color: var(--hcfb-ce-navy, #262760); font: inherit; font-size: 1.1rem; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.hcfb-fr__btn--primary { border-color: var(--hcfb-ce-orange, #f78d22); background: var(--hcfb-ce-orange, #f78d22); }
.hcfb-fr__btn--primary:hover { background: #fff; }
.hcfb-fr__btn--secondary { background: #fff; }
.hcfb-fr__btn--secondary:hover { background: var(--hcfb-ce-navy, #262760); color: #fff; }
.hcfb-fr__btn--link { min-height: 3rem; border-color: transparent; text-decoration: underline; text-underline-offset: 0.15em; padding-inline: 0.75rem; }
.hcfb-fr__btn--link:hover { background: #f4f2fb; }
.hcfb-fr__btn[disabled],
.hcfb-fr__btn[disabled]:hover { border-color: #b9b5a8; background: #ece8dd; color: #4a4b66; cursor: not-allowed; }
.hcfb-fr a:focus-visible, .hcfb-fr button:focus-visible, .hcfb-fr input:focus-visible, .hcfb-fr textarea:focus-visible, .hcfb-fr summary:focus-visible, .hcfb-fr [tabindex="-1"]:focus { outline: 3px solid var(--hcfb-ce-orange, #f78d22); outline-offset: 3px; }
.hcfb-fr__btn--primary:focus-visible { outline-color: var(--hcfb-ce-navy, #262760); }
/* Headings receive focus only programmatically (to start reading there); they are not controls, so no focus ring. */
.hcfb-fr .hcfb-fr__title[tabindex="-1"]:focus { outline: none; }
.hcfb-fr__choice:has(input:focus-visible) { outline: 3px solid var(--hcfb-ce-orange, #f78d22); outline-offset: 3px; }

@media (max-width: 700px) {
	.hcfb-fr__campaign { grid-template-columns: minmax(0, 1fr); }
	.hcfb-fr__campaign-media { min-height: 9rem; }
	.hcfb-fr__review > div, .hcfb-fr__staff-facts > div { grid-template-columns: minmax(0, 1fr); }
	.hcfb-fr__contact-grid { grid-template-columns: minmax(0, 1fr); }
	.hcfb-fr__actions { flex-direction: column; align-items: stretch; }
	.hcfb-fr__btn { width: 100%; }
	.hcfb-fr__share-row { flex-direction: column; }
	.hcfb-fr__slug { flex-direction: column; }
	.hcfb-fr__slug-prefix { padding: 0.45rem 0.9rem 0; background: #fff; font-size: 0.95rem; white-space: normal; overflow-wrap: anywhere; }
}
/* Narrow screens: numbered dots for the other steps, the current step's name in full. Names stay available to screen readers. */
@media (max-width: 560px) {
	.hcfb-fr { width: min(100% - 2rem, 54rem); font-size: 1.0625rem; }
	.hcfb-fr__steps ol { display: flex; gap: 0.4rem; }
	.hcfb-fr__steps li { flex: none; padding: 0.35rem; border-radius: 999px; }
	.hcfb-fr__steps li.is-current { flex: 1 1 auto; padding-right: 0.8rem; }
	.hcfb-fr__steps li:not(.is-current) .hcfb-fr__step-name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
	.hcfb-fr__panel { border-radius: 1rem; }
	.hcfb-fr__choice { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { .hcfb-fr * { transition: none !important; } }
