/* ============================================================
   styles.css — combined & optimised
   Sources: active-items, bootstrap-select, breadcrumbs,
            input, layout, select-form, text-box,
            traffic-light, validation
   ============================================================ */

/* ── 1. CUSTOM PROPERTIES ─────────────────────────────────── */
:root {
	/* Colour tokens (theme-aware) */
	--bs-orange-rgb: #fd7e14;
	--bs-danger-subtle: #f4caca;
	--bs-primary-subtle: #cfe2ff;
	--bs-success-subtle: #d1e7dd;
	--bs-orange-subtle: #ffe0cd;

	/* Layout tokens */
	--max-element-height: 63px;
	--max-element-height-feedback: 80px;

	/* Transition – set to 'none' to disable all animations globally */
	--transition-style: none !important;

	/* Validation images */
	--valid-validation-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
	--invalid-validation-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
	--default-validation-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%236c757d'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%236c757d' stroke='none'/%3e%3c/svg%3e");

	/* Dark-theme overrides */
	& body[data-bs-theme="dark"] {
		--bs-danger-subtle: #673338;
		--bs-primary-subtle: #374d71;
		--bs-success-subtle: #355d4b;
	}
}


/* ── 2. GLOBAL / LAYOUT ───────────────────────────────────── */
:root {
	& .bg-orange-subtle {
		background-color: var(--bs-orange-subtle) !important;
	}
	& html {
		will-change: auto;
		scroll-behavior: smooth;
		overflow-x: hidden;
		transition: var(--transition-style) !important;
	}

	& main {
		width: 100% !important;
		min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - var(--header-height, 0px)) !important;

		& .entry-content {
			width: 100% !important;
			margin-top: 0;

			& > p { margin: 0; }
		}
	}

	& .fade:not(.show) { opacity: 0 !important; display: none !important; }

	& gap-20-vh { gap: 20vh !important; }

	& p:empty { display: none; }

	& nav > #dark-mode-button-wrapper,
	& nav > #save-wrapper { display: none; }

	& #wpadminbar { box-shadow: var(--normal-shadow); }

	& #layout {
		& #layout-top {
			position: sticky;
			top: var(--wp-admin--admin-bar--height, 0px);
			z-index: 10;

			& .badge.bg-orange { background-color: var(--bs-orange) !important; }
		}
	}

	& #layout-center { max-width: 100%; }

	& hr.solid { border-top: 3px solid var(--bs-secondary); }

	& .prevent-select {
		-webkit-user-select: none;
		user-select: none;
	}

	& .fs-7 { font-size: .85rem !important; }

	& .text-justify { text-align: justify; }

	& .custom-tooltip {
		--bs-tooltip-bg: var(--bs-body-bg);
		--bs-tooltip-color: var(--bs-body-color);
	}

	& .wide-tooltip {
		white-space: pre-line !important;
		text-align: left !important;

		& .tooltip-inner {
			text-align: left !important;
			max-width: 800px !important;
		}
	}

	& .fake-checkbox:not(.d-none) {
		border-radius: .25rem;
		position: absolute;
		top: 2px;
		left: 0;
		background-color: var(--bs-secondary) !important;
		width: 12px;
		height: 12px;
	}

	& .child-info-text.collapse:not(.show) {
		display: none !important;
	}

	/* D3 charts */
	& [d3-chart] {
		cursor: pointer;
		width: fit-content;
		margin: auto;

		& svg {
			overflow: visible;
			filter: drop-shadow(rgba(0,0,0,.25) 0 .5rem 1rem);
		}

		& text { white-space: pre-line; }

		& path,
		& text,
		& polyline { transition: var(--transition-style); }
	}

	& #modal-1 {
		background: var(--bs-secondary-bg);
		color: var(--bs-secondary);
	}

	/* Dropdown colours */
	& .dropdown-menu {
		& li > a,
		& div > label {
			color: var(--bs-body-color);

			&.disabled { color: var(--bs-tertiary-color); }
		}
	}
}


/* ── 3. OVERLAYS: loading / manage / message ──────────────── */
:root {
	& #loading,
	& #loading-file,
	& #manage,
	& #message {
		display: none;
		justify-content: center;
		align-items: center;
		position: fixed;
		inset: 0;
		z-index: 0;
		font-size: 1.75rem;
		transition: none !important;

		& i.bi,
		& .list-group-item-action { cursor: pointer; }

		& .spinner-border {
			width: 50px;
			height: 50px;
		}

		& .text-box {
			background: var(--bs-secondary-bg);
			color: var(--bs-secondary);
			box-shadow: var(--strong-shadow);
		}

		&.visible {
			display: flex;
			position: fixed;
			z-index: 1030;
			transition: none !important;
		}

		&#manage {
			background: var(--bs-secondary-bg);

			& .upload-box {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 100%;
				border: 3px dashed var(--bs-secondary);
				border-radius: .25rem;

				& i { font-size: 50px; }
			}

			& .text-box { min-width: 50%; }
		}
	}

	& #message .text-box {
		min-width: unset;
		box-shadow: var(--strong-shadow);
	}
}


/* ── 4. COLLAPSE BEHAVIOUR ────────────────────────────────── */
:root {
	& .collapse.symptom-list,
	.collapse.other-child-list,
	.collapse.carer-info-list {
		&:not(.show) { display: none !important; }

		& .symptom {
			background: var(--bs-danger-bg);

			&.link-valid { background: unset; }

			&.highlight {
				border-color: var(--bs-primary);
				outline: 0;
				box-shadow: inset 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
			}
		}
	}

	& .collapse:not(.symptom-list):not(.other-child-list):not(.carer-info-list) {
		opacity: 1 !important;
		&:not(.carer-info-entry-collapse):not(.other-children-entry-collapse) {
			transition: all .25s ease-in-out !important;
		}

		&:not(.show) {
			height: 0 !important;
			opacity: 0 !important;
			&:not(.carer-info-entry-collapse):not(.other-children-entry-collapse) {
				transition: all .25s ease-in-out !important;
			}
			&.carer-info-entry-collapse,
			&.other-children-entry-collapse {
				& > * {
					display: none !important;
				}
			}
		}
	}

	.collapsing { transition: var(--transition-style); }
}


