/* Accessible Tab Focus */
.tab-accessible {
	& :is(*, button, img, input):focus {
		border: 2px dashed white !important;
		outline-offset: 0px !important;
		outline: 2px dashed black !important;
		opacity: 1 !important;
		text-decoration: underline !important;
	}
}

/* Fallback for browsers that keep the gradient text fill from .filled. */
body.contrast .filled,
body.contrast-accessible .filled {
	background: none !important;
	background-image: none !important;
	background-clip: initial !important;
	-webkit-background-clip: initial !important;
	color: #ffff00 !important;
	-webkit-text-fill-color: #ffff00 !important;
}

/* High Contrast Themes */
body {
	/* Shared styles for .contrast and .contrast-accessible */
	&:is(.contrast, .contrast-accessible) {
		/* Keep black high-contrast canvas */
		background: #000 !important;
		color: #fff !important;

		--text-color: #fff;
		--hover-color: #00ffff;

		/* Form Placeholders & Inputs */
		& :is(input, textarea)::placeholder {
			color: #fff !important;
			opacity: 1 !important;
		}

		& :is(a, button, input, select, textarea) {
			color: #fff !important;
		}

		/* Career Form Controls */
		& .career-form-card {
			color: #fff !important;

			& :is(
				input[type='text'],
				input[type='email'],
				input[type='tel'],
				input[type='file'],
				textarea,
				select
			) {
				background: #000 !important;
				color: #fff !important;
				border-color: #fff !important;
				caret-color: #fff !important;
			}

			& :is(input, textarea, select)::placeholder {
				color: #fff !important;
				opacity: 1 !important;
			}

			& :is(label, .career-form-file-label, .wpcf7-list-item-label) {
				color: #fff !important;
			}

			& .career-form-file {
				background: #000 !important;
				color: #fff !important;
				border-color: #fff !important;
			}

			& .career-form-checkboxes input[type='checkbox'] {
				appearance: none !important;
				width: 20px;
				height: 20px;
				background: #000 !important;
				border: 2px solid #fff !important;
				color: #fff !important;
			}

			& .career-form-checkboxes input[type='checkbox']:checked {
				background: #ffff00 !important;
				border-color: #ffff00 !important;
			}

			& .career-form-checkboxes input[type='checkbox']:checked::after {
				border-color: #000 !important;
			}

			& :is(input, textarea, select, .career-form-file):focus-visible {
				outline: 3px solid #ffff00 !important;
				outline-offset: 3px;
			}

			& :is(.wpcf7-not-valid-tip, .wpcf7-response-output) {
				color: #ff8080 !important;
				border-color: #ff8080 !important;
			}
		}

		/* Buttons */
		& :is(.button, .button-wrap) {
			background: #000 !important;
			color: #fff !important;
			box-shadow: none;

			&.transparent {
				background: #000 !important;
				border: 2px solid #fff;
				color: #fff !important;
			}
		}

		/* Highlight Text */
		& .filled {
			background: none !important;
			background-image: none !important;
			background-clip: initial !important;
			-webkit-background-clip: initial !important;
			color: #ffff00 !important;
			-webkit-text-fill-color: #ffff00 !important;
		}

		/* Filters & Select2 Elements */
		&
			:is(
				.filter-row,
				.filter-form-container :is(input, select),
				.select2-container :is(.select2-selection--single, .select2-results),
				.select2-results > .select2-results__options
			) {
			background: #000 !important;
			color: #fff !important;
			border-color: #808080 !important;
		}

		& :is(.filter-form-header, .filter-row .rounded-or, .select2-results__option) {
			color: #fff !important;
		}

		/* Cards, Banners, & Footer Containers */
		&
			:is(
				.squares-container .square-block,
				.peoples-swiper .people-block,
				.home .banner-container,
				.contact-form-footer
			) {
			background: #000 !important;
			color: #fff !important;
			box-shadow: none;
		}

		/* Text & Headings */
		& :is(.square-text, .people-position, .people-description, .contact-form-footer :is(h2, h3, a)) {
			color: #fff !important;
		}

		& .square-title {
			color: #ffff00 !important;
		}

		/* Home Category Items */
		& .home .category-item {
			background-color: #000 !important;
			background-image: none !important;

			&::after {
				display: none;
			}

			& .category-name {
				color: #ffff00 !important;
			}
		}
	}

	/* Contrast-Accessible Specific Styles */
	&.contrast-accessible {
		& :is(.thanx-container, .filter-row, .career-form-card, .job-card) {
			background: #000 !important;
			box-shadow: none;
		}

		& :is(.thanx-content h1, .thanx-subtitle, .filter-container .design-row :is(h1, h2)) {
			color: #ffff00 !important;
		}

		& :focus-visible {
			outline: 3px solid #ffff00 !important;
			outline-offset: 3px;
		}
	}
}
