/* ═══════════════════════════════════════════════════════════════
   VAP — Volunteer / Intern Application Card Form
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset / Container ─────────────────────────────────────────── */
.vap-wrapper {
	margin: 0;
	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1a1a2e;
}

/* ── Progress Bar ──────────────────────────────────────────────── */
.vap-progress-bar {
	height: 4px;
	background: #e6f0d4;
	border-radius: 2px;
	margin-bottom: 1.5rem;
	overflow: hidden;
}

.vap-progress-fill {
	height: 100%;
	width: 16.66%;           /* 1 of 6 steps */
	background: #9CC449;
	border-radius: 2px;
	transition: width 0.4s ease;
}

/* ── Step Indicators ───────────────────────────────────────────── */
.vap-steps {
	display: flex;
	gap: 0;
	margin-bottom: 1.75rem;
	border-bottom: 1px solid #d4e4a8;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.vap-steps::-webkit-scrollbar { display: none; }

.vap-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	min-width: 72px;
	padding: 0 4px 0.75rem;
	cursor: default;
	opacity: 0.45;
	transition: opacity 0.25s;
	position: relative;
}

.vap-step.is-active {
	opacity: 1;
}

.vap-step.is-active::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 3px;
	background: #9CC449;
	border-radius: 2px 2px 0 0;
}

.vap-step.is-done {
	opacity: 0.7;
}

.vap-step-num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #e6f0d4;
	font-size: 0.8rem;
	font-weight: 700;
	color: #4a5568;
	margin-bottom: 4px;
	transition: background 0.25s, color 0.25s;
	flex-shrink: 0;
}

.vap-step.is-active .vap-step-num {
	background: #9CC449;
	color: #fff;
}

.vap-step.is-done .vap-step-num {
	background: #22c55e;
	color: #fff;
}

.vap-step-label {
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #64748b;
	text-align: center;
	line-height: 1.2;
	/* Reserve two-line height so the bar never shifts height between steps */
	min-height: 2.4em;
	/* Hide text on inactive steps to prevent overlap — space is still reserved */
	visibility: hidden;
	white-space: normal;
	word-break: normal;
}

.vap-step.is-active .vap-step-label {
	visibility: visible;
	color: #7BA038;
}

/* ── Card ──────────────────────────────────────────────────────── */
.vap-card {
	background: #fff;
	border: 1px solid #d4e4a8;
	border-radius: 12px;
	box-shadow: 0 2px 16px rgba(0,0,0,.07);
	animation: vap-slide-in 0.3s ease;
}

@keyframes vap-slide-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.vap-card-inner {
	padding: 2rem 2.25rem 1.75rem;
}

@media (max-width: 560px) {
	.vap-card-inner {
		padding: 1.25rem 1rem 1rem;
	}
}

/* ── Card Typography ───────────────────────────────────────────── */
.vap-card-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.4rem;
	color: #0f172a;
}

.vap-card-desc {
	color: #64748b;
	margin: 0 0 1.75rem;
	font-size: 0.97rem;
}

.vap-info-card h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 1.5rem 0 0.35rem;
	color: #0f172a;
}

.vap-info-card p {
	margin: 0 0 1rem;
	line-height: 1.7;
	color: #334155;
}

.vap-info-card a {
	color: #7BA038;
	text-decoration: underline;
}

/* ── Form Rows / Fields ────────────────────────────────────────── */
.vap-row {
	display: flex;
	gap: 1rem;
}

.vap-field {
	display: flex;
	flex-direction: column;
	margin-bottom: 1.15rem;
	flex: 1;
	min-width: 0;
}

.vap-half    { flex: 1 1 calc(50% - 0.5rem); min-width: 0; }
.vap-quarter { flex: 0 1 calc(25% - 0.75rem); min-width: 0; }

@media (max-width: 480px) {
	.vap-row { flex-wrap: wrap; }
	.vap-half, .vap-quarter { flex: 1 1 100%; }
}

.vap-field label {
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: #374151;
}

.vap-required {
	color: #e53e3e;
}

.vap-field input[type="text"],
.vap-field input[type="email"],
.vap-field input[type="tel"],
.vap-field select {
	width: 100%;
	padding: 0.625rem 0.875rem;
	border: 1.5px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.975rem;
	color: #1a1a2e;
	background: #f8fafc;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
}

