.accordion.search-modal {
  --bs-accordion-active-bg: var(--bs-info);
  --bs-accordion-btn-bg: var(--bs-secondary-border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.accordion.search-modal .accordion-header {
  border-bottom: 1px solid var(--bs-gray-600);
}

.accordion.search-modal .accordion-button {
  font-size: 1.2rem;
  color: var(--bs-gray-800);
  background-color: var(--bs-secondary-border-subtle);
  background-color: color-mix(in srgb, var(--bs-info) 70%, var(--bs-gray-800));
}

.accordion.search-modal .accordion-button.active {
  background-color: var(--bs-info);
}

.accordion.search-modal .accordion-item {
  flex: 1 1 auto;
}

.accordion.search-modal .accordion-item.active {
  height: 100%;
}

.accordion.search-modal .accordion-item.inactive {
  display: none;
}

.accordion.search-modal .accordion-collapse.show {
  height: calc(100% - 55px);
}

.accordion.search-modal .accordion-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.advanced-search-content-header, .advanced-search-buttons, .result-content-header, .draggable-modal-form-buttons {
  flex: 0 0 auto;
}

.advanced-search-content-scrollable-body {
  flex: 1 1 auto;
  max-height: calc(85vh - 265px - 1rem);
  overflow-y: auto;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.advanced-search-content-scrollable-body.without-header {
  max-height: calc(85vh - 193px);
  margin-top: 0;
}

.advanced-search-buttons, .draggable-modal-form-buttons {
  gap: 0.5rem;
}

.advanced-search-content-header.hstack {
  margin-top: 0.5rem;
  border-bottom: 1px solid var(--bs-gray-600);
  justify-content: space-between;
  width: 100%;
  align-self: flex-start;
}

.advanced-search-toggle-elements, .advanced-search-result-toggle-elements {
  flex-wrap: wrap;

  .btn-outline-dark {
    --bs-btn-hover-color: var(--bs-gray-500);
    --bs-btn-hover-bg: var(--bs-white);
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-gray-600);
    --bs-btn-active-border-color: var(--bs-gray-600);
    --bs-btn-hover-border-color: var(--bs-gray-600);
    --bs-btn-padding-x: 1.5rem;
    --bs-btn-padding-y: 0;
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .btn-outline-dark.no-result {
    --bs-btn-color: var(--bs-gray-400);
  }

  .btn-check:checked + .btn,
  :not(.btn-check) + .btn:active,
  .btn:first-child:active,
  .btn.active, .btn.show {
    --bs-btn-active-bg: var(--bs-info);
    --bs-btn-active-color: var(--bs-primary);
    --bs-btn-hover-color: var(--bs-gray-500);
  }

  .btn-check + .btn:hover, :not(.btn-check) + btn:hover {
    color: var(--bs-gray-600);
  }

  i {
    font-size: 2.2em;
  }

  i.icon-research_plan {
    font-size: 1.6em;
    padding: 6px 0 5px 0;
    display: inline-block;
  }

  i.icon_generic_nav {
    font-size: 1.8em;
    padding: 10px 0 8px 0;
  }
}

.advanced-detail-switch {
  height: 0;
  width: 0;
  visibility: hidden;
}

.advanced-detail-switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 115px;
  height: 30px;
  position: relative;
  padding: 0 34px 0 17px;
  color: var(--bs-primary);
  background-color: var(--bs-info);
  border-radius: 100px;
}

.advanced-detail-switch-label:hover {
  background-color: var(--bs-gray-400);
}

.advanced-detail-switch-label.active {
  padding: 0 17px 0 36px;
}

.advanced-detail-switch-label .advanced-detail-switch-button {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 26px;
  transition: right 2s;
  background: var(--bs-white);
  box-shadow: 0 0 2px 0 var(--bs-gray-200);
}

.advanced-detail-switch-label.active .advanced-detail-switch-button {
  right: calc(115px - 28px);
}

.advanced-search-row {
  display: flex;
  overflow: visible !important;
  margin-left: 10px;

  .field-select {
    margin: 5px;
    flex: 0 0 205px;
  }

  .link-select-spacer {
    width: 100%;
    display: none;

    &.visible {
      display: table;
    }
  }

  .link-select {
    margin: 5px;
    flex: 0 0 127px;
  }

  .match-select {
    margin: 5px;
    flex: 0 0 150px;
  }

  .value-field-select {
    margin: 5px;
    flex: 0 0 205px;

    .ant-select {
      width: 100%;
      height: 38px;
    }
  }

  .value-select {
    margin: 5px;
  }
}

.detail-search-element-tabs.nav-tabs.nav {
  --bs-nav-link-color: var(--bs-navbar-color);
  --bs-nav-link-hover-color: var(--bs-primary);
  --bs-nav-tabs-link-active-color: var(--bs-primary);
  --bs-nav-tabs-border-color: var(--bs-gray-600);
  --bs-nav-tabs-link-active-border-color: var(--bs-gray-600);
  --bs-nav-tabs-link-hover-border-color: none;
  margin-bottom: 1rem;
}

.detail-search-element-tabs.nav-tabs .nav-link.active {
  border-bottom: var(--bs-nav-tabs-border-width) solid white;
}

.detail-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 1.25rem;
}

.detail-search-form > div {
  width: calc(50% - 1rem);
}

.detail-search-form > div.sub-group-with-addon-2col {
  width: 100%;
}

@media (min-width: 992px) {
  .detail-search-form > div {
    width: calc(25% - 1rem);
  }
  .detail-search-form > div.sub-group-with-addon-2col {
    width: calc(50% - 1rem);
  }
}

.detail-search-headline, .detail-search-segment-headline {
  flex-basis: 100%;
  font-weight: 700;
  font-size: 1.15em;
  color: var(--bs-black);
  border-bottom: 1px solid var(--bs-gray-600);
  padding-bottom: 3px;
}

.detail-search-headline {
  background-color: var(--bs-gray-200);
  padding: 0.25rem;
  padding-left: 10px;
  border-top: 1px solid var(--bs-gray-400);
  border-bottom: 1px solid var(--bs-gray-400);
}

.detail-search-headline + .detail-search-headline {
  background-color: transparent;
  border-top: none;
  padding: 0;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--bs-gray-600);
}

.detail-search-content {
  .subfields-with-addon-left-3 {
    width: calc(33% - 1rem);
  }

  .subfields-with-addon-left-2 {
    width: calc(50% - 1rem);
  }

  .grouped-sub-fields {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .ant-select {
    width: 100%;
    height: 38px;
  }

  hr.content-spacer {
    border-top: 1px solid var(--bs-gray-800);
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    flex-basis: 100%;
  }

  .form-control {
    height: 38px;
  }

  .form-control.error {
    border-color: var(--bs-form-invalid-border-color);
  }
}

.search-info-button {
  margin-left: 0.5rem;
}

.no-selected-search {
  padding: 1rem;
}

.search-spinner {
  color: var(--bs-gray-400);
  position: absolute;
  top: 0;
  left: 50%;
}

.ketcher-buttons {
  flex: 0 0 auto;
  display: flex;
  gap: 3.5rem;
  align-items: center;
  margin-top: 1.5rem;
}

.result-error-message {
  margin-top: 1rem;
}
