/**
 * @file
 * WHO Track Select Enhancer styles.
 */

/* Style the Chosen dropdowns */
.chosen-container {
  width: 100% !important;
}

.chosen-container-multi .chosen-choices {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px;
}

.chosen-container-multi .chosen-choices li.search-choice {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 5px 25px 5px 8px;  /* Increased right padding to make room for the close button */
  margin-right: 5px;
  margin-top: 5px;
  position: relative;  /* Ensure proper positioning of the close button */
  min-width: 80px;  /* Ensure minimum width for the selection item */
}

/* Position the close button properly */
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.chosen-container .chosen-results li.highlighted {
  background-color: #007bff;
}

.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
  min-width: 150px;
}

.chosen-container .chosen-drop {
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Increase the height of the select boxes */
#edit-tid, #edit-field-keywords-target-id-1 {
  min-height: 200px;
}

/* Put Meeting Type and Keywords fields in the same row */
.views-exposed-form .form-item-tid,
.views-exposed-form .form-item-field-keywords-target-id-1 {
  display: inline-block;
  vertical-align: top;
  clear: none;
  width: 48%;
}

.views-exposed-form .form-item-tid {
  margin-right: 2%;
}

/* Fix the display of taxonomy terms in the select element */
.chosen-container .chosen-results li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ensure parent terms are bold */
.chosen-container .chosen-results li.group-result {
  font-weight: bold;
  color: #333;
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
}

/* Style child terms */
.chosen-container .chosen-results li.group-option {
  padding-left: 20px;
}

/* Fix the display of taxonomy terms in the select element */
select option {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ensure parent terms are bold */
select option[value="1907"],
select option[value="1908"],
select option[value="1911"] {
  font-weight: bold;
  color: #333;
  background-color: #f8f9fa;
}

/* Style child terms */
select option[value="1902"],
select option[value="1903"],
select option[value="1904"],
select option[value="1905"],
select option[value="1906"],
select option[value="1909"],
select option[value="1910"],
select option[value="1912"],
select option[value="1913"],
select option[value="1914"],
select option[value="1915"],
select option[value="1916"],
select option[value="1917"] {
  padding-left: 20px;
}
