.ct-option-select {
	display: flex;
	position: relative;
	width: 210px;
}

// Select input
.ct-select-input {
	position: relative;
	width: 100%;

	input {
		display: flex;
		align-items: center;
		cursor: pointer;
		font-size: 13px;
		color: #555d66;
		width: inherit;
		height: var(--input-height, 30px);
		margin: 0;
		padding-block: 0;
		padding-inline-end: 20px;
		padding-inline-start: 8px;
		border: 1px solid var(--optionBorderColor);
		border-radius: var(--ui-border-radius, 3px);
		text-overflow: ellipsis;
		transition: box-shadow 0.1s linear, border-color 0.1s linear;

		&::-moz-placeholder {
			line-height: 26px;
		}

		&[readonly] {
			background-color: #fff;
		}

		&:not([disabled]) {
			
			&:hover {
				border-color: var(--ui-accent-color);
			}
		}

		&:focus {
			outline: none;
			border-color: var(--ui-accent-color);
			box-shadow: 0 0 0 1px var(--ui-accent-color);
		}
	}

	&[aria-expanded='true'] {
		input {
			border-color: var(--ui-accent-color);
		}

		&:after {
			transform: rotate(90deg);
		}
	}

	&:after {
		position: absolute;
		content: '';
		pointer-events: none;
	}

	&:after {
		font: 400 10px/10px dashicons;
		content: '\f341';
		width: 10px;
		height: 10px;
		top: calc(50% - 5px);
		inset-inline-end: 8px;
		transform: rotate(-90deg);
	}

	&:before {
		position: absolute;
		visibility: hidden;
		width: 0;
		height: 0;
	}
}

// Select dropdown
.ct-select-dropdown {
	z-index: 999999;
	max-height: 228px;
	overflow-y: scroll;
	font-size: 12px;
	line-height: 1.5;
	color: #555d66;
	background: #fff;
	border-radius: 3px;
	box-sizing: border-box;
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.08),
				0px 0px 1px 1px rgba(0, 0, 0, 0.02);
	width: var(--x-select-dropdown-width, 100%);
	inset-inline-end: var(--modal-x-offset);

	&[data-position='bottom'] {
		top: calc(var(--modal-y-offset) + var(--modal-y-offset-plus, 7px));
	}

	&[data-position='top'] {
		bottom: calc(var(--modal-y-offset) + var(--modal-y-offset-plus, 7px));
	}

	&.ct-fixed {
		position: fixed;
		--x-select-dropdown-width: 250px;
	}

	&:not(.ct-fixed) {
		position: absolute;
		margin-top: 7px;
		margin-bottom: 20px;
		top: 100%;
		inset-inline-end: var(--x-select-dropdown-right, initial);
	}

	.ct-select-no-results,
	.ct-select-dropdown-item,
	.ct-select-dropdown-group {
		display: flex;
		align-items: center;
		text-align: left;
		min-height: 38px;
		margin: -1px 0 0 0;
		user-select: none;
		padding: 5px 8px !important;
		border-top: 1px dashed #eee;
		box-sizing: border-box;
	}

	.ct-select-dropdown-item {
		cursor: pointer;
		position: relative;
		overflow: hidden;

		&.active {
			color: #272727;
			background: rgba(0, 0, 0, 0.02);
		}

		&.selected {
			color: var(--ui-accent-color);
			font-weight: 500;

			&:after {
				position: absolute;
				content: '\f147';
				font-family: dashicons;
				font-size: 13px;
				top: 10px;
				inset-inline-end: 6px;
			}
		}
	}

	.ct-select-dropdown-group {
		font-size: 12px;
		font-weight: 600;
		background: #f7f7f7;

		~ .ct-select-dropdown-item {
			padding-inline-start: 20px !important;
		}
	}

	.ct-select-no-results {
		border-bottom: none;
	}
}