/* Select2 Picker Consolidated Styles — aligned to the DeHart design tokens
   (hairline borders, 8/11px radii, Action Blue focus, overlay shadow) */

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

.select2-container--default .select2-selection--single {
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-color, #e0e0e0);
  height: 48px;
  display: flex;
  align-items: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  padding: 0;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--primary-light, #0071e3);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 48px;
  padding-left: 15px;
  display: flex;
  align-items: center;
  height: 48px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-color, #1d1d1f);
  background: none;
  font-weight: 400;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 1.2em;
  color: var(--text-light, #6e6e73);
  margin-left: 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.18s ease, color 0.18s ease;
}
.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  opacity: 1;
  color: var(--text-color, #1d1d1f);
}

/* Dropdown panel — floating UI gets the overlay shadow */
.select2-dropdown {
  border-radius: var(--radius-md, 11px);
  border: 1px solid var(--border-color, #e0e0e0);
  box-shadow: var(--shadow-overlay, 0 10px 40px rgba(0, 0, 0, 0.12));
  animation: fadeIn 0.18s ease;
  overflow: hidden;
}

.select2-search--dropdown .select2-search__field {
  padding: 8px 12px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: var(--radius-sm, 8px);
  outline: none;
}

.select2-search--dropdown .select2-search__field:focus {
  border-color: var(--primary-light, #0071e3);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

/* Options */
.select2-container--default .select2-results__option {
  padding: 8px 12px;
  line-height: 1.4;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--bg-surface, #f5f5f7);
  color: var(--text-color, #1d1d1f);
}

.select2-container--default .select2-results__option[aria-selected=true] {
  background-color: var(--bg-surface, #f5f5f7);
}

/* Result rows */
.select2-result-event,
.select2-result-person {
  padding: 5px 0;
}

.select2-result-event .event-name,
.select2-result-person .person-name {
  font-weight: 600;
  color: var(--text-color, #1d1d1f);
}

.select2-result-event .event-date,
.select2-result-person .person-years {
  font-size: 0.85rem;
  color: var(--text-light, #6e6e73);
}

/* "Search by year" escape hatch at the top of the events dropdown —
   reads as a text link, fills Action Blue when highlighted */
.events-page-option {
  padding: 10px 12px;
  color: var(--primary-color, #0066cc);
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] .events-page-option {
  background-color: var(--primary-color, #0066cc);
  color: #fff;
}