.vap-field select {
	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 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
	background-size: 12px 8px;
	padding-right: 2.5rem;
	line-height: 1.5;
	height: auto;
}

.vap-field input:focus,
.vap-field select:focus {
	outline: none;
	border-color: #9CC449;
	box-shadow: 0 0 0 3px rgba(156,196,73,.2);
	background: #fff;
}

.vap-field input.vap-error,
.vap-field select.vap-error {
	border-color: #e53e3e;
	box-shadow: 0 0 0 3px rgba(229,62,62,.12);
}

/* ── Checkbox ──────────────────────────────────────────────────── */
.vap-checkbox-field {
	margin-top: 0.5rem;
	margin-bottom: 1.25rem;
}

.vap-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #1a1a2e;
}

.vap-checkbox-label input[type="checkbox"] {
	margin-top: 3px;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	accent-color: #9CC449;
	cursor: pointer;
}

/* ── Review List ───────────────────────────────────────────────── */
.vap-review-list {
	background: #f5fae8;
	border: 1px solid #C5E08A;
	border-radius: 8px;
	padding: 1.25rem 1.5rem 1.25rem 2rem;
	margin-bottom: 1.5rem;
}

.vap-review-list ol {
	margin: 0;
	padding: 0 0 0 1.25rem;
}

.vap-review-list li {
	margin-bottom: 0.7rem;
	line-height: 1.6;
	color: #2a4a10;
	font-size: 0.93rem;
}

.vap-review-list li:last-child {
	margin-bottom: 0;
}

/* ── Actions ───────────────────────────────────────────────────── */
.vap-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid #e2e8f0;
	gap: 0.75rem;
}

.vap-actions:has(.vap-btn-next:only-of-type),
.vap-actions:has(.vap-btn-submit:only-of-type) {
	justify-content: flex-end;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.vap-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.65rem 1.4rem;
	border: none;
	border-radius: 8px;
	font-size: 0.975rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
	text-decoration: none;
	white-space: nowrap;
}

.vap-btn:active {
	transform: translateY(1px);
}

.vap-btn-next,
.vap-btn-submit {
	background: #9CC449;
	color: #fff;
	box-shadow: 0 2px 8px rgba(156,196,73,.35);
}

.vap-btn-next:hover,
.vap-btn-submit:hover {
	background: #7BA038;
	box-shadow: 0 4px 12px rgba(156,196,73,.45);
}

.vap-btn-back {
	background: #f1f5f9;
	color: #475569;
}

.vap-btn-back:hover {
	background: #e2e8f0;
}

.vap-btn-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* ── Messages ──────────────────────────────────────────────────── */
.vap-errors {
	background: #fff5f5;
	border: 1px solid #feb2b2;
	border-radius: 8px;
	padding: 0.9rem 1rem;
	margin-bottom: 1rem;
	color: #c53030;
	font-size: 0.9rem;
}

.vap-errors ul {
	margin: 0;
	padding-left: 1.25rem;
}

.vap-errors li {
	margin-bottom: 0.25rem;
}

.vap-success {
	background: #ffffff;
	border: 1px solid #d4e4a8;
	border-radius: 12px;
	box-shadow: 0 2px 16px rgba(0,0,0,.07);
	padding: 2.5rem 2.25rem;
	color: #1a1a2e;
}

.vap-thankyou {
	max-width: 620px;
	margin: 0 auto;
	text-align: center;
}

.vap-thankyou-check {
	display: flex;
	justify-content: center;
	margin-bottom: 1rem;
}

.vap-thankyou-title {
	font-size: 2rem;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 0.35rem;
}

.vap-thankyou-lede {
	font-size: 1.05rem;
	color: #5A7A1A;
	font-weight: 600;
	margin: 0 0 1.5rem;
}

.vap-thankyou p {
	margin: 0 0 1rem;
	line-height: 1.6;
	color: #334155;
	font-size: 0.98rem;
	text-align: left;
}

.vap-thankyou p strong {
	color: #1a1a2e;
}

.vap-thankyou a {
	color: #7BA038;
	text-decoration: none;
	font-weight: 600;
}

.vap-thankyou a:hover {
	text-decoration: underline;
}

.vap-thankyou-foot {
	margin-top: 1.5rem !important;
	padding-top: 1rem;
	border-top: 1px solid #e8e8e8;
	font-size: 0.85rem !important;
	color: #94a3b8 !important;
	font-style: italic;
	text-align: center !important;
}

