/* ==========================================================================
   Patient paperwork wizard.
   Restyles the jquery.steps markup to match the React site's PatientForm:
   a horizontal step rail, a card panel, and tile-style choices.
   Everything is scoped to .wizard so the rest of the site is untouched.
   Loaded after jquery.steps.css and _custom.css.
   ========================================================================== */

.wizard {
	--f-navy: #0c2340;
	--f-teal: #1a7a6d;
	--f-teal-light: #e8f4f1;
	--f-g50: #f8f9fa;
	--f-g100: #f1f3f5;
	--f-g200: #e9ecef;
	--f-g300: #dee2e6;
	--f-g500: #adb5bd;
	--f-g700: #495057;
	--f-g800: #343a40;

	overflow: visible;
}

/* Page intro above the wizard */
.form-intro {
	margin: -0.5rem 0 2.5rem;
	color: #868e96;
	font-size: 15px;
}

/* --------------------------------------------------------------------------
   Step rail
   -------------------------------------------------------------------------- */
.wizard > .steps {
	width: 100%;
	float: none;
	margin-bottom: 32px;
}

.wizard > .steps > ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wizard > .steps > ul > li {
	float: none;
	width: auto;
	margin: 0;
	flex: 0 0 auto;
}

.wizard > .steps a,
.wizard > .steps a:hover,
.wizard > .steps a:active {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 16px;
	border: 1.5px solid var(--f-g200);
	border-radius: 10px;
	background: #fff;
	color: var(--f-g500);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	transition: all .2s ease;
}

.wizard > .steps a:hover {
	border-color: var(--f-g300);
}

.wizard > .steps .number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	border-radius: 6px;
	background: var(--f-g100);
	color: var(--f-g500);
	font-size: 11px;
	font-weight: 700;
}

.wizard > .steps .current a,
.wizard > .steps .current a:hover,
.wizard > .steps .current a:active {
	border-color: var(--f-teal);
	background: var(--f-teal-light);
	color: var(--f-teal);
}

.wizard > .steps .done a,
.wizard > .steps .done a:hover,
.wizard > .steps .done a:active {
	border-color: var(--f-teal);
	background: #fff;
	color: var(--f-teal);
}

.wizard > .steps .current .number,
.wizard > .steps .done .number {
	background: var(--f-teal);
	color: #fff;
}

.wizard > .steps .disabled a,
.wizard > .steps .disabled a:hover,
.wizard > .steps .disabled a:active {
	background: #fff;
	color: var(--f-g500);
	cursor: default;
}

