/**

 * @file

 * Results Sorting Menu Dropdown Component

 * SMIP EC Knowledge Hub module.

 */


/* Results found count (left of Relevance sort) */
.ecl-results-tab {
  width: fit-content !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  height: 40px !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border-radius: 0 !important;
  border: none !important;
  margin-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  cursor: default !important;
  position: relative !important;
  z-index: 2 !important;
}

.ecl-results-tab--active {
  border-bottom: none !important;
}

.ecl-results-tab__label {
  font-family: var(--Font-family-inter), 'Inter', sans-serif !important;
  font-weight: 400 !important;
  font-size: 16px !important;
  line-height: 28px !important;
  letter-spacing: 0 !important;
  color: var(--On-surface-on-surface-brand, #00002E) !important;
  white-space: nowrap !important;
  display: inline-block !important;
}

.ecl-results-tab__count {
  font-weight: 400 !important;
}

/* Relevance Dropdown (Right side, NO border around trigger) */
.ecl-results-sort {
  position: relative !important;
  padding-right: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  height: 40px !important;
}

.ecl-results-sort__trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  height: 40px !important;
  gap: 8px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 4px !important;
  font-family: var(--Font-family-inter), 'Inter', sans-serif !important;
  font-size: 16px !important;
  line-height: 24px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  color: var(--ec-color-text, #00002E) !important;
  cursor: pointer !important;
  transition: color 0.15s ease !important;
}

.ecl-results-sort__trigger:hover,
.ecl-results-sort.is-open .ecl-results-sort__trigger {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--ec-color-primary, #004494) !important;
}

.ecl-results-sort__chevron {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  color: var(--ec-color-text, #00002E) !important;
  transition: transform 0.2s ease !important;
}

.ecl-results-sort__chevron svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
}

.ecl-results-sort.is-open .ecl-results-sort__chevron {
  transform: rotate(180deg) !important;
}

.ecl-sort-checkbox-menu {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  right: 0 !important;
  width: 220px !important;
  box-sizing: border-box !important;
  background: var(--ec-color-white, #FFFFFF) !important;
  border: 1px solid var(--ec-color-filter-border, #EDEDF0) !important;
  border-radius: var(--Radius-s, 4px) !important;
  box-shadow:
    0 6px 12px 0 var(--ECEffectElevation01, rgba(0, 0, 46, 0.12)),
    0 0 0.5px 0.5px var(--ECEffectElevation05, rgba(0, 0, 46, 0.18)) !important;
  padding: 16px !important;
  margin: 0 !important;
  z-index: 200 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.ecl-sort-checkbox-menu[hidden] {
  display: none !important;
}


.ecl-sort-option-label {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  cursor: pointer !important;
  user-select: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ecl-sort-option-label input.ecl-sort-radio,
.ecl-sort-option-label input.ecl-sort-checkbox {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

.ecl-sort-radio__circle {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  border: 1.5px solid var(--ec-color-text, #00002E) !important;
  border-radius: 50% !important;
  background: var(--ec-color-white, #FFFFFF) !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  transition: all 0.12s ease !important;
}

.ecl-sort-option-label input.ecl-sort-radio:checked+.ecl-sort-radio__circle,
.ecl-sort-option-label input.ecl-sort-checkbox:checked+.ecl-sort-radio__circle {
  border-color: var(--ec-color-primary, #0046FF) !important;
}

.ecl-sort-option-label input.ecl-sort-radio:checked+.ecl-sort-radio__circle::after,
.ecl-sort-option-label input.ecl-sort-checkbox:checked+.ecl-sort-radio__circle::after {
  content: '' !important;
  display: block !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: var(--ec-color-primary, #0046FF) !important;
}

.ecl-sort-checkbox__box {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  border: 1px solid var(--ec-color-text, #00002E) !important;
  border-radius: var(--Radius-xs, 2px) !important;
  background: var(--ec-color-white, #FFFFFF) !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.12s ease !important;
}

.ecl-sort-option-label input.ecl-sort-checkbox:checked+.ecl-sort-checkbox__box {
  background: var(--ec-color-primary, #0046FF) !important;
  border-color: var(--ec-color-primary, #0046FF) !important;
}

.ecl-sort-option-label input.ecl-sort-checkbox:checked+.ecl-sort-checkbox__box::after {
  content: '' !important;
  display: block !important;
  width: 4px !important;
  height: 8px !important;
  border: solid white !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) translate(-1px, -1px) !important;
}

.ecl-sort-radio__text,
.ecl-sort-checkbox__text {
  font-family: var(--Font-family-inter), 'Inter', sans-serif !important;
  font-size: 16px !important;
  line-height: 24px !important;
  color: var(--ec-color-text, #00002E) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}