/* ABOUTME: Frontend styles for the RSVP section on single event pages. */
/* ABOUTME: Simple spacing, hierarchy, and Yak-primary Gravity Forms theming. */

.ncojd-rsvp {
	--ncojd-rsvp-primary: var(--yak-color-primary, #15659e);
	--ncojd-rsvp-primary-hover: #072235;
	--ncojd-rsvp-primary-rgb: 21, 101, 158;

	margin: 2rem 0 2.5rem;
	padding: 1.5rem 0 0;
	border-top: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 20%, transparent);
}

.ncojd-rsvp__heading {
	margin: 0 0 0.75rem;
	font-size: 1.5rem;
	line-height: 1.25;
}

.ncojd-rsvp .gform_description,
.ncojd-rsvp__capacity-note {
	margin: 0 0 1rem;
}

.ncojd-rsvp__capacity-note {
	font-weight: 600;
}

/* After submit, GF swaps in confirmation — hide pre-form helpers still outside the wrapper. */
.ncojd-rsvp:has(.gform_confirmation_wrapper) .ncojd-rsvp__capacity-note {
	display: none;
}

/* Closed / full / unavailable — readable callout (matches Yak event notice energy). */
.ncojd-rsvp--closed .ncojd-rsvp__message {
	margin: 0;
	padding: 1rem 1.25rem;
	max-width: 42rem;
	font-size: 1.0625rem;
	line-height: 1.55;
	font-weight: 500;
	color: #2d3436;
	background: linear-gradient(135deg, #f8f4ef 0%, #f0ebe3 100%);
	border: 1px solid rgba(45, 52, 54, 0.08);
	border-left: 4px solid #b86b2b;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(45, 52, 54, 0.08);
}

/* Gravity Forms — map theme tokens to Yak primary (scoped to RSVP block only). */
.ncojd-rsvp .gform_wrapper,
.ncojd-rsvp .gform_wrapper.gform-theme,
.ncojd-rsvp .gform-theme--framework,
.ncojd-rsvp .gform-theme--foundation {
	--gf-color-primary: var(--ncojd-rsvp-primary);
	--gf-color-primary-rgb: var(--ncojd-rsvp-primary-rgb);
	--gf-color-primary-contrast: #fff;
	--gf-color-primary-darker: var(--ncojd-rsvp-primary-hover);
	--gf-color-primary-lighter: var(--ncojd-rsvp-primary);
}

/* Submit — match event CTA; beat GF theme + Genesis button layers. */
.ncojd-rsvp .gform_wrapper.gform-theme .gform_footer input[type='submit'],
.ncojd-rsvp .gform_wrapper .gform_footer input[type='submit'].gform_button,
.ncojd-rsvp .gform_wrapper .gform_footer input[type='submit'].gform_button.button,
.ncojd-rsvp .gform_wrapper .gform_footer button[type='submit'].gform_button,
.ncojd-rsvp .gform_wrapper .gform_footer button.gform_button[data-submission-type='submit'],
.ncojd-rsvp .gform_wrapper .gform_footer input[id^='gform_submit_button_'] {
	appearance: none;
	-webkit-appearance: none;
	background-color: var(--ncojd-rsvp-primary) !important;
	background-image: none !important;
	border: 2px solid var(--ncojd-rsvp-primary) !important;
	border-radius: var(--yak-radius, 6px) !important;
	box-shadow: none !important;
	color: #fff !important;
	cursor: pointer;
	display: inline-block;
	font-family: proxima-nova-condensed, var(--yak-primary-font, sans-serif);
	font-size: 1rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em;
	line-height: 1.25;
	min-height: auto;
	padding: 0.75rem 1.5rem !important;
	text-shadow: none !important;
	text-transform: uppercase;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	width: auto;
}

.ncojd-rsvp .gform_wrapper.gform-theme .gform_footer input[type='submit']:hover,
.ncojd-rsvp .gform_wrapper.gform-theme .gform_footer input[type='submit']:focus,
.ncojd-rsvp .gform_wrapper .gform_footer input[type='submit'].gform_button:hover,
.ncojd-rsvp .gform_wrapper .gform_footer input[type='submit'].gform_button:focus,
.ncojd-rsvp .gform_wrapper .gform_footer button[type='submit'].gform_button:hover,
.ncojd-rsvp .gform_wrapper .gform_footer button[type='submit'].gform_button:focus,
.ncojd-rsvp .gform_wrapper .gform_footer input[id^='gform_submit_button_']:hover,
.ncojd-rsvp .gform_wrapper .gform_footer input[id^='gform_submit_button_']:focus {
	background-color: var(--ncojd-rsvp-primary-hover) !important;
	border-color: var(--ncojd-rsvp-primary-hover) !important;
	color: #fff !important;
	outline: 2px solid #9ec5e8;
	outline-offset: 2px;
}

.ncojd-rsvp .gfield_required,
.ncojd-rsvp .gfield_required_text {
	color: var(--ncojd-rsvp-primary);
}

.ncojd-rsvp .gfield input:focus,
.ncojd-rsvp .gfield select:focus,
.ncojd-rsvp .gfield textarea:focus {
	border-color: var(--ncojd-rsvp-primary);
	box-shadow: 0 0 0 1px var(--ncojd-rsvp-primary);
	outline: none;
}