/* jquery.steps ships a visually-hidden "current step:" label */
.wizard > .steps .current-info {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Panel
   -------------------------------------------------------------------------- */
.wizard > .content {
	min-height: 0;
	margin: 0;
	padding: 36px;
	background: #fff;
	border: 1px solid var(--f-g200);
	border-radius: 20px;
	overflow: visible;
}

.wizard > .content > .body {
	float: none;
	width: 100%;
	height: auto;
	padding: 0;
	position: relative;
}

.wizard > .content > .body h3 {
	margin: 0 0 20px;
	color: var(--f-navy);
	font-size: 22px;
	font-weight: 600;
}

.wizard > .content > .body h4 {
	margin: 28px 0 16px;
	padding-top: 20px;
	border-top: 1px solid var(--f-g100);
	color: var(--f-navy);
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.wizard > .content > .body .row > div:first-child h4 {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

/* --------------------------------------------------------------------------
   Fields
   -------------------------------------------------------------------------- */
.wizard > .content > .body label {
	display: block;
	margin-bottom: 6px;
	color: var(--f-g700);
	font-size: 13px;
	font-weight: 600;
}

.wizard > .content > .body .form-control {
	width: 100%;
	height: auto;
	margin-bottom: 16px;
	padding: 11px 15px;
	border: 1.5px solid var(--f-g300);
	border-radius: 8px;
	background: #fff;
	color: var(--f-g800);
	font-size: 14px;
	transition: border-color .2s ease;
}

.wizard > .content > .body .form-control:focus {
	border-color: var(--f-teal);
}

.wizard > .content > .body .form-control::placeholder {
	color: var(--f-g500);
}

/* --------------------------------------------------------------------------
   Checkboxes and radios as tiles
   -------------------------------------------------------------------------- */
.wizard > .content > .body .form-check {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 8px;
	padding: 9px 13px;
	border: 1.5px solid var(--f-g200);
	border-radius: 8px;
	cursor: pointer;
	transition: all .15s ease;
}

.wizard > .content > .body .form-check:hover {
	border-color: var(--f-g300);
}

/* :has() gives the checked state without touching the markup or adding JS. */
.wizard > .content > .body .form-check:has(input:checked) {
	border-color: var(--f-teal);
	background: var(--f-teal-light);
}

.wizard > .content > .body .form-check:has(input:checked) .form-check-label {
	color: var(--f-teal);
}

.wizard > .content > .body .form-check-input {
	position: static;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--f-teal);
	cursor: pointer;
}

.wizard > .content > .body .form-check-label {
	margin: 0;
	color: var(--f-g700);
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
}

/* Inline groups (Single / Married, Employed / Retired / Other) stay on one line. */
.wizard > .content > .body .form-check-inline {
	display: inline-flex;
	width: auto;
	margin-right: 8px;
}

/* --------------------------------------------------------------------------
   Policy text
   -------------------------------------------------------------------------- */
.wizard .legal-text {
	max-height: 420px;
	margin-bottom: 8px;
	padding: 20px 24px;
	overflow-y: auto;
	border: 1px solid var(--f-g200);
	border-radius: 8px;
	background: var(--f-g50);
	color: var(--f-g700);
	font-size: 13.5px;
	line-height: 1.7;
}

.wizard .legal-text h4,
.wizard .legal-text h5,
.wizard .legal-text h6 {
	margin: 16px 0 8px;
	padding-top: 0;
	border-top: none;
	color: var(--f-navy);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	text-transform: none;
	letter-spacing: 0;
}

.wizard .legal-text > *:first-child {
	margin-top: 0;
}

.wizard .legal-text ol,
.wizard .legal-text ul {
	padding-left: 22px;
}

.wizard .legal-text li {
	margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Back / Continue / Submit
   -------------------------------------------------------------------------- */
.wizard > .actions {
	width: 100%;
	float: none;
	margin: 24px 0 0;
	padding: 0;
	text-align: right;
}

.wizard > .actions > ul {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin: 0;
	padding: 0;
}

.wizard > .actions > ul > li {
	margin: 0;
	float: none;
}

.wizard > .actions > ul > li:first-child {
	margin-right: auto;
}

.wizard > .actions a,
.wizard > .actions a:hover,
.wizard > .actions a:active {
	display: inline-block;
	min-width: 140px;
	padding: 13px 28px;
	border: none;
	border-radius: 10px;
	background: var(--f-teal);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	transition: all .25s ease;
}

.wizard > .actions a:hover {
	background: #15665c;
	box-shadow: 0 6px 20px rgba(26, 122, 109, .3);
	transform: translateY(-1px);
}

.wizard > .actions > ul > li:first-child a,
.wizard > .actions > ul > li:first-child a:hover,
.wizard > .actions > ul > li:first-child a:active {
	background: var(--f-g100);
	color: var(--f-g700);
	box-shadow: none;
	transform: none;
}

.wizard > .actions > ul > li:first-child a:hover {
	background: var(--f-g200);
}

.wizard > .actions .disabled a,
.wizard > .actions .disabled a:hover,
.wizard > .actions .disabled a:active {
	opacity: .45;
	background: var(--f-g100);
	color: var(--f-g500);
	box-shadow: none;
	transform: none;
	cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.wizard > .content {
		padding: 20px 16px;
		border-radius: 14px;
	}

	.wizard > .steps {
		margin-bottom: 24px;
	}

	/* Seven pills will not wrap tidily on a phone - scroll them instead. */
	.wizard > .steps > ul {
		flex-wrap: nowrap;
		padding-bottom: 8px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.wizard > .steps a,
	.wizard > .steps a:hover,
	.wizard > .steps a:active {
		padding: 9px 13px;
		font-size: 12.5px;
	}

	.wizard > .content > .body .form-control {
		font-size: 16px;   /* stops iOS Safari zooming in on focus */
	}

	.wizard > .actions > ul {
		gap: 8px;
	}

	.wizard > .actions a,
	.wizard > .actions a:hover,
	.wizard > .actions a:active {
		min-width: 0;
		flex: 1;
		padding: 13px 16px;
	}

	.wizard .legal-text {
		max-height: 340px;
		padding: 16px;
	}
}
