﻿/* ===================== SELECT2 THEME (match your current style) ===================== */
/* Requires: select2 core css loaded first */
:root {
	--s2-text: #0f172a;
	--s2-muted: #64748b;
	--s2-border: rgba(148,163,184,.35);
	--s2-border2: rgba(148,163,184,.22);
	--s2-bg: #ffffff;
	--s2-chip-bg: rgba(15,23,42,.06);
	--s2-primary: #2563eb;
	--s2-primary2: #7c3aed;
	--s2-focus: rgba(37,99,235,.12);
	--s2-shadow: 0 14px 40px rgba(15,23,42,.08);
	--s2-shadow2: 0 22px 60px rgba(15,23,42,.14);
	--s2-radius: 2px;
	--s2-height: 30px; /* match your inputs */
}

/* Container */
.select2-container {
	width: 100% !important;
	font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

	/* ===================== SINGLE ===================== */
	.select2-container .select2-selection--single {
		height: var(--s2-height) !important;
		border: 1px solid var(--s2-border) !important;
		border-radius: var(--s2-radius) !important;
		background: var(--s2-bg) !important;
		box-shadow: none;
		transition: .18s ease;
	}

		.select2-container .select2-selection--single .select2-selection__rendered {
			line-height: calc(var(--s2-height) - 2px) !important;
			padding-left: 14px !important;
			padding-right: 44px !important;
			color: var(--s2-text) !important;
			font-weight: 800;
		}

		.select2-container .select2-selection--single .select2-selection__placeholder {
			color: var(--s2-muted) !important;
			font-weight: 700;
		}

		/* Arrow (caret) */
		.select2-container .select2-selection--single .select2-selection__arrow {
			height: var(--s2-height) !important;
			width: 44px !important;
			right: 0 !important;
		}

			.select2-container .select2-selection--single .select2-selection__arrow b {
				border-color: #94a3b8 transparent transparent transparent !important;
				border-width: 6px 5px 0 5px !important;
			}

		/* Clear button */
		.select2-container .select2-selection--single .select2-selection__clear {
			position: absolute;
			right: 42px;
			top: 50%;
			transform: translateY(-50%);
			color: #94a3b8;
			font-weight: 900;
		}

			.select2-container .select2-selection--single .select2-selection__clear:hover {
				color: var(--s2-text);
			}

/* Focus / open */
.select2-container--focus .select2-selection--single,
.select2-container--open .select2-selection--single {
	border-color: rgba(37,99,235,.55) !important;
	box-shadow: none !important;
}

/* ===================== MULTIPLE ===================== */
.select2-container .select2-selection--multiple {
	min-height: var(--s2-height) !important;
	border: 1px solid var(--s2-border) !important;
	border-radius: var(--s2-radius) !important;
	background: var(--s2-bg) !important;
	padding: 6px 10px !important;
	box-shadow: none;
	transition: .18s ease;
}

.select2-container--focus .select2-selection--multiple,
.select2-container--open .select2-selection--multiple {
	border-color: rgba(37,99,235,.55) !important;
	box-shadow: none !important;
}

/* Chips */
.select2-container .select2-selection--multiple .select2-selection__choice {
	border: 1px solid var(--s2-border2) !important;
	background: var(--s2-chip-bg) !important;
	border-radius: 999px !important;
	padding: 4px 10px !important;
	margin-top: 6px !important;
	margin-right: 6px !important;
	color: var(--s2-text) !important;
	font-weight: 900 !important;
}

.select2-container .select2-selection--multiple .select2-selection__choice__remove {
	margin-right: 6px !important;
	border-right: 0 !important;
	color: #64748b !important;
	font-weight: 900 !important;
}

	.select2-container .select2-selection--multiple .select2-selection__choice__remove:hover {
		color: #ef4444 !important;
		background: transparent !important;
	}

/* Input inside multiple */
.select2-container .select2-selection--multiple .select2-search__field {
	margin-top: 6px !important;
	color: var(--s2-text) !important;
	font-weight: 800 !important;
}

/* ===================== DROPDOWN ===================== */
.select2-dropdown {
	border: 1px solid var(--s2-border2) !important;
	border-radius: 18px !important;
	overflow: hidden !important;
	background: rgba(255,255,255,.96) !important;
	box-shadow: none !important;
}

/* Search box in dropdown */
.select2-search--dropdown {
	padding: 10px 12px !important;
	border-bottom: 1px solid rgba(148,163,184,.18) !important;
	background: rgba(255,255,255,.75);
}

	.select2-search--dropdown .select2-search__field {
		border: 1px solid var(--s2-border) !important;
		border-radius: 5px !important;
		padding: 5px 12px !important;
		outline: none !important;
		font-weight: 800 !important;
		color: var(--s2-text) !important;
	}

		.select2-search--dropdown .select2-search__field:focus {
			border-color: rgba(37,99,235,.55) !important;
			box-shadow: none !important;
		}

/* Options list */
.select2-results__options {
	padding: 6px !important;
}

/* Option */
.select2-results__option {
	border-radius: 14px !important;
	padding: 10px 12px !important;
	font-weight: 800 !important;
	color: var(--s2-text) !important;
}

/* Hover */
.select2-results__option--highlighted.select2-results__option--selectable {
	background: rgba(37,99,235,.08) !important;
	color: var(--s2-text) !important;
}

/* Selected */
.select2-results__option--selected {
	background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.12)) !important;
	color: var(--s2-text) !important;
	font-weight: 900 !important;
}

/* Disabled option */
.select2-results__option--disabled {
	color: rgba(100,116,139,.7) !important;
}

/* ===================== DISABLED ===================== */
.select2-container--disabled .select2-selection--single,
.select2-container--disabled .select2-selection--multiple {
	background: rgba(148,163,184,.12) !important;
	border-color: rgba(148,163,184,.25) !important;
	box-shadow: none !important;
	cursor: not-allowed !important;
}

.select2-container--disabled .select2-selection__rendered {
	color: rgba(100,116,139,.9) !important;
}

/* ===================== VALIDATION STATES (optional) ===================== */
/* Wrap select2 with .is-invalid-s2 or .is-valid-s2 on parent */
.is-invalid-s2 .select2-container .select2-selection {
	border-color: rgba(239,68,68,.55) !important;
	box-shadow: none !important;
}

.is-valid-s2 .select2-container .select2-selection {
	border-color: rgba(16,185,129,.55) !important;
	box-shadow: none !important;
}

/* ===================== SMALL SIZE (optional) ===================== */
.select2-sm + .select2-container .select2-selection--single {
	height: 40px !important;
}

	.select2-sm + .select2-container .select2-selection--single .select2-selection__rendered {
		line-height: 38px !important;
	}

	.select2-sm + .select2-container .select2-selection--single .select2-selection__arrow {
		height: 40px !important;
	}

/* ===================== FIX: Bootstrap 5 btn/line-height issues ===================== */
.select2-container .select2-selection__rendered {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ===================== SELECT2: REMOVE BOX-SHADOW ===================== */
