/* Rolovací seznamy – vzhled shodný se spotrebice (form-select-custom + select2 v barvách GB). */

.select2-container { width: 100% !important; }

/* jednovýběrový select2 vypadá jako Bootstrap .form-select */
.select2-container--default .select2-selection--single {
	height: calc(1.5em + .75rem + 2px);
	border: 1px solid var(--border-color, #dee2e6);
	border-radius: .375rem;
	display: flex;
	align-items: center;
	background-color: #fff;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
	color: var(--dark-color, #333);
	padding-left: .75rem;
	padding-right: 2.25rem;
	line-height: 1.5;
	width: 100%;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #5c636a; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; right: .5rem; }
/* select2 4.1.0: křížek je tlačítko PŘED textem (v rc.0 byl uvnitř) → v flex řádku ho posunout doprava k šipce */
.select2-container--default .select2-selection--single .select2-selection__rendered { order: 1; flex: 1 1 auto; min-width: 0; }
.select2-container--default .select2-selection--single .select2-selection__clear {
	order: 2; float: none; height: auto; margin: 0 1.75rem 0 0; padding: 0 .25rem; color: #777; font-size: 1.1em; line-height: 1;
}
.select2-container--default .select2-selection--single .select2-selection__clear + .select2-selection__rendered { padding-right: .25rem; }
.form-select-sm + .select2-container .select2-selection--single,
.input-group-sm .select2-selection--single { height: calc(1.5em + .5rem + 2px); font-size: .875rem; }

/* vícevýběr – přesně jako spotrebice Protokoly/create */
.select2-container--default .select2-selection--multiple {
	border: 1px solid var(--border-color, #dee2e6) !important;
	border-radius: .375rem !important;
	min-height: calc(1.5em + .75rem + 2px) !important;
	padding: 2px 4px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
	background-color: #9e262d !important;
	border: none !important;
	border-radius: 4px !important;
	color: #fff !important;
	padding: 2px 8px !important;
	margin: 3px !important;
	font-size: 12px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
	color: rgba(255,255,255,.8) !important;
	border-right-color: rgba(255,255,255,.3) !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { color: #fff !important; background: transparent !important; }

/* fokus stejně jako .form-select:focus v layoutu */
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default .select2-selection--single:focus {
	border-color: #9e262d !important;
	box-shadow: 0 0 0 .2rem rgba(158, 38, 45, .25) !important;
	outline: 0;
}

.select2-dropdown {
	border: 1px solid #dee2e6 !important;
	border-radius: 8px !important;
	box-shadow: 0 4px 12px rgba(0,0,0,.15) !important;
	overflow: hidden;
	z-index: 1060; /* nad Bootstrap modálem */
}
.select2-search--dropdown .select2-search__field { border-radius: 6px; border-color: #dee2e6; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
	background-color: #9e262d !important;
	color: #fff !important;
}
.select2-container--default .select2-results__option[aria-selected=true],
.select2-container--default .select2-results__option--selected { background-color: rgba(158, 38, 45, .1); color: #9e262d; }
.select2-results__option { font-size: .9rem; }

/* chybějící / neplatné pole (forms.js validace před odesláním) */
.select2-container.is-invalid .select2-selection { border-color: #dc3545 !important; box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .2) !important; }
.js-form-errors li:hover { text-decoration: underline; }