/* ── 5. SAVE / PROCESS BAR ────────────────────────────────── */
:root {
	& #save-wrapper,
	#process-bar-mobile-wrapper {
		background: var(--bs-tertiary-bg);
		z-index: 10 !important;
		border-radius: 0px !important;
		& > button {
			/* border-top-right-radius: .75rem !important;
			border-bottom-right-radius: .75rem !important; */
			border-radius: 0px !important;
		}
		& .btn-group {
			border-radius: 0px !important;
			& button {
				border-radius: 0px !important;
			}
		}
		/* border-radius: .75rem !important; */
		& > ul {
			/* border-top-left-radius: .75rem !important;
			border-bottom-left-radius: .75rem !important; */
			border-radius: 0px !important;
			& > li {
				/* border-top-left-radius: .75rem !important;
				border-bottom-left-radius: .75rem !important; */
				border-radius: 0px !important;
			}
		}
	}

	& #save-main { overflow: hidden; }

	& #save-wrapper:hover #save-main,
	#process-bar-mobile-wrapper:hover #save-main { max-width: 100% !important; }

	& #process-bar-mobile.show {
		max-height: 100%;

		& > .select-form-button-wrapper-mobile {
			cursor: pointer;
			&:not(.active) { background: inherit !important; }
			&.disabled { opacity: .2; }
		}
	}

	& #process-bar-mobile:not(.show) {
		max-height: 40px;

		& > .select-form-button-wrapper-mobile {
			max-height: 100%;
			margin: 0;
			padding-inline: 0;
			line-height: 1;
			height: 40px;

			/* &.active {
				border-top-left-radius: .25rem !important;
				border-bottom-left-radius: .25rem !important;
			} */

			&:not(.active) {
				max-height: 0;
				padding: 0;
				opacity: 0;
				border: 0;
			}
		}
	}
}


/* ── 6. PRINT STYLES ──────────────────────────────────────── */
@media print {
	@page {
		size: auto;
		margin: 0;
	}

	body { margin: 1.6cm; }

	:root {
		& .wp-site-blocks {
			padding: 0 !important;
			margin: 0 !important;
			position: absolute;
			inset: 0;
			background-color: transparent !important;
		}

		& .entry-content {
			padding: 0 !important;
			width: 100% !important;
		}

		& .select-form {
			width: 210mm !important;

			& > div,
			& > div > div { padding: 0 !important; width: 100% !important; background-color: transparent !important; }

			& > div > div > .summary-pages { padding: 0 !important; width: 100% !important; }

			& > div > div > .summary-pages > .summary-page { padding: 0 !important; width: 100% !important; }
		}

		& .noprint,
		& .noprint * { display: none !important; }

		& .print-max {
			position: absolute !important;
			padding: 0 !important;
			margin: 0 !important;
			inset: 0 !important;
		}

		& * { box-shadow: none !important; }

		& .summary-pages {
			display: unset !important;
			width: 100% !important;
			padding: 0 !important;
			margin: 0 !important;

			& .summary-page {
				height: auto !important;
				flex-grow: 1 !important;
				flex-shrink: 0 !important;
			}
		}

		& .summary-block {
			display: unset !important;
			top: unset !important;
			page-break-after: auto !important;
			break-after: auto !important;
			page-break-inside: avoid !important;
			break-inside: avoid !important;
			page-break-before: auto !important;
			break-before: auto !important;
			padding-block: 0 !important;
			margin: 0 !important;
		}
	}
}


/* ── 7. MISC LAYOUT HELPERS ───────────────────────────────── */
:root {
	& .parents-entry,
	& .other-children-entry {
		& .text,
		& .value {
			position: relative;
			background: var(--bs-white);
			z-index: 1;
		}

		& .text { padding-right: .25cm; }
		& .value { padding-left: .25cm; }
	}

	& .other-children-entry .dotted { width: 100% !important; }
	& .parents-entry .dotted { width: 100% !important; }

	& #26_295 { z-index: 3; }
}


/* ── 8. ACTIVE ITEMS / PEOPLE ─────────────────────────────── */
:root {
	& .active-items,
	& .people {
		position: relative;
		align-self: baseline;
		z-index: 2;

		/* Shared sticky positioning helper */
		& .people-tab,
		& .active-item-tab-list,
		& .active-items-list,
		& .people-list {
			position: sticky;
			max-width: 200px;
			top: calc(var(--wp-admin--admin-bar--height, 0px) + 50px + 1rem);
			z-index: 2;
		}

		& .active-item-tab-list,
		& .active-items-list {
			top: calc(var(--wp-admin--admin-bar--height, 0px) + 50px + 4rem);
		}

		/* Tab buttons */
		& .people-tab,
		& .active-item-tab-list {
			& > .active-items-tab {
				box-shadow: var(--normal-shadow);
				writing-mode: vertical-rl;
				text-orientation: mixed;
			}

			& .active-items-list:not(.d-none) ~ .active-items-tab {
				writing-mode: horizontal-tb;
				text-orientation: upright;
			}

			&.people-tab {
				box-shadow: var(--normal-shadow);
				writing-mode: vertical-rl;
				text-orientation: mixed;
				transform: rotate(180deg);
			}
		}

		/* Lists */
		& .active-items-list,
		& .people-list {
			box-shadow: var(--normal-shadow);

			& .active-item,
			& .person {
				background: var(--bs-secondary-bg);

				&.active-item .text,
				&.person {
					border-radius: 0;
					text-wrap: nowrap;
					text-overflow: ellipsis;
					overflow: hidden;
					white-space: nowrap;
					line-height: 1.75;
				}

				&.bg-danger .active-item .text,
				&.bg-danger.person,
				&.bg-success .active-item .text,
				&.bg-success.person { color: var(--bs-white) !important; }

				&.text-dark .text {
					--bs-text-opacity: 1;
					color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
				}

				&:hover {
					background: var(--bs-primary) !important;
					color: var(--bs-white) !important;
				}

				&.bg-orange { background: var(--bs-orange); }

				/* Eye icon toggle */
				& i.bi-eye { font-size: 20px; display: block; }
				&:not(.visible) i.bi-eye { display: none; }
				& i.bi-eye-slash { font-size: 20px; display: none; }
				&:not(.visible) i.bi-eye-slash { display: block; }
			}
		}
	}

	& [data-bs-theme="dark"] .active-items .active-item,
	& [data-bs-theme="dark"] .people .person {
		&.active-item .text,
		&.person { color: var(--bs-secondary-color); }

		&.bg-danger .active-item .text,
		&.bg-danger.person,
		&.bg-success .active-item .text,
		&.bg-success.person { color: var(--bs-white) !important; }
	}
}


