/* AIroda select2 / DAL form alignment */

/* data-width="100%" a widget attrs-ban gondoskodik a JS-oldali szélességről;
   ez a CSS-szabály a fallback és a téma-konzisztencia biztosítása. */
.select2-container {
  width: 100% !important;
  min-width: 0 !important;
  display: block;
}

.select2-container--default,
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  font-size: 0.8rem;
}

.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
  min-height: calc(2.375rem + 2px);
  background-color: var(--bg-card-soft, #fff);
  border: 1px solid rgba(148, 163, 184, 0.7);
  border-radius: 0.7rem;
  color: var(--text-main, #111827);
  padding: 0.45rem 0.7rem;
  font-size: 0.95rem;
  display: block;
  position: relative;
  box-sizing: border-box;
  align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  color: inherit;
  line-height: 1.4;
  padding-left: 0.25rem;
  padding-right: 2rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: var(--text-muted, #6b7280) transparent transparent transparent;
}

.select2-container--default .select2-selection--single::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.85rem;
  /*width: 0.65rem;*/
  /*height: 0.45rem;*/
  transform: translateY(-30%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
  opacity: 0.8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%236b7280' d='M1 0l4 4 4-4 1 1-5 5L0 1z'/%3E%3C/svg%3E");
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
  outline: none;
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 1px var(--accent-soft, rgba(37, 99, 235, 0.2)), 0 0 0 3px rgba(37, 99, 235, 0.15);
  background-color: #ffffff;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  color: var(--text-main, #111827);
  padding: 0.15rem 0.5rem;
  margin-top: 0.15rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--text-muted, #6b7280);
  margin-right: 0.35rem;
}

.select2-container--default.select2-container--disabled .select2-selection--single,
.select2-container--default.select2-container--disabled .select2-selection--multiple {
  background-color: rgba(148, 163, 184, 0.12);
  color: var(--text-muted, #6b7280);
  cursor: not-allowed;
}

.select2-dropdown {
  border-color: rgba(148, 163, 184, 0.7);
  border-radius: 0.7rem;
  overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--accent, #2563eb);
  color: #ffffff;
}

.select2-container--default .select2-search--dropdown .select2-search__field,
.select2-container--default .select2-search--inline .select2-search__field {
  border: 1px solid rgba(148, 163, 184, 0.7);
  border-radius: 0.5rem;
  padding: 0.35rem 0.5rem;
  color: var(--text-main, #111827);
  background-color: var(--bg-card-soft, #fff);
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus,
.select2-container--default .select2-search--inline .select2-search__field:focus {
  outline: none;
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 1px var(--accent-soft, rgba(37, 99, 235, 0.2));
}

