.ts-select {
	--ts-select-height: 48px;
	--ts-select-padding: 12px 16px;
	--ts-select-radius: 12px;
	--ts-select-border: #2a2622;
	--ts-select-border-active: #63350d;
	--ts-select-bg: linear-gradient(
		178deg,
		rgba(28, 21, 13, 0.4) 0%,
		rgba(22, 17, 11, 0.4) 100%
	);
	--ts-select-text: #f6efe6;
	--ts-select-muted: #b7ac9d;
	--ts-select-placeholder: #605a51;
	--ts-select-accent: #f3981f;
	--ts-select-danger: #ff7a6b;
	--ts-select-list-bg: #14100a;
	--ts-select-font-size: 14px;

	position: relative;
}

.ts-select__native {
	width: 100%;
	min-height: var(--ts-select-height);
	padding: var(--ts-select-padding);
	padding-right: 44px;
	border: 1px solid var(--ts-select-border);
	border-radius: var(--ts-select-radius);
	background: var(--ts-select-bg);
	color: var(--ts-select-text);
	font: inherit;
	font-size: var(--ts-select-font-size);
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.ts-select__chevron {
	position: absolute;
	top: 50%;
	right: 16px;
	color: var(--ts-select-muted);
	pointer-events: none;
	transform: translateY(-50%);
}

.ts-select.is-enhanced .ts-select__native {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 1px;
	min-height: 0;
	height: 1px;
	padding: 0;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

.ts-select__button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: var(--ts-select-height);
	padding: var(--ts-select-padding);
	border: 1px solid var(--ts-select-border);
	border-radius: var(--ts-select-radius);
	background: var(--ts-select-bg);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	color: var(--ts-select-text);
	font-family: inherit;
	font-size: var(--ts-select-font-size);
	line-height: 1.5;
	text-align: left;
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.ts-select__button:focus-visible {
	border-color: var(--ts-select-border-active);
	box-shadow: 0 0 0 3px rgba(243, 152, 31, 0.12);
	outline: none;
}

.ts-select.is-open .ts-select__button {
	border-color: var(--ts-select-border-active);
}

.ts-select.is-invalid .ts-select__button,
.ts-select__button[aria-invalid="true"] {
	border-color: var(--ts-select-danger);
}

.ts-select__value {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ts-select__value.is-placeholder {
	color: var(--ts-select-placeholder);
}

.ts-select__button .ts-select__chevron {
	position: static;
	flex: none;
	transform: none;
	transition: transform 0.2s ease;
}

.ts-select.is-open .ts-select__chevron {
	transform: rotate(180deg);
}

.ts-select__popup {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	left: 0;
	z-index: 5;
	padding: 6px;
	border: 1px solid var(--ts-select-border);
	border-radius: var(--ts-select-radius);
	background: var(--ts-select-list-bg);
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8);
}

.ts-select__search {
	width: 100%;
	margin-bottom: 6px;
	padding: 10px 12px;
	border: 1px solid var(--ts-select-border);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--ts-select-text);
	font: inherit;
	font-size: var(--ts-select-font-size);
}

.ts-select__search:focus {
	border-color: var(--ts-select-border-active);
	outline: none;
}

.ts-select__list {
	max-height: 260px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.ts-select__list:focus {
	outline: none;
}

.ts-select__option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--ts-select-muted);
	font-size: var(--ts-select-font-size);
	line-height: 1.4;
	cursor: pointer;
}

.ts-select__option[hidden] {
	display: none;
}

.ts-select__option.is-active {
	background: rgba(243, 152, 31, 0.1);
	color: var(--ts-select-text);
}

.ts-select__flag {
	display: inline-flex;
	flex: none;
	width: 21px;
	height: 14px;
	border-radius: 3px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ts-select__flag svg {
	display: block;
	width: 100%;
	height: 100%;
}

.ts-select__flag:empty {
	background: rgba(255, 255, 255, 0.06);
}

.ts-select__button .ts-select__flag:empty {
	display: none;
}

.ts-select__empty {
	margin: 0;
	padding: 10px 12px;
	color: var(--ts-select-placeholder);
	font-size: var(--ts-select-font-size);
}

.ts-select__option.is-selected {
	color: var(--ts-select-accent);
}
