/*
 * Sixtyone Potluck form styles.
 * Mirrors the 61golf.com/contact form (.sixtyone-contact rules in GenerateBlocks global styles),
 * using the theme's color variables with fallbacks.
 * Scoped to Fluent Forms that contain the potluck header, so other forms are untouched.
 */

.fluentform:has(.ff-potluck-header) {
	--pl-ink: var(--contrast, #020303);
	--pl-body: var(--body, #1d211f);
	--pl-green: var(--contrast-2, #1a472b);
	--pl-field: var(--base-3, #ffffff);
	--pl-tint: var(--base, #f0f0f0);
	--pl-muted: rgba(2, 3, 3, 0.68);
	--pl-line: rgba(2, 3, 3, 0.2);
	--pl-teal: var(--accent-dark, #4f7a7a);
	max-width: 40rem;
	margin-inline: auto;
	color: var(--pl-body);
	font-family: Inter, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Header ---------- */

.fluentform .ff-potluck-header { margin-bottom: 1rem; }
.fluentform .ff-potluck-header p { margin: 0 0 1rem; font-size: 1.05rem; line-height: 1.6; }

.fluentform .ff-potluck-hero {
	display: block;
	width: min(16rem, 64%);
	height: auto;
	margin: 0 auto;
}

/* Bold intro line under the graphic. */
.fluentform .ff-potluck-header .ff-potluck-lead {
	margin: 2.5rem 0 1.25rem;
	color: var(--pl-ink);
	font-size: 1.2rem;
	line-height: 1.45;
}

.fluentform .ff-potluck-title {
	margin: 0 0 1.25rem;
	color: var(--pl-ink);
	font-size: 1.75rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.12;
}

.fluentform .ff-potluck-details {
	display: grid;
	gap: 0.85rem;
	margin: 0 0 1.25rem;
	padding: 1.25rem 0;
	border-top: 1px solid rgba(2, 3, 3, 0.1);
	border-bottom: 1px solid rgba(2, 3, 3, 0.1);
}
.fluentform .ff-potluck-details > div {
	display: grid;
	grid-template-columns: 5rem minmax(0, 1fr);
	gap: 1rem;
	align-items: baseline;
}
.fluentform .ff-potluck-details dt {
	color: var(--pl-ink);
	font-size: var(--fs-eyebrow, 0.75rem);
	font-weight: 700;
	letter-spacing: var(--tracking-eyebrow, 0.08em);
	text-transform: uppercase;
}
.fluentform .ff-potluck-details dd { margin: 0; font-size: 1.05rem; line-height: 1.55; }
.fluentform .ff-potluck-header a {
	color: var(--pl-green);
	font-weight: 700;
	text-decoration: underline 1px;
	text-underline-offset: 3px;
	transition: color 0.2s;
}
.fluentform .ff-potluck-header a:is(:hover, :focus) { color: var(--pl-teal); }

.fluentform .ff-potluck-serving {
	padding: 0.75rem 1rem;
	border-left: 3px solid var(--pl-green);
	background: var(--pl-tint);
	color: var(--pl-ink);
}
.fluentform .ff-potluck-serving[hidden] { display: none !important; }

.fluentform .ff-potluck-steps { margin: 0 0 1rem 1.25rem; padding: 0; font-size: 1.05rem; line-height: 1.6; }
.fluentform .ff-potluck-steps-title { margin-bottom: 0.25rem !important; }

/* ---------- Section breaks ---------- */

.fluentform:has(.ff-potluck-header) .ff-el-section-break { margin: 2.5rem 0 1.5rem; }
.fluentform:has(.ff-potluck-header) .ff-el-section-title {
	margin: 0 0 0.5rem;
	color: var(--pl-ink);
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}
.fluentform:has(.ff-potluck-header) .ff-el-section-break hr {
	margin: 0 0 0.75rem;
	border: 0;
	border-top: 1px solid rgba(2, 3, 3, 0.1);
}
.fluentform:has(.ff-potluck-header) .ff-section_break_desk { color: var(--pl-body); font-size: 1rem; line-height: 1.6; }

/* ---------- Fields (matches /contact) ---------- */

.fluentform:has(.ff-potluck-header) .ff-el-group { margin-bottom: 1.5rem; }
.fluentform:has(.ff-potluck-header) .ff-el-input--label label {
	color: var(--pl-ink);
	font-size: 0.95rem;
	font-weight: 700;
}
.fluentform:has(.ff-potluck-header) :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea, select) {
	background-color: var(--pl-field);
	border: 1px solid var(--pl-line);
	border-radius: 0;
	color: var(--pl-body);
	font-size: 1rem;
	padding: 0.75rem 1.25rem;
	box-shadow: none;
}
.fluentform:has(.ff-potluck-header) :is(input, textarea, select):focus {
	border-color: var(--pl-green);
	box-shadow: 0 0 0 1px var(--pl-green);
	outline: 0;
}
.fluentform:has(.ff-potluck-header) .ff-el-help-message {
	color: var(--pl-muted);
	font-size: 0.85rem;
	font-style: normal;
	margin-top: 0.4rem;
}

/* Checkbox lists: two columns like /contact, one on phones. */
.fluentform:has(.ff-potluck-header) .ff-el-input--content:has(.ff-el-form-check) {
	display: grid;
	gap: 0.6rem 1.5rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fluentform:has(.ff-potluck-header) .ff-el-input--content:has(.ff-el-tc) { display: block; }
.fluentform:has(.ff-potluck-header) .ff-el-form-check { margin: 0; }
.fluentform:has(.ff-potluck-header) .ff-el-form-check label {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem 0.5rem;
	color: var(--pl-body);
	font-size: 1.0625rem;
}
.fluentform:has(.ff-potluck-header) .ff-el-tc label { flex-wrap: nowrap; align-items: flex-start; gap: 0.6rem; }
.fluentform:has(.ff-potluck-header) .ff-el-tc .ff_tc_checkbox { line-height: 1; padding-top: 0.15rem; }
.fluentform:has(.ff-potluck-header) input[type="checkbox"] {
	accent-color: var(--pl-green);
	height: 1.05rem;
	width: 1.05rem;
	margin: 0;
}

/* Remaining count */
.fluentform .ff-potluck-left {
	color: var(--pl-muted);
	font-size: 0.8rem;
	font-style: normal;
	white-space: nowrap;
}
.fluentform .ff-potluck-left::before { content: "\00b7\00a0"; }

/* Choice eliminator: item at 0 */
.fluentform .ff-potluck-full label {
	color: rgba(2, 3, 3, 0.4) !important;
	cursor: not-allowed;
}
.fluentform .ff-potluck-full label > span { text-decoration: line-through; text-decoration-thickness: 1px; }
.fluentform .ff-potluck-full input[type="checkbox"] { opacity: 0.45; cursor: not-allowed; }
.fluentform .ff-potluck-note {
	flex-basis: 100%;
	padding-left: 1.55rem;
	color: var(--pl-teal);
	font-size: 0.8rem;
	font-style: normal;
	font-weight: 600;
}

/* ---------- Photos and the "Everything else" card ---------- */

.fluentform .ff-potluck-photo { margin: 0 0 0.85rem; }
.fluentform .ff-potluck-ideas {
	margin: 0;
	color: var(--pl-body, #1d211f);
	font-size: 1rem;
	line-height: 1.55;
}
.fluentform .ff-potluck-card + .ff-potluck-ideas { margin-top: 0.85rem; }
.fluentform .ff-potluck-ideas strong { color: var(--pl-ink, #020303); }
.fluentform:has(.ff-potluck-header) .ff-custom_html:has(.ff-potluck-photo, .ff-potluck-card) { margin-top: 2rem; margin-bottom: 0.75rem; }
.fluentform .ff-potluck-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.fluentform .ff-potluck-card {
	--frame: clamp(1rem, 4.5vw, 2.25rem);
	display: grid;
	place-content: center;
	gap: 1.1em;
	aspect-ratio: 16 / 9;
	background: var(--pl-field);
	border: 1px solid rgba(2, 3, 3, 0.1);
	box-shadow: inset 0 0 0 var(--frame) var(--pl-field), inset 0 0 0 calc(var(--frame) + 3px) var(--pl-ink);
	color: var(--pl-ink);
	font-size: clamp(1.1rem, 4vw, 1.6rem);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.55em;
	text-align: center;
	text-transform: uppercase;
}
.fluentform .ff-potluck-card span { padding-left: 0.55em; }

/* ---------- Privacy line, button, success ---------- */

.fluentform:has(.ff-potluck-header) :is(.ff_t_c, .ff-el-tc label) { color: var(--pl-muted); font-size: 0.85rem; }
.fluentform:has(.ff-potluck-header) .ff_t_c a {
	color: var(--pl-green) !important;
	font-weight: 700;
	text-decoration: underline 1px;
	text-underline-offset: 3px;
}
.fluentform:has(.ff-potluck-header) .ff_t_c a:is(:hover, :focus) { color: var(--pl-teal) !important; }

.fluentform:has(.ff-potluck-header) .ff-btn-submit {
	background-color: var(--pl-green) !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: var(--pl-field) !important;
	font-size: 1rem;
	font-weight: 500;
	padding: 0.75rem 2.25rem !important;
}
.fluentform:has(.ff-potluck-header) .ff-btn-submit:is(:hover, :focus) { background-color: var(--pl-ink) !important; }

.fluentform:has(.ff-potluck-header) .ff-message-success {
	border: 0;
	box-shadow: none;
	color: var(--contrast-2, #1a472b);
	font-size: 1.25rem;
	padding: 0;
}

@media (max-width: 767px) {
	.fluentform:has(.ff-potluck-header) .ff-el-input--content:has(.ff-el-form-check) { grid-template-columns: minmax(0, 1fr); }
	.fluentform .ff-potluck-details > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}

/* ---------- Layout updates (v1.0.2) ---------- */

/* Category name above each photo, larger than the checkbox text. */
.fluentform .ff-potluck-cat {
	margin: 0 0 0.85rem;
	color: var(--pl-ink, #020303);
	font-size: 1.375rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

/* The category name is the heading now, so the checkbox has no label above it. */
.fluentform:has(.ff-potluck-header) .ff-potluck-group > .ff-el-input--label { display: none; }

/* One-choice groups use the full width, so "6 left" stays on the same line. */
.fluentform:has(.ff-potluck-header) .ff-potluck-group .ff-el-input--content:has(.ff-el-form-check) { grid-template-columns: minmax(0, 1fr); }

/* Privacy line sits under the RSVP button, with no one-word last line. */
.fluentform:has(.ff-potluck-header) form > fieldset { display: flex; flex-direction: column; }
.fluentform:has(.ff-potluck-header) form > fieldset > .ff-el-group:has(.ff-el-tc) { order: 1; margin: 1rem 0 0; }
.fluentform:has(.ff-potluck-header) .ff-el-tc label { max-width: 34rem; padding-right: 2rem; }
.fluentform:has(.ff-potluck-header) .ff_t_c { text-wrap: pretty; }