/* ── reCAPTCHA spacing ─────────────────────────────────────────── */
.vap-field .g-recaptcha {
	margin-top: 0.25rem;
}

/* ── Fieldset (eligibility) ────────────────────────────────────── */
.vap-fieldset {
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	padding: 1.1rem 1.25rem 1.25rem;
	margin: 0 0 0.25rem;
	transition: border-color 0.2s;
}

.vap-fieldset.vap-fieldset-error {
	border-color: #e53e3e;
	box-shadow: 0 0 0 3px rgba(229,62,62,.1);
}

.vap-legend {
	font-size: 0.9rem;
	font-weight: 600;
	color: #374151;
	padding: 0 0.4rem;
	line-height: 1.5;
}

/* ── Radio group ───────────────────────────────────────────────── */
.vap-radio-group {
	display: flex;
	gap: 1.25rem;
	margin-top: 0.85rem;
	flex-wrap: wrap;
}

.vap-radio-label {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	cursor: pointer;
	font-size: 0.975rem;
	font-weight: 500;
	color: #1a1a2e;
	padding: 0.5rem 1.1rem;
	border: 1.5px solid #cbd5e1;
	border-radius: 8px;
	transition: border-color 0.2s, background 0.2s;
	user-select: none;
}

.vap-radio-label:has(input:checked) {
	border-color: #9CC449;
	background: #f5fae8;
	color: #7BA038;
}

.vap-radio-label input[type="radio"] {
	width: 16px;
	height: 16px;
	accent-color: #9CC449;
	cursor: pointer;
	flex-shrink: 0;
}

.vap-radio-label .vap-radio-custom { display: none; }

/* ── Checkbox group (programs) ─────────────────────────────────── */
.vap-checkbox-group {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem;
	margin-top: 0.85rem;
}

@media (max-width: 560px) {
	.vap-checkbox-group {
		grid-template-columns: 1fr;
	}
}

.vap-program-label {
	padding: 0.55rem 0.85rem;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	transition: border-color 0.2s, background 0.2s;
	font-weight: 400;
	font-size: 0.93rem;
}

.vap-program-label:has(input:checked) {
	border-color: #9CC449;
	background: #f5fae8;
}

.vap-program-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #9CC449;
	cursor: pointer;
	flex-shrink: 0;
}

.vap-program-label .vap-checkbox-custom { display: none; }

/* ── Hint text ─────────────────────────────────────────────────── */
.vap-hint {
	font-size: 0.83rem;
	color: #64748b;
	margin: 0.85rem 0 0;
	line-height: 1.5;
}

.vap-hint a {
	color: #7BA038;
	text-decoration: underline;
}