/* ── 9. BOOTSTRAP-SELECT ──────────────────────────────────── */
.form-floating .bootstrap-select {
	width: 100% !important;
	min-height: 75px;

	& > .dropdown-menu {
		opacity: 0;
		box-shadow: var(--normal-shadow);
		transition: var(--transition-style);

		&.show { opacity: 1; }

		& li {
			& .text {
				font-size: 20px;
				color: var(--bs-secondary-color);
			}

			&.selected .text,
			&.active .text {
				background: var(--bs-primary) !important;
				color: var(--bs-white) !important;
			}
		}
	}

	& .form-select.selectpicker {
		& + .dropdown-toggle {
			padding: 2.025rem 0.75rem 0;
			position: absolute;
			inset: 0;
			font-size: 20px;
			min-height: 70px !important;
			color: var(--bs-secondary-color) !important;
			background-color: var(--bs-body-bg);

			&:hover,
			&:focus { outline: none !important; }
		}

		& ~ .dropdown-menu {
			padding: 0;
			position: absolute;
			left: 0;
			top: 0;
			font-size: 20px;
			color: var(--bs-secondary-color);
			background-color: var(--bs-body-bg);

			& > li > .form-check {
				padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);
				padding-left: calc(2.5em + var(--bs-dropdown-item-padding-x));
			}
		}
	}

	& + label,
	& + label ~ label {
		font-size: 20px;
		color: var(--bs-secondary-color) !important;
	}

	& .dropdown-toggle .filter-option { overflow: visible !important; }
}


/* ── 10. BREADCRUMBS ──────────────────────────────────────── */
:root {
	& ul.breadcrumbs {
		margin: 20px 60px;
		page-break-inside: avoid;
		text-wrap: nowrap;
		white-space: nowrap;

		& li {
			vertical-align: bottom;
			display: inline-block;
			height: 50px;
			line-height: 50px;
			width: auto;
			margin: 0;
			text-indent: 35px;
			position: relative;
			cursor: pointer;

			&::before {
				content: "";
				height: 0;
				width: 0;
				position: absolute;
				left: -2px;
				border-style: solid;
				border-width: 25px 0 25px 25px;
				border-color: transparent transparent transparent var(--bs-tertiary-bg);
				z-index: 0;
			}

			&:first-child::before { border-color: transparent; }

			&:last-child {
				width: -webkit-fill-available;
				width: -moz-available;
			}

			& a {
				display: block;
				background: var(--bs-secondary-bg);
				font-weight: bold;
				color: var(--bs-body-color);

				& span:not(.badge) {
					display: inline-block;
					text-overflow: ellipsis;
					overflow: hidden;
					margin-left: -55px;
					font-size: 15px;
					margin-right: 10px;
				}

				& span.badge.d-none ~ span:not(.badge) { margin-left: -40px; }
			}

			&:not(:last-child) a::after {
				content: "";
				height: 0;
				width: 0;
				position: absolute;
				right: -24px;
				border-style: solid;
				border-width: 25px 0 25px 25px;
				border-color: transparent transparent transparent var(--bs-secondary-bg);
				z-index: 10;
			}

			& .badge {
				position: relative;
				top: -20px;
				display: inline;
				margin: 0;
				z-index: 100;
				left: -20px;
			}

			&.disabled {
				cursor: default !important;

				&::before { border-color: transparent transparent transparent var(--bs-body-bg) !important; }

				&:not(:last-child) a::after { border-color: transparent transparent transparent var(--bs-body-bg) !important; }

				& a {
					background: var(--bs-body-bg) !important;
					color: rgba(var(--bs-tertiary-color-rgb), .1) !important;
				}
			}

			&:not(.disabled) {
				&.active a {
					background: var(--bs-primary);
					color: white;
					z-index: 100;

					&::after { border-left-color: var(--bs-primary); }

					&:hover {
						background: var(--bs-success);
						color: white;

						&::after { border-color: transparent transparent transparent var(--bs-success); }
					}
				}

				&:not(.active) a:hover {
					background: var(--bs-primary);
					color: white;

					&::after { border-color: transparent transparent transparent var(--bs-primary); }
				}
			}
		}
	}
}


/* ── 11. FORM INPUTS ──────────────────────────────────────── */
:root {
	& .form-floating {
		& > input.form-control,
		& > textarea.form-control,
		& > select.form-select {
			cursor: pointer;
			color: var(--bs-secondary-color) !important;

			& ~ label {
				cursor: pointer;
				color: var(--bs-secondary-color) !important;
			}

			&:placeholder-shown:not(:focus) ~ label { padding-top: 1.3rem; }

			&:focus { border: 1px solid var(--bs-secondary); }
		}

		& > textarea.form-control {
			resize: none;
			overflow: hidden;
			min-height: 50px;
			max-height: 500px;
			overflow-y: auto;
		}
	}

	& .conclusion-textarea .form-floating > textarea.form-control { max-height: 100%; }

	& input,
	& input ~ label {
		cursor: pointer;
		color: var(--bs-secondary-color) !important;
	}

	& .dropdown-menu > li > .form-check.form-switch { padding-left: 3rem; }

	& .form-check > .form-check-input ~ .invalid-feedback {
		margin-top: 0 !important;
		padding-top: .25rem;
	}
}


/* ── 12. TEXT-BOX COMPONENT ───────────────────────────────── */
:root {
	& .text-box {
		& .text-box-row {
			padding: 15px;
			background: var(--bs-secondary-bg);
			&:not(.text-box-row-mobile) {
				border-radius: var(--bs-border-radius-xl) !important;
			}

			& .visibility-button > span { color: var(--bs-btn-color); }

			&:not(.alternate-row-color) {
				margin-top: .5rem;
				margin-bottom: .5rem;
			}
			&.alternate-row-color {
				background: var(--bs-tertiary-bg);

				& .visibility-button > span { color: var(--bs-btn-color); }
			}

			& + ul.list-group { border-top: none !important; }
		}

		&.error .title { color: var(--bs-danger) !important; }

		&.text-box-odd {
			& .text-box-row {
				background: var(--bs-tertiary-bg);

				&.alternate-row-color { background: var(--bs-secondary-bg); }
			}
		}
	}
}


