/* =========================
   FILTER WRAPPER
========================= */

.research-filter-wrapper {
  width: 100%;
}

.research-top-filters {
  background: #ffffff;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 40px;
  box-shadow: 0px 4px 30px 0px rgba(0, 0, 0, 0.06);
}

.research-top-filters .research-filter-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 16px;
  margin-inline: -8px;
}

/* =========================
   KEYWORD INPUT
========================= */
.research-top-filters .search-field-wrapper {
  position: relative;
  flex: 0 0 calc(40% - 125px);
  max-width: calc(40% - 125px);
  padding-inline: 8px;
}

.research-top-filters .search-field-wrapper .search-icon {
  position: absolute;
  width: 16px;
  height: 24px;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
}

.research_keyword {
  height: 50px;
  background: #fff;
  padding: 0 24px 0 38px;
  font-size: 16px;
  color: #1e2b4a;
  outline: none;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
}

.research_keyword::placeholder {
  color: #1e2b4a;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  opacity: 0.7;
}

/* =========================
   SELECT2 WRAPPER
========================= */
.research-top-filters .custom-select-wrapper {
  height: 50px;
  flex: 0 0 20%;
  max-width: 20%;
  padding-inline: 8px;
}

.research-top-filters .select2-container {
  height: 50px;
}

.research-top-filters .select2-container--default .selection {
  width: 100%;
  height: 50px;
}

.research-top-filters .select2-container--default .select2-selection--multiple,
.research-top-filters .select2-container--default .select2-selection--single {
  height: 50px;
  border: none;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  padding: 10px 45px 10px 10px;
  display: flex;
  align-items: center;
  background: #fff;
  position: relative;
  cursor: pointer;
}

.research-top-filters .select2-container--focus .select2-selection--single,
.research-top-filters .select2-container--focus .select2-selection--multiple,
.research-top-filters .select2-container--default .select2-selection--single[aria-expanded="true"],
.research-top-filters .select2-container--default .select2-selection--multiple[aria-expanded="true"] {
  border-color: var(--primaryColor) !important;
  outline: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0;
  margin: 0;
  width: auto;
  display: flex;
  gap: 5px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 4px;
}

/* =========================
   PLACEHOLDER
========================= */

.select2-container--default .select2-selection--multiple .select2-selection__placeholder,
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #1e2b4a;
  font-size: 16px;
  margin-top: 0;
  line-height: 1.1;
  font-family: "Inter", sans-serif;
  opacity: 0.7;
}

.select2-container--default .select2-search--inline .select2-search__field::placeholder {
  color: #1e2b4a;
  font-size: 16px;
  line-height: 1.2;
  font-family: "Inter", sans-serif;
  opacity: 0.7;
}

/* =========================
   SELECTED TAGS
========================= */

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--e-global-color-primary);
  border: none;
  color: #fff;
  padding: 0 13px 0 5px;
  border-radius: 4px;
  font-size: 12px;
  margin: 0;
}

.select2-selection__choice__display {
  width: 100%;
  overflow-x: clip;
  text-overflow: ellipsis;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: #fff;
  background: transparent !important;
  outline: none;
  margin: 0;
  border: none !important;
  top: calc(50% - 1px);
  font-size: 16px;
  left: auto;
  right: 0;
  transform: translateY(-50%);
  font-weight: normal;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  background-color: transparent;
  color: #fff;
}

/* =========================
   SEARCH FIELD INSIDE SELECT2
========================= */

.select2-container--default .select2-search--inline .select2-search__field {
  margin-top: 4px;
  font-size: 16px;
  margin-left: 0;
  line-height: 1.1;
  height: 20px;
}

.select2-container--default .more-count {
  margin: 0;
  font-size: 16px;
}

/* =========================
   DROPDOWN ARROW
========================= */

.select2-container--default .select2-selection::after {
  /* font-family: "FontAwesome";
	content:"\f107";
	position:absolute;
	right:18px;
	top:50%;
	transform:translateY(-50%);
	font-size:20px;
	color:#1e2b4a;
	pointer-events:none; */

  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #555;
  border-bottom: 1.5px solid #555;
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.2s ease;
}

.research-top-filters .select2-container--default .select2-selection__arrow {
  display: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__clear {
  display: none;
}

/* =========================
   SEARCH BUTTON
========================= */

.search-btn-wrapper {
  padding-inline: 8px;
  flex: 0 0 125px;
  max-width: 125px;
}

.research_search_btn {
  background: var(--e-global-color-primary);
  border: none;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.3s;
  padding: 15px 20px;
  width: 100%;
  font-weight: 500;
}

.research_search_btn:hover {
  background: var(--e-global-color-primary);
}

/* =========================
   ALPHABET FILTER
========================= */

.research-alphabet-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 50px;
}

.research-alphabet-filter span {
  min-width: 34px;
  text-align: center;
  background: none;
  border: none;
  padding: 5px 10px;
  font-size: 18px;
  font-weight: 500;
  color: var(--e-global-color-text);
  cursor: pointer;
  border: 1px solid transparent;
  /* transition:.3s;
	line-height:1; */
  line-height: 1.2;
}

