input::-moz-input-placeholder {
	color: var(--color-neutral-500);
	font-size: 0.875rem;
	opacity: 1;
}

input::placeholder {
	color: var(--color-neutral-500);
	font-size: 0.875rem;
	opacity: 1;
}

[data-theme="dark"] {
	::-moz-input-placeholder {
		color: var(--color-neutral-400);
		font-size: 0.875rem;
	}

	::placeholder {
		color: var(--color-neutral-400);
		font-size: 0.875rem;
	}
}

.c-custom-select {
	-moz-appearance: none;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 0.625rem 0.875rem;
	padding-right: calc(0.875rem * 3);
	padding-inline-end: calc(0.875rem * 3);
	font: inherit;
	color: var(--body-text-color);
	color: inherit;
	line-height: 1.3;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow-xs);
	background-color: var(--body-background-color);
	background-image: url("data:image/svg+xml,%3Csvg width='20' height='21' viewBox='0 0 20 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.60938L10 12.6094L15 7.60938' stroke='%23667085' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"),
		linear-gradient(
			to bottom,
			var(--body-background-color) 0%,
			var(--body-background-color) 100%
		);
	background-repeat: no-repeat, repeat;
	background-position:
		right calc(0.875rem * 1.5) top 50%,
		0 0;
	background-size:
		1em auto,
		100%;
}

.label__text.label__text {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-family: var(--text-font);
	color: var(--label-text-color);
	font-weight: 400;
	line-height: 1.5;
	margin-bottom: 0.25rem;
	margin-block-end: 0.25rem;
}

input {
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	padding: 0.625rem 0.875rem;
	font: inherit;
	font-size: 1rem;
	display: block;
	min-width: 0;

	// width: 100%;
	max-width: 100%;
	background-color: var(--body-background-color);
	color: inherit;
}

.c-field {
	display: block;
	margin-bottom: 1rem;
	margin-block-end: 1rem;
	flex: 1 1 130px;
}

.c-field-group {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
}

/************************************************************************************** \
 *
 * Multi-select dropdown
 *
 **************************************************************************************/

.combo {
	display: block;
	position: relative;

	// margin-bottom: 1rem;
	// margin-block-end: 1rem;
}

.combo-input {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	-moz-appearance: none;
	-webkit-appearance: none;
	appearance: none;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg width='13' height='8' viewBox='0 0 13 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2.10001 0.299997L0.700012 1.7L6.70001 7.7L12.7 1.7L11.3 0.299996L6.70001 4.9L2.10001 0.299997Z' fill='%23444D56'/%3E%3C/svg%3E%0A"),
		linear-gradient(
			to bottom,
			var(--body-background-color) 0%,
			var(--body-background-color) 100%
		);
	background-repeat: no-repeat, repeat;
	background-position:
		right 1rem top 50%,
		0 0;
	background-size:
		0.65em auto,
		100%;
	padding: 0.625rem 0.875rem;
	padding-right: calc(0.875rem * 3);
	padding-inline-end: calc(0.875rem * 3);
	box-shadow: var(--shadow-xs);

	&::-ms-expand {
		display: none;

		@media screen and (-ms-high-contrast: active) {
			display: block;
		}
	}
}

.open .combo-input {
	border-radius: var(--border-radius);
}

.combo-label {
	display: block;
}

.combo-menu {
	box-shadow: var(--shadow-lg);
	background-color: var(--body-background-color);
	border: 1px solid var(--divider-color);
	border-radius: 4px;
	display: none;
	max-height: 300px;
	overflow-y: scroll;
	left: 0;
	position: absolute;
	top: calc(100% + 0.25rem);
	width: 100%;
	z-index: 100;
}

.open .combo-menu {
	display: block;
}

.combo-option {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	position: relative;
	z-index: 2;
	padding: 0.5rem;
	cursor: pointer;
	color: var(--body-text-color);

	&:hover,
	&.option-current {
		background-color: var(--color-primary-700);
		color: #fff;
	}

	&[aria-selected="true"] {
		background-color: var(--lightest-background-color);

		&:hover,
		&.option-current {
			background-color: var(--color-primary-700);
			color: #fff;
		}
	}
}

// styles for the SVG checkbox inside each option
.combo-option svg {
	border-radius: 2px;
	width: 1.25em;
	height: 1.25em;
	margin-right: var(--spacing-2);
	color: var(--lightest-background-color);
	fill: none;
}

.combo-option[aria-selected="true"] svg {
	fill: var(--lightest-background-color);
	color: var(--link-color);
}

// styles for the selected options in the form of pills
ul.selected-options {
	list-style-type: none;
	margin: 0;
	padding: 0.5rem 0 0.25rem;
	display: flex;
	flex-wrap: wrap;

	&:empty {
		padding: 0;
	}
}

.remove-option {
	display: inline-flex;
	font-size: var(--step--1);
	align-items: center;
	padding: 0.25rem 0.5rem;
	color: var(--headings-color);
	border: 1px solid var(--divider-color);
	background: var(--lighter-background-color);
	border-radius: 4px;
	cursor: pointer;
	margin: 0 0.25rem 0.25rem 0;

	svg {
		margin-left: 0.25rem;
		margin-inline-start: 0.25rem;
	}
}

/* CUSTOM CHECKBOX STYLES */
.c-checkbox {
	cursor: pointer;
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	position: relative;
	margin-bottom: 0.5rem;
	margin-block-end: 0.5rem;

	.label__text {
		margin: 0;
	}
}

// hide the checkbox accessibly
.c-checkbox input[type="checkbox"] {
	position: absolute;
	width: 1em;
	height: 1em;
	opacity: 0;
	left: 0;
	offset-inline-start: 0;
}

// basic styles for the svg
.c-checkbox__icon {
	margin-right: 0.5rem;
	margin-inline-end: 0.5rem;

	* {
		transition: all 0.1s linear;
	}

	.cm {
		stroke: transparent;
	}
}

.c-checkbox input[type="checkbox"]:checked ~ .c-checkbox__icon {
	.cm {
		stroke: var(--link-color);
	}

	.border {
		stroke: var(--link-color);
	}
}

.c-checkbox input[type="checkbox"]:focus ~ .c-checkbox__icon {
	outline: 2px solid transparent;
	outline-offset: 3px;
}

.js-focus-visible
	.c-checkbox
	input[type="checkbox"]:focus:not(.focus-visible)
	~ .c-checkbox__icon {
	outline: 2px solid transparent;
	outline-offset: 3px;
}

.c-checkbox
	input[type="checkbox"]:focus:not(:focus-visible)
	~ .c-checkbox__icon {
	outline: 2px solid transparent;
	outline-offset: 3px;
}

.c-checkbox input[type="checkbox"].focus-visible ~ .c-checkbox__icon {
	outline: 2px solid var(--outline-color);
	outline-offset: 3px;
}

.c-checkbox input[type="checkbox"]:focus-visible ~ .c-checkbox__icon {
	outline: 2px solid var(--outline-color);
	outline-offset: 3px;
}

/* WHCM styles */
.c-checkbox svg {
	@media screen and (-ms-high-contrast: active) {
		.cm {
			stroke: transparent;
		}

		.border {
			stroke: windowText;
		}
	}
}

@media screen and (-ms-high-contrast: active) {
	.c-checkbox input[type="checkbox"]:checked ~ .c-checkbox__icon {
		.cm {
			stroke: highlight;
		}

		.border {
			stroke: highlight;
		}
	}
}