/* ── 13. TRAFFIC LIGHT ────────────────────────────────────── */
:root {
	& .traffic-light {
		position: relative;
		display: block;
		margin: auto;
		border-radius: 100px;

		& > input {
			appearance: none;
			user-select: none;
			outline: none;
			width: 30px;
			height: 30px;
			margin: 15px 15px 8px;
			border-radius: 100%;
			opacity: .25;

			&:hover { opacity: .75; }
			&:checked { opacity: 1; }

			/* Colour 1 – success/green */
			&.color1 {
				background: radial-gradient(circle, rgb(96,184,87) 0%, var(--bs-success) 35%, var(--bs-success) 110%);
				box-shadow: 0 0 0 0 var(--bs-success);

				&:hover {
					background: radial-gradient(circle, rgb(136,198,128) 0%, rgb(96,184,87) 35%, var(--bs-success) 110%);
					box-shadow: 0 0 5px 5px var(--bs-success);
				}
				&:checked {
					background: radial-gradient(circle, #fff 0%, rgb(96,184,87) 35%, var(--bs-success) 110%) -5px -5px;
					box-shadow: 0 0 10px 10px var(--bs-success);
				}
			}

			/* Colour 2 – warning/yellow */
			&.color2 {
				background: radial-gradient(circle, rgb(246,255,113) 0%, var(--bs-warning) 35%, var(--bs-warning) 110%);
				box-shadow: 0 0 0 0 var(--bs-warning);

				&:hover {
					background: radial-gradient(circle, rgb(249,255,165) 0%, rgb(246,255,113) 35%, var(--bs-warning) 110%);
					box-shadow: 0 0 5px 5px var(--bs-warning);
				}
				&:checked {
					background: radial-gradient(circle, #fff 0%, rgb(246,255,113) 35%, var(--bs-warning) 110%) -5px -5px;
					box-shadow: 0 0 10px 10px var(--bs-warning);
				}
			}

			/* Colour 3 – orange */
			&.color3 {
				background: radial-gradient(circle, rgb(184,184,87) 0%, var(--bs-orange) 35%, var(--bs-orange) 110%);
				box-shadow: 0 0 0 0 var(--bs-orange);

				&:hover {
					background: radial-gradient(circle, rgb(187,187,112) 0%, rgb(184,184,87) 35%, var(--bs-orange) 110%);
					box-shadow: 0 0 5px 5px var(--bs-orange);
				}
				&:checked {
					background: radial-gradient(circle, #fff 0%, rgb(184,184,87) 35%, var(--bs-orange) 110%) -5px -5px;
					box-shadow: 0 0 10px 10px var(--bs-orange);
				}
			}

			/* Colour 4 – danger/red */
			&.color4 {
				background: radial-gradient(circle, rgb(255,109,109) 0%, var(--bs-danger) 35%, var(--bs-danger) 110%);
				box-shadow: 0 0 0 0 var(--bs-danger);

				&:hover {
					background: radial-gradient(circle, rgb(255,169,169) 0%, rgb(255,109,109) 35%, var(--bs-danger) 110%);
					box-shadow: 0 0 5px 5px var(--bs-danger);
				}
				&:checked {
					background: radial-gradient(circle, #fff 0%, rgb(255,109,109) 35%, var(--bs-danger) 110%) -5px -5px;
					box-shadow: 0 0 10px 10px var(--bs-danger);
				}
			}
		}
	}
}


/* ── 14. VALIDATION ───────────────────────────────────────── */
:root {
	& .was-validated {
		& .is-invalid,
		& :invalid,
		& .attribute-item.invalid {
			&:not(.feedback-hidden) {
				& ~ .invalid-feedback,
				& ~ .invalid-tooltip,
				& .invalid-feedback,
				& .invalid-tooltip { display: block; }
			}
		}

		& .form-check-input {
			&.is-valid,
			&:valid {
				border-color: var(--bs-primary-border-subtle) !important;
				background-color: var(--bs-primary-border-subtle) !important;
				& + .form-check-label.form-check-label-color { color: var(--bs-primary-border-subtle) !important; }
			}
			&:valid:focus {
				box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb),.25);
			}

			&.is-invalid,
			&:invalid {
				& + .form-check-label.form-check-label-color { color: var(--bs-secondary) !important; }
			}
		}

		& .red-error {
			& .form-check-input {
				&.is-invalid,
				&:invalid {
					& + .form-check-label.form-check-label-color { color: var(--bs-danger) !important; }
				}
			}
		}

		& .form-control,
		& .form-select,
		& .bootstrap-select select,
		& .select-form-item.active {
			&.is-valid,
			&:valid,
			&.is-valid + .dropdown-toggle,
			&:valid + .dropdown-toggle {
				border-width: 3px !important;
				/* border-color: var(--bs-success) !important; */
				border-color: var(--bs-primary-border-subtle) !important;
				background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%239ec5fe' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
			}

			&.is-invalid,
			&:invalid,
			&.is-invalid + .dropdown-toggle,
			&:invalid + .dropdown-toggle {
				border-width: 3px !important;
				border-color: var(--bs-secondary) !important;
			}

			&.red-error.is-invalid,
			&.red-error:invalid,
			&.red-error.is-invalid + .dropdown-toggle,
			&.red-error:invalid + .dropdown-toggle {
				border-width: 3px !important;
				border-color: var(--bs-danger) !important;
			}

			&:focus { border-color: var(--bs-primary) !important; }
		}

		.red-error {
			& .bootstrap-select select {
				&.is-invalid + .dropdown-toggle,
				&:invalid + .dropdown-toggle {
					border-color: var(--bs-form-invalid-border-color);
					background-image: var(--invalid-validation-image);
				}
			}
		}

		& .bootstrap-select select {
			&.is-invalid + .dropdown-toggle,
			&:invalid + .dropdown-toggle,
			&.is-valid + .dropdown-toggle,
			&:valid + .dropdown-toggle {
				padding-right: calc(1.5em + .75rem) !important;
				background-repeat: no-repeat;
				background-position: right calc(.375em + .1875rem) center;
				background-size: calc(.75em + .375rem) calc(.75em + .375rem);
			}

			&.is-invalid + .dropdown-toggle,
			&:invalid + .dropdown-toggle {
				border-color: var(--bs-secondary) !important;
				background-image: var(--default-validation-image) !important;

				&:focus,
				&.show {
					box-shadow: 0 0 0 .25rem rgba(var(--bs-danger-rgb), .25);
					border-color: var(--bs-primary) !important;
				}
			}

			&.is-valid + .dropdown-toggle,
			&:valid + .dropdown-toggle {
				border-color: var(--bs-form-valid-border-color);
				background-image: var(--valid-validation-image);

				&:focus,
				&.show {
					box-shadow: 0 0 0 .25rem rgba(var(--bs-success-rgb), .25);
					border-color: var(--bs-primary) !important;
				}
			}
		}
		
		/* 22.9
		10:30 */

		& .symptom-list {
			& > .list-group-wrapper { background-color: var(--bs-list-group-bg); }

			& ul {
				margin-inline: 1px !important;
				padding-right: calc(1.5em + .75rem) !important;
				background-repeat: no-repeat;
				background-position: right calc(.375em + .1875rem) center;
				background-size: calc(.75em + .375rem) calc(.75em + .375rem);

				& > li { cursor: pointer !important; }
			}

			&.invalid ul {
				border: 3px solid var(--bs-form-invalid-border-color) !important;
				background-image: var(--invalid-validation-image);
			}

			&:not(.invalid) ul {
				border: 3px solid var(--bs-form-valid-border-color) !important;
				background-image: var(--valid-validation-image);
			}
		}

		& .invalid-feedback { color: var(--bs-danger) !important; }

		& .novalidate {
			&:checked { background-color: var(--bs-secondary) !important; }
			border-color: var(--bs-secondary) !important;
		}
	}
}


/* ── 15. SELECT-FORM ──────────────────────────────────────── */
:root {
	& .select-form {
		max-width: 100%;

		&:not(.show) {
			/* &:not(.select-form-mobile) {
				opacity: .25 !important;
			}
			&.select-form-mobile {
				display: none !important;
			} */
			display: none !important;
			/* height: 0 !important;
			padding: 0 !important;
			margin: 0 !important;
			opacity: 0 !important;
			transition: all .25s ease-in-out !important; */
		}
		/* .show {
			opacity: 1 !important;
			transition: all .25s ease-in-out !important;
		} */

		& .select-form-toggle ~ .form-check-label { white-space: nowrap; }

		& .text-box {
			min-width: 50%;
			color: var(--bs-secondary);

			&:not(.text-box-inset) { box-shadow: var(--normal-shadow); }

			&.highlight {
				border-color: var(--bs-primary);
				outline: 0;
				box-shadow: inset 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
			}
		}

		&.collapse:not(.show),
		&.collapsing.show {
			opacity: 0 !important;
			/* transition: all .25s ease-in-out !important;
			cursor: pointer; */

			& .select-form-buttons {
				opacity: 0 !important;
				/* transition: all .25s ease-in-out !important; */
			}
		}

		&.collapse.show,
		&.collapsing:not(.show) {
			opacity: 0 !important;
			/* transition: all .25s ease-in-out !important; */

			& .select-form-buttons {
				opacity: 1 !important;
				/* transition: all .25s ease-in-out !important; */
			}
		}

		& label,
		.select-form-button { color: var(--bs-secondary); }

		& .collapse .collapsing { transition: var(--transition-style); }

		/* Invalid / blank state */
		&.invalid,
		&.blank {
			& .text-box { border: var(--debug-lines); }

			& .select-form-buttons .invalid-feedback {
				display: flex;
				font-size: 20px;
				cursor: pointer;
				padding: 1rem;

				& ~ .btn-group {
					display: inline-flex !important;
					margin: auto;

					& > button:not(.dropdown-toggle) { white-space: nowrap; }
				}
			}
		}

		/* Conditional feedback visibility */
		&:not(.invalid-sub-categories) .header .invalid-feedback:not(.blank):not(.no-valid-items) { display: none; }
		&:not(.blank) .header .invalid-feedback.blank { display: none; }
		&:not(.no-valid-items) .header .invalid-feedback.no-valid-items { display: none; }
		&.invalid:not(.blank):not(.no-valid-items).invalid-sub-categories .header .invalid-feedback:not(.blank):not(.no-valid-items) { display: block; }
		&.blank .header .invalid-feedback.blank { display: block; }
		&.no-valid-items:not(.blank):not(.always-active) .header .invalid-feedback.no-valid-items { display: block; }

		&[select-form-active="true"] {
			& > div > div > .header { margin-bottom: 5rem; }
			& .select-form-text-box > div > hr { display: block !important; }
		}

		/* ── Select-form item ── */
		& .select-form-item {
			border-color: inherit;
			outline: inherit;
			box-shadow: inherit;
			max-height: 100% !important;
			max-width: 100vw !important;
			border: none !important;

			&.exclusive-age { border: inset 4px var(--bs-primary) !important; }
			&.few-ages { border: inset 2px var(--bs-primary) !important; }

			& .select-form-element-toggle {
				& ~ .form-check-label { white-space: nowrap; }

				&[value]:checked ~ .form-check-label {
					background-color: var(--bs-primary-subtle);
					border-radius: .25rem;
					box-shadow: 0 0 3px 3px var(--bs-primary-subtle);
				}
			}

			& .select-form-item-mobile-toggle li {
				cursor: pointer;
			}

			/* Position marker */
			& > .marker-wrapper {
				position: absolute;
				top: 0;
				left: -300px;
				right: calc(100% + 1rem);
				padding-right: 1rem;
				height: 100%;

				& > .marker {
					opacity: 0;
					top: calc(var(--wp-admin--admin-bar--height, 0px) + 60px);
					position: sticky;

					&.visible { opacity: 1; }

					& .marker-text {
						max-width: 100%;
						height: 50px;
						color: var(--bs-secondary);
						background: var(--bs-secondary-bg);
						box-shadow: var(--normal-shadow);
						white-space: nowrap;
						text-overflow: ellipsis;

						&::after {
							content: "";
							height: 0;
							width: 0;
							position: absolute;
							right: -24px;
							border-style: solid;
							border-width: 25px 0 25px 25px;
							border-color: transparent transparent transparent var(--bs-secondary-bg);
							z-index: 10;
						}
					}
				}
			}

			/* Attribute item */
			& .attribute-item {
				&.disabled { display: none !important; }

				& .question {
					display: block;
					margin-top: .5rem;
					margin-bottom: .75rem;
				}

				& .back-to-summary-button { display: none; }

				&.highlight {
					border-radius: .25rem;
					border-color: var(--bs-primary);
					outline: 0;
					box-shadow: outset 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
					&.summary-focus .back-to-summary-button {
						display: block;
					}
				}

				& .invalid-feedback { margin-top: 1rem; }

				& ul.dropdown-menu.inner {
					& > li.selected,
					& > li.active {
						color: white !important;
						background-color: rgba(var(--bs-primary-rgb), .25) !important;

						& .dropdown-item.active > span.text,
						& .dropdown-item.selected > span.text { color: var(--bs-light) !important; }

						& > a {
							& > span.bs-ok-default.check-mark { padding: 5px; }
							& > span.text { color: rgba(var(--bs-body-color-rgb), .65) !important; }
						}
					}

					& > li > a:active > span.text { color: white !important; }
				}

				&.invalid {
					& .mobile-toggle:not(.show) i.bi {
						color: var(--bs-danger);
					}
				}

			}

			&.disabled,
			&.filtered { display: none !important; }

			& > .collapse ~ hr,
			& > .collapsing ~ hr { display: none; }

			/* Invalid / blank item */
			&.invalid,
			&.blank {
				border: var(--debug-lines);
				max-height: 100% !important;

				& > .invalid-feedback {
					display: block;
					height: auto !important;
					opacity: 1 !important;
				}

				& .form-floating.form-control-mobile { max-height: 100vh !important; }

				& > .collapse,
				& > .collapsing {
					&:not(.show) ~ hr { display: none; }

					&.show {
						& ~ .invalid-feedback { text-align: center; }
						& ~ hr { display: block; }
					}
				}
			}

			& .element-type-text { opacity: .5; }

			/* Form floating inside item */
			& .form-floating {
				& select.form-select,
				& input.form-control,
				& textarea.form-control {
					font-size: 20px;
					min-height: 70px !important;
					padding-top: 2.025rem;

					& ~ label {
						color: rgba(var(--bs-body-color-rgb), .65);
						font-size: 20px;
						text-overflow: ellipsis;
						width: 100%;
					}
				}

				&.form-control-mobile {
					min-height: 60px !important;

					&:not(:has(textarea)) { max-height: 60px !important; }

					& select.form-select,
					& input.form-control,
					& textarea.form-control,
					& .bootstrap-select.form-select > .dropdown-toggle {
						font-size: 16px !important;
						min-height: 60px !important;

						&:not(textarea) { max-height: 60px !important; }

						& > .filter-option { margin-top: -10px !important; }
					}

					& ~ label,
					& label,
					& .filter-option-inner-inner {
						font-size: 16px !important;
						text-overflow: ellipsis;
						width: 100%;
					}

					& .dropdown.bootstrap-select {
						max-height: 60px !important;
						min-height: 60px !important;
					}
				}

				& textarea.form-control { min-height: 80px !important; }

				& .invalid-feedback { margin-top: 1rem; }
			}

			& .form-check-group {
				height: calc(3.5rem + calc(var(--bs-border-width) * 2));
				min-height: calc(3.5rem + calc(var(--bs-border-width) * 2));
				line-height: 1.25;
			}

			& span {
				color: var(--bs-secondary);
				border-radius: 0;
				text-overflow: ellipsis;
				overflow: hidden;
			}

			& .visibility-button.disabled { display: none; }

			/* Can-be-invisible behaviour */
			&.can-be-invisible {
				&:not(.visible) .ok-button-wrapper { display: none !important; }

				&.visible {
					max-height: 100%;
					overflow: visible;

					& .visibility-button { display: none; }

					& .ok-button-wrapper {
						position: sticky;
						bottom: var(--select-form-bottom-height, 0px);
						background: inherit;
						z-index: 10;
					}
				}

				&:not(.visible) {
					overflow: hidden;

					&:not(:has(> .collapse.show)):not(:has(> .collapse.collapsing)) { max-height: var(--max-element-height); }

					& > .collapse:not(.show):not(.collapsing) {
						display: none;

						& + hr { display: none; }

						& ~ .invalid-feedback {
							text-align: left;
							height: 0;
							opacity: 0;
						}
					}

					&.blank .visibility-button { display: none; }
					/* &:not(.blank) .visibility-button { display: block; } */
					&.active:not(.blank) .visibility-button { display: block !important; }

					& .ok-button-wrapper { display: none; }
				}

				&.blank:not(.feedback-hidden),
				&:not(.active):not(.feedback-hidden):not(.always-active):not(.linked) {
					&:not(:has(> .collapse.show)):not(:has(> .collapse.collapsing)) { max-height: var(--max-element-height-feedback); }

					& .visibility-button { display: none; }
				}

				&:not(.active):not(.blank):not(.always-active):not(.linked) {
					&:not(:has(> .collapse.show)):not(:has(> .collapse.collapsing)) { max-height: var(--max-element-height); }

					& .visibility-button { display: none; }
				}
			}

			&.always-active {
				.visibility-button { display: none !important; }
				.select-form-item-mobile-toggle { display: none !important; }
			}

			&:not(.can-be-invisible) .visibility-button { display: none !important; }

			&.highlight {
				border-color: var(--bs-primary);
				outline: 0;
				box-shadow: inset 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
			}

			&.linked .select-form-item-linked { display: flex !important; }

			&:has(.select-form-item-mobile-toggle.show) {
				overflow: visible;
				z-index: 1021;
			}
		}

		/* Hide feedback on subsequent items after invalid one */
		& .select-form-item.blank:not(.d-none) ~ .select-form-item:not(.d-none),
		.select-form-item.invalid:not(.d-none) ~ .select-form-item:not(.d-none) {
			& > .invalid-feedback:not(.visible) {
				display: none !important;
				height: 0 !important;
				opacity: 0 !important;
			}
		}

		/* Sub-category */
		& .sub-category {
			padding: 0 0 1rem;
			display: grid;

			& .sub-category-toggle ~ .form-check-label { white-space: nowrap; }

			& > *:not(.invalid-feedback):not(.header) { margin-left: 1rem; }

			&.sub-category-mobile > *:not(.invalid-feedback):not(.header) {
				margin-left: 0;
				margin-right: 0;
			}

			& > .invalid-feedback.empty,
			& > .invalid-feedback.blank,
			& > .invalid-feedback.invalid-items {
				display: none;
				padding-left: 15px;
			}

			& > ul { margin-right: 4px; overflow: clip; }

			&.empty {
				& > .invalid-feedback:not(.empty) { display: none; }
				& > .invalid-feedback.empty { display: block; }
			}

			&.blank {
				& > .invalid-feedback:not(.blank) { display: none; }
				& > .invalid-feedback.blank { display: block; }
			}

			&.invalid-items {
				& > .invalid-feedback:not(.invalid-items) { display: none; }
				& > .invalid-feedback.invalid-items { display: block; }
			}

			& > ul.collapse,
			& > ul.collapsing {
				max-height: 100%;

				&.collapsing { transition: var(--transition-style); }

				&.show,
				&.collapsing:not(.show) { margin-block: 1rem; }

				&:first-of-type { border-top-left-radius: 1rem; }
				&:last-of-type { border-bottom-left-radius: 1rem; }

				& > .select-form-item {
					border: 1px solid var(--bs-secondary);
					border-right: 0;

					&.highlight {
						border-color: var(--bs-primary);
						border-right: 0;
					}
				}
			}

			& > div {
				padding: 10px 15px;

				&:first-of-type { padding-top: 15px; }
				&:last-of-type { padding-bottom: 15px; }
			}

			&[sub-category-active="true"] { margin-bottom: 5rem; }
		}

		/* Select-form buttons */
		& .select-form-buttons {
			z-index: 2 !important;
			margin-left: calc(-1rem - 1px);
  			margin-right: calc(-1rem + 1px);
			background: var(--bs-tertiary-bg);

			& > button.disabled { opacity: .15 !important; }

			& .invalid-feedback {
				display: flex;
				font-size: 20px;
				cursor: pointer;
				padding: 1rem;
			}
		}

		/* Factor types */
		& .factor-type {
			& > span { color: var(--bs-secondary); }

			& .factor-group {
				background: transparent;
				color: var(--bs-secondary);
				border: none;

				& > ul {
					border-radius: 1rem;
					border-top-right-radius: 0;
					border-bottom-right-radius: 0;
					border: none;

					& > .factor {
						padding: 0 1rem;
						border: none;

						& input[type=text] { display: none; }

						&.text-input input[type=checkbox]:checked ~ input[type=text] { display: block; }

						& label {
							max-width: 1000px;
							color: var(--bs-secondary) !important;
						}

						&.highlight {
							border-color: var(--bs-primary);
							outline: 0;
							box-shadow: inset 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
						}

						.back-to-summary-button { display: none; }

						&.summary-focus .back-to-summary-button { display: block; }

					}
				}
			}
		}

		/* Mobile toggle */
		& .select-form-mobile-toggle,
		.mobile-toggle,
		.sub-category-mobile-toggle,
		.select-form-item-mobile-toggle,
		.attribute-item-mobile-toggle {
			border-radius: .25rem;
			width: max-content;

			& > li {
				& > span { display: none; color: unset; }
				border: none;
				font-size: 36px;
				padding: .25rem;
				background-color: transparent !important;
				color: var(--bs-secondary) !important;

				&.active {
					background-color: transparent !important;
					color: var(--bs-primary) !important;
				}

				&:not(.active) { display: none; }
			}

			&:not(.show) {
				& > li > i.bi {
					background-color: white;
					display: flex;
					border-radius: .3rem;
				}
			}

			&.show {
				box-shadow: var(--bs-box-shadow-lg);
				position: absolute;
				right: .25rem;
				top: 1rem;
				z-index: 1021;

				& > li {
					padding: .5rem;
					font-size: 20px;
					background-color: var(--bs-secondary-bg) !important;
					display: flex;
					gap: .5rem;

					&.active {
						background-color: var(--bs-primary) !important;
						color: white !important;
					}

					&:not(:last-of-type) { border-bottom: 1px solid var(--bs-secondary); }

					& > span { display: block; }

					&.show-button { display: none; }
				}
			}
		}



		& .mobile-toggle-wrapper {
			min-width: 43px;
			max-width: 43px;
			min-height: 43px;
			max-height: 43px;

			& .select-form-mobile-toggle,
			.mobile-toggle,
			.sub-category-mobile-toggle,
			.select-form-item-mobile-toggle,
			.attribute-item-mobile-toggle {
				right: 0;
				top: -1rem;
			}
		}
	}

	/* Invalid-feedback-box hover */
	& .invalid-feedback-box:hover {
		border-color: var(--bs-primary);
		outline: 0;
		box-shadow: inset 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
	}

	/* Summary */
	& .summary {
		& .bg-orange { background: var(--bs-orange); }

		& .summary-item[select-form-item] {
			&:has(.rating.bg-danger) { border-bottom-color: var(--bs-danger); }
			&:has(.rating.bg-orange) { border-bottom-color: var(--bs-orange); }
			&:has(.rating.bg-warning) { border-bottom-color: var(--bs-warning); }
			&:has(.rating.bg-success) { border-bottom-color: var(--bs-success); }

			& .rating.bg-danger {
				box-shadow: 0 0 5px 2px var(--bs-danger);
				text-shadow: 0 0 10px #fff;
			}

			& .rating.bg-orange {
				box-shadow: 0 0 5px 2px var(--bs-orange);
				text-shadow: 0 0 10px #000;
			}

			& .rating.bg-success { box-shadow: inset 0 0 4px 2px var(--bs-list-group-bg); }
		}
	}

	/* Summary pages */
	& .summary-pages {
		position: relative;
		overflow: hidden;
		box-shadow: var(--large-shadow);
		height: auto;
		letter-spacing: initial !important;
		/* border-radius: 0 !important; */
		background: var(--bs-white);

		& .page-marker {
			position: absolute;
			border-top: 3px solid var(--bs-body-bg);
			border-bottom: 1px solid var(--bs-body-bg);
			height: 1px;
			width: 100%;

			&.no-border { border: 0 !important; }
		}

		& .padding-marker,
		& .page-color,
		& .page-header {
			position: absolute;
			height: 1px;
			width: 100%;
			z-index: 1;

			&.top,
			&.bottom {
				text-align: center;
				border: 0;
				color: rgb(129,129,129);
				font-size: 12px;
				font-weight: lighter;
			}

			&.top { border-bottom: 1px dotted black; }
			&.bottom { border-top: 1px dotted black; }

			&.no-border { border: 0 !important; }
			&.no-border.top { display: none !important; }

			&.page-color { width: .5cm; z-index: 0; }
			&.page-header { height: 1cm; z-index: 0; }

			&[rating="4"] { background: #f8d7da; }
			&[rating="3"] { background: #fff3cd; }
			&[rating="2"] { background: #f9ffa5; }
			&[rating="1"] { background: #d1e7dd; }
		}

		& .summary-page {
			font-size: 12px;
			display: flex;
			flex-direction: column;
			position: relative;
			box-shadow: var(--normal-shadow);
			background: transparent;
			width: 15.75cm;
			padding: .5cm;

			& .no-remove span {
				font-size: 14px;
				font-weight: bold;
			}

			& .title {
				font-size: 14px;
				font-weight: bold;
			}

			& .dotted {
				position: absolute;
				width: 100%;
				border: 0;
				margin: 0;
				margin-top: .25cm;
				opacity: 1;
				border-bottom: 1px dotted black;
				border-bottom-width: 2px !important;
				border-bottom-style: dashed !important;
				-webkit-print-color-adjust: exact;
				print-color-adjust: exact;
				opacity: .15 !important;
			}

			& .under-dotted {
				position: relative;
				bottom: 0;
				border: 0;
				margin: 0;
				opacity: 1;
				border-bottom: 1px dotted black;
				border-bottom: 1px dotted black;
				border-bottom-width: 2px !important;
				border-bottom-style: dashed !important;
				-webkit-print-color-adjust: exact;
				print-color-adjust: exact;
				opacity: .15 !important;
			}

			& .flex-wrap > .position-relative > .under-dotted { bottom: -20px; }

			& .summary-block {
				z-index: 1;
				background: transparent;
				position: relative;
				page-break-after: auto !important;
				break-after: auto !important;
				page-break-inside: avoid !important;
				break-inside: avoid !important;
				page-break-before: auto !important;
				break-before: auto !important;

				&:last-of-type { margin-bottom: 0 !important; }

				/* Rating backgrounds */
				&[rating="4"] > .text { background: var(--bs-danger-bg-subtle); padding: .25rem; display: block !important; }
				&[rating="4"] ~ [rating="4"] > .text.d-none { display: none !important; }
				&[rating="3"] > .text { background: var(--bs-warning-bg-subtle); padding: .25rem; display: block !important; }
				&[rating="3"] ~ [rating="3"] > .text.d-none { display: none !important; }
				&[rating="2"] > .text { background: rgb(249,255,165); padding: .25rem; display: block !important; }
				&[rating="2"] ~ [rating="2"] > .text.d-none { display: none !important; }
				&[rating="1"] > .text { background: var(--bs-success-bg-subtle); padding: .25rem; display: block !important; }
				&[rating="1"] ~ [rating="1"] > .text.d-none { display: none !important; }

				& .summary-block-elements { display: block !important; }

				& .summary-block-element {
					page-break-inside: avoid;
					break-inside: avoid;
					position: relative;

					&[rating="4"] > .text { background: var(--bs-danger-bg-subtle); display: block !important; }
					&[rating="4"] ~ [rating="4"] > .text.d-none { display: none !important; }
					&[rating="1"] > .text { background: var(--bs-success-bg-subtle); display: block !important; }
					&[rating="1"] ~ [rating="1"] > .text.d-none { display: none !important; }

					& .summary-block-element-attribute {
						flex-wrap: nowrap;

						& .text,
						& .value span,
						& .value .value-field,
						& div.value.value-field {
							position: relative;
							background: var(--bs-white);
							z-index: 1;

							&.text { padding-right: .25cm; }
							&:not(.text) { padding-left: .25cm; }

							&:hover {
								color: var(--bs-link-hover-color) !important;
								text-decoration: underline !important;
								cursor: pointer;
							}
						}
						&.highlight {
							outline: solid;
							outline-color: rgba(var(--bs-primary-rgb), .25);
							outline-offset: 3px;
							z-index: 2;
						}
					}
				}
			}

			& .line-div-text {
				top: -1.15rem;
				font-size: 12px !important;
				font-weight: normal !important;
			}

			& .summary-input { top: -5px; }

			& .summary-check ~ .summary-input {
				top: 0 !important;
				width: calc(100% - 10px) !important;
			}

			& .summary-textarea { padding-top: 5px !important; }

			& .summary-textarea,
			& .summary-input {
				background-color: transparent;
				overflow: hidden;
				padding: 0;
				line-height: 2.085;
				resize: none;
				border: none !important;
				border-width: 0;
				border-radius: 0;
				margin: 0;
				z-index: 1;
				font-size: 12px;

				width: 100%;

				&:focus,
				&:active {
					border-width: 3px !important;
					box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25) !important;
					border-color: var(--bs-primary) !important;
					border-radius: .25rem !important;
					outline: none !important;
				}
			}
		}
	}

	/* Invalid-feedback global reset */
	/* & .invalid-feedback {
		opacity: unset;
		margin-top: unset;
		margin-right: unset;
		margin-bottom: unset;
		padding: unset;
		height: unset;

		&.hide-invalid-feedback {
			opacity: 0 !important;
			margin-top: 0 !important;
			margin-right: 0 !important;
			margin-bottom: 0 !important;
			padding: 0 !important;
			height: 0 !important;
		}
	} */

	/* Highlight helpers */
	& .carer-info-entry,
	.other-child-entry {
		&.highlight {
			border-color: var(--bs-primary);
			outline: 0;
			box-shadow: inset 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
		}
		&.other-child-entry-template {
			display: none !important;
		}
	}

	& [category-name="conclusions"] .select-form-item:not(.select-form-buttons) {
		margin-bottom: 5rem !important;
	}

	/* Factor-type header colours – light theme */
	& body[data-bs-theme="light"] {
		& .factor-type[factor-type="1"] > .factor-header { background-color: var(--bs-danger-bg-subtle); }
		& .factor-type[factor-type="2"] > .factor-header { background-color: var(--bs-success-bg-subtle); }
	}

	/* Factor-type header colours – dark theme */
	& body[data-bs-theme="dark"] {
		& .page-marker { border-color: rgba(0,0,0,.1) !important; }
		& .factor-type[factor-type="1"] > .factor-header { background-color: rgb(94,36,42); }
		& .factor-type[factor-type="2"] > .factor-header { background-color: rgb(33,72,54); }
	}

	/* Textarea modal */
	.textarea-modal {
		& .modal-dialog {
			display: flex;
			align-items: stretch;
			top: -1px;
			border: 0;

			& .modal-content {
				border: 0;

				& .modal-header,
				.modal-footer { border: 0; }
			}
		}

		& textarea {
			height: 100%;
			color: var(--bs-modal-color);
			background-color: var(--bs-modal-bg);
			border: none;
			resize: none;
		}
	}

	& .factor-header .bi.bi-info-circle-fill {
		cursor: pointer;
		margin-top: .5rem;
	}


	/* & .was-validated { */

		& .invalid-feedback {
			color: var(--bs-primary-rgb) !important;
		}

		& .form-check-input.is-invalid, .was-validated .form-check-input:invalid {
			border-color: var(--bs-primary-rgb) !important;
			& ~ .form-check-label:not() {
				color: var(--bs-secondary) !important;
			}
		}

		& .red-error .form-check-input.is-invalid, .was-validated .red-error .form-check-input:invalid {
			border-color: var(--bs-form-invalid-border-color) !important;
			& ~ .form-check-label {
				color: var(--bs-form-invalid-color) !important;
			}
		}

		/* & .was-validated { */

			& .form-control, & .form-select, & .bootstrap-select select, & .select-form-item.active {
				&.is-invalid, &:invalid, &.is-invalid + .dropdown-toggle, &:invalid + .dropdown-toggle {
					border-width: 3px !important;
					border-color: var(--bs-secondary) !important;
				}
			}

			& .red-error {
				& .form-control, & .form-select, & .bootstrap-select select, & .select-form-item.active {
					&.is-invalid, &:invalid, &.is-invalid + .dropdown-toggle, &:invalid + .dropdown-toggle {
						border-width: 3px !important;
						border-color: var(--bs-danger) !important;
					}
				}
			}

		/* } */

		.form-control.is-invalid, .was-validated .form-control:invalid {
			border-color: var(--bs-secondary) !important;
			background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%236c757d'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%236c757d' stroke='none'/%3e%3c/svg%3e");
		}

		& .was-validated .red-error {
			.form-control.is-invalid, .form-control:invalid {
				border-color: var(--bs-form-invalid-border-color);
				background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
			}
		}

		/* & .red-error {

			& .invalid-feedback {
				color: var(--bs-danger) !important;
			}

		} */

	/* } */

}