.research-alphabet-filter span.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.research-alphabet-filter span:not(.disabled):hover {
  color: #000;
  border: 1px solid var(--e-global-color-primary);
  border-radius: 4px;
}

.research-alphabet-filter span.active {
  border: 1px solid var(--e-global-color-primary);
  color: var(--titleColor);
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--e-global-color-primary);
}

/* =========================
   RESULTS GRID
========================= */

.research-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* =========================
   ITEM
========================= */

.research-item {
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0px 4px 30px 0px rgba(0, 0, 0, 0.06);
}

.research-item h3 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}

.research-item h3 a {
  text-decoration: none;
}

.research-item > a.read-more-link:hover {
  color: var(--e-global-color-secondary);
}

.research-excerpt {
  font-size: 16px;
  line-height: 1.8;
  color: #4c4c4c;
  margin-bottom: 15px;
}

/* =========================
   READ MORE
========================= */

.research-item .read-more-link {
  color: var(--e-global-color-primary);
  text-decoration: underline !important;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  transition: 0.3s ease;
}

.research-item .read-more-link svg {
  transition: all 0.3s ease;
}

.research-item .read-more-link:hover {
  color: var(--e-global-color-secondary);
}

.research-item .read-more-link:hover svg {
  color: var(--e-global-color-secondary);
  transform: rotate(90deg);
}

/* =========================
   LOADING
========================= */

#research-results.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* =========================
   SELECT2 DROPDOWN
========================= */

.select2-dropdown {
  border: 1px solid #ddd;
  border-radius: 6px;
}

.select2-results__options {
  padding: 10px;
}

.select2-container--open .select2-dropdown--below {
  border-color: var(--primaryColor) !important;
}

.select2-results__option {
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
  padding: 0 20px 0 0 !important;
}

.select2-results__options li:not(:last-of-type) {
  margin-bottom: 12px;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--highlighted[aria-selected] {
  color: var(--e-global-color-primary);
  background-color: transparent;
}

.select2-container--default .select2-results__option,
.select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: transparent;
}

.select2-container--default .select2-results__option--selected {
  background-image: url("/wp-content/themes/univet-child/elementor-widgets/research-database-filter/images/check.svg");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 20px 20px;
  padding-right: 40px;
}

.research-excerpt {
    line-height: 1.7;
}

.research-excerpt .excerpt-content {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.research-excerpt .research-toggle-btn {
    display: inline-block;
    color: var(--e-global-color-primary);
    cursor: pointer;
}

.research-excerpt .research-toggle-btn:hover {
    color: var(--e-global-color-secondary);
}

.research-excerpt.expanded .excerpt-content {
    display: block;
    -webkit-line-clamp: unset;
}

.research-toggle-btn.hidden {
    display: none;
}


/* show more show less css end */

/* =========================
   TABLET
========================= */

@media (max-width: 1024px) {
  .research-top-filters .search-field-wrapper {
    flex: 0 0 33.33%;
    max-width: 33.33%;
  }

  .research-top-filters .custom-select-wrapper {
    flex: 0 0 33.33%;
    max-width: 33.33%;
  }

  .research-item h3 {
    font-size: 24px;
  }

  .research-excerpt {
    font-size: 16px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767px) {
  .research-top-filters .search-field-wrapper {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .research-top-filters .custom-select-wrapper {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .search-btn-wrapper {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .research-top-filters .select2-container--default .select2-selection--multiple,
  .research-top-filters .select2-container--default .select2-selection--single {
    padding: 10px 20px 10px 15px;
  }

  .research-top-filters .search-field-wrapper .search-icon,
  .research-top-filters .search-field-wrapper .search-icon svg {
    width: 15px;
  }

  .research_keyword,
  .research_keyword::placeholder {
    font-size: 14px;
  }

  .select2-container--default .more-count {
    font-size: 14px;
  }

  .research_keyword {
    padding: 0 20px 0 32px;
  }

  .research-top-filters .search-field-wrapper .search-icon {
    left: 18px;
  }

  .select2-container--default .select2-selection--multiple .select2-selection__clear {
    margin-right: 8px;
  }

  .select2-container--default .select2-selection--multiple .select2-selection__placeholder,
  .select2-container--default .select2-selection--single .select2-selection__placeholder {
    font-size: 14px;
  }

  .select2-container--default .select2-search--inline .select2-search__field::placeholder {
    font-size: 14px;
  }

  .select2-results__option {
    font-size: 14px;
  }

  .research_search_btn {
    font-size: 14px;
  }

  .research-alphabet-filter {
    gap: 10px;
    margin-bottom: 35px;
  }

  .research-alphabet-filter span {
    font-size: 16px;
  }

  .research-alphabet-filter span.active {
    padding: 8px 12px;
  }

  .research-item h3 {
    font-size: 24px;
  }

  .research-excerpt {
    font-size: 16px;
    line-height: 1.6;
  }

  .research-item > a {
    font-size: 16px;
  }

  .select2-container--default .select2-results__option--selected {
    background-size: 18px 18px;
    padding-right: 20px;
  }

  .select2-results__options {
    padding: 10px 10px 10px 15px !important;
  }
}