/* ── Prefill notice ────────────────────────────────────────────── */
.vap-prefill-notice {
	font-size: 0.8rem;
	color: #7BA038;
	background: #f5fae8;
	border: 1px solid #C5E08A;
	border-radius: 7px;
	padding: 0.5rem 0.85rem;
	margin: -0.75rem 0 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   Volunteer-Application-specific additions
   ═══════════════════════════════════════════════════════════════ */

/* ── Acknowledgment list (Safety, Code of Conduct) ─────────────── */
.vap-ack-group {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	margin: 1.25rem 0;
	padding: 1.25rem;
	background: #f9fbf4;
	border: 1px solid #e3eccc;
	border-radius: 10px;
}

.vap-ack-item {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	padding: 0.5rem 0;
	line-height: 1.55;
	cursor: pointer;
}

.vap-ack-text {
	font-size: 0.95rem;
	color: #1a1a2e;
}

.vap-ack-item:hover .vap-ack-text {
	color: #5A7A1A;
}

/* ── Optional marker ───────────────────────────────────────────── */
.vap-optional {
	font-size: 0.78rem;
	font-weight: 500;
	color: #94a3b8;
	margin-left: 0.4rem;
}

/* ── Waiver text container ─────────────────────────────────────── */
.vap-waiver-text {
	max-height: 360px;
	overflow-y: auto;
	padding: 1.25rem 1.5rem;
	background: #fafbfc;
	border: 1px solid #e3eccc;
	border-radius: 10px;
	margin: 1.25rem 0 2rem;
	font-size: 0.9rem;
	line-height: 1.6;
	color: #2a3142;
}

.vap-waiver-text p {
	margin: 0 0 0.85rem;
}

.vap-waiver-text p:last-child {
	margin-bottom: 0;
}

.vap-waiver-text strong {
	color: #1a1a2e;
}

/* ── Signature pad ─────────────────────────────────────────────── */
.vap-sig-section {
	margin: 1.75rem 0 1.25rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e3eccc;
}

.vap-sig-heading {
	font-size: 1rem;
	font-weight: 700;
	color: #5A7A1A;
	margin: 0 0 0.35rem;
}

.vap-sig-wrap {
	position: relative;
	margin: 0.75rem 0 0;
	border: 2px dashed #C5E08A;
	border-radius: 10px;
	background: #ffffff;
	overflow: hidden;
}

.vap-signature {
	display: block;
	width: 100%;
	height: 180px;
	touch-action: none;
	cursor: crosshair;
	background: #ffffff;
}

.vap-btn-clear {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(255,255,255,0.92);
	border: 1px solid #d4e4a8;
	color: #5A7A1A;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.vap-btn-clear:hover {
	background: #9CC449;
	color: #fff;
	border-color: #9CC449;
}

/* ── Review table ──────────────────────────────────────────────── */
.vap-review {
	margin: 1.25rem 0;
}

.vap-review-table {
	width: 100%;
	border-collapse: collapse;
	background: #f9fbf4;
	border: 1px solid #e3eccc;
	border-radius: 10px;
	overflow: hidden;
	font-size: 0.92rem;
}

.vap-review-table th,
.vap-review-table td {
	padding: 0.7rem 1rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #e3eccc;
}

.vap-review-table tr:last-child th,
.vap-review-table tr:last-child td {
	border-bottom: none;
}

.vap-review-table th {
	width: 35%;
	color: #5A7A1A;
	font-weight: 600;
	background: #f5f9eb;
}

.vap-review-table td {
	color: #1a1a2e;
}

.vap-review-note {
	margin: 1rem 0 0;
	font-size: 0.85rem;
	color: #64748b;
	font-style: italic;
}

/* ── Per-step error banner ─────────────────────────────────────── */
.vap-step-error {
	background: #fff1f1;
	border: 1px solid #fbbdbd;
	color: #b91c1c;
	border-radius: 8px;
	padding: 0.65rem 0.9rem;
	margin: 1rem 0;
	font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════
   Bootstrap-pattern form validation
   ═══════════════════════════════════════════════════════════════
   We don't load Bootstrap on this page, so we re-implement the
   ".was-validated input:invalid" + ".invalid-feedback" pattern so
   markup that uses class="form-control" + <div class="invalid-feedback">
   light up the same way it would inside a Bootstrap form. */

.vap-card .invalid-feedback {
	display: none;
	color: #dc3545;
	font-size: 0.78rem;
	margin-top: 0.35rem;
	line-height: 1.4;
}

/* Show feedback when the parent step has been validated and the input is invalid,
   OR the input has been explicitly marked .is-invalid (e.g. for custom checks). */
.vap-card.was-validated .form-control:invalid ~ .invalid-feedback,
.vap-card .form-control.is-invalid ~ .invalid-feedback {
	display: block;
}

/* Red border + glow on invalid inputs (Bootstrap-style) */
.vap-card.was-validated .form-control:invalid,
.vap-card .form-control.is-invalid {
	border-color: #dc3545;
	box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

/* Green border on valid inputs */
.vap-card.was-validated .form-control:valid,
.vap-card .form-control.is-valid {
	border-color: #9CC449;
}

/* Fieldsets w/ radio groups — when the step has been validated and no
   radio inside is checked, color the fieldset red. */
.vap-card.was-validated .vap-fieldset:has(input[required]:invalid),
.vap-card .vap-fieldset.is-invalid {
	border-color: #dc3545;
}

/* Per-fieldset invalid message */
.vap-fieldset .invalid-feedback {
	margin-top: 0.5rem;
}

/* Make sure our existing input styling chains with .form-control without conflict. */
.vap-field input.form-control,
.vap-field select.form-control,
.vap-field textarea.form-control {
	background: #f8fafc;
}
.vap-field input.form-control:focus,
.vap-field select.form-control:focus,
.vap-field textarea.form-control:focus {
	background: #fff;
}

