/*
 * BuddyPress Profile Layout
 */

.buddypress-wrap .repeater-separator:not(:last-child) {
  display: table-row !important;
}

.buddypress-wrap .repeater-separator td {
  padding: 0 0 24px !important;
  border-top: 1px solid var(--bb-content-border-color);
}

/*
 * BuddyPress Profile Edit Layout
 */

.buddypress-wrap .profile.edit .repeater_group_outer {
  padding: 0;
  background-color: var(--bb-content-background-color);
  border: none;
}

.buddypress-wrap .profile.edit .repeater_group_outer .repeater_tools {
  padding: 24px 0;
  margin: 0;
}

.buddypress-wrap
  .profile.edit
  .repeater_group_outer:first-child
  .repeater_tools {
  padding: 0 0 24px;
}

.repeater_group_inner {
  display: block !important;
  padding: 0;
  margin: 0;
}

.repeater_set_edit {
  display: none !important;
}

.buddypress-wrap .profile.edit .repeater_group_outer {
  border-bottom: solid 2px var(--bb-content-border-color);
  border-radius: 0;
}

.buddypress-wrap .profile.edit .repeater_group_outer {
  margin: 0;
}

.repeater_sets_sortable {
  margin-bottom: 24px;
}

.editfield legend {
  font-weight: 500 !important;
}

/*
* Dropdown and Text Field
*/

.dropdown-and-text-field__fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dropdown-and-text-field__fieldset {
  display: flex;
  gap: 14px;
}

.dropdown-and-text-field__fieldset .description {
  display: none;
}

.dropdown-and-text-field__fieldset:first-child .description {
  display: block;
}

.dropdown-and-text-field__select-and-textarea {
  display: flex;
  flex: 1;
  gap: 14px;
}

.dropdown-and-text-field__select-wrapper {
  flex: 1;
}

.dropdown-and-text-field__textarea-wrapper {
  max-width: 60%;
  width: 100%;
}

.dropdown-and-text-field__textarea {
  min-height: 100px;
  width: 100%;
  padding: 12px !important;
}

.dropdown-and-text-field__remove-button {
  height: auto !important;
  min-height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  line-height: 0 !important;
  color: var(--bb-alternate-text-color) !important;
}

.dropdown-and-text-field__actions {
  display: flex;
  margin-top: 24px;
}

.dropdown-and-text-field__add-button {
  width: 100% !important;
}

.dropdown-and-text-field__remove-button .dashicons-trash:before {
  font: normal normal normal 18px / 1 bb-icons;
  content: "\ef48";
}

@media (max-width: 768px) {
  .dropdown-and-text-field__select-and-textarea {
    flex-direction: column;
    padding-right: 24px;
    border-right: solid 2px var(--bb-content-border-color);
  }

  .dropdown-and-text-field__fieldset .description {
    display: block;
  }

  .dropdown-and-text-field__textarea-wrapper {
    max-width: 100%;
  }
}

/*
* Select2
*/

.xprofile .select2-container .select2-dropdown {
  padding: 16px 16px 0;
  box-sizing: content-box;
  max-width: unset;
}

.xprofile .select2-search--dropdown {
  padding: 0;
}

.xprofile .select2-container .select2-dropdown--above {
  transform: translate3d(-16px, 82px, 0);
}

.xprofile .select2-container .select2-dropdown--below {
  transform: translate3d(-16px, -34px, 0);
}

.xprofile .select2-container .select2-selection--single {
  height: 50px;
}

.xprofile
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  line-height: 48px;
  padding: 0 36px 0 12px;
}

.xprofile
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  width: 36px;
}

.xprofile
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 48px;
}

.xprofile .select2-search__field {
  height: 50px;
  padding: 4px 12px;
}

.xprofile .select2-results {
  margin: 8px -16px 0;
}

.xprofile .select2-container .select2-dropdown .select2-results__option {
  position: relative;
  padding: 10px 16px 10px 38px;
  border-radius: 0;
}

.xprofile
  .select2-container
  .select2-dropdown
  .select2-results__option:nth-child(odd) {
  background-color: var(--bb-body-background-color);
}

.xprofile
  .select2-container
  .select2-dropdown
  .select2-results__option:nth-child(even) {
  background-color: var(--bb-content-background-color);
}

.xprofile .select2-container .select2-dropdown .select2-results__option:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 16px;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  border: solid 1px var(--bb-alternate-text-color);
  border-radius: 50%;
}

.xprofile
  .select2-container
  .select2-dropdown
  .select2-results__option[aria-selected="true"]:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 18px;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  background-color: var(--bb-alternate-text-color);
  border-radius: 50%;
}

.xprofile
  .select2-container
  .select2-dropdown
  .select2-results__option.select2-results__option--highlighted {
  color: var(--bb-body-text-color);
  font-weight: 500;
}

.xprofile .select2-dropdown .select2-dropdown-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
  font-size: 14px;
}

.xprofile
  .select2-dropdown
  .select2-dropdown-footer
  .select2-dropdown-footer__top {
  font-size: 14px;
}

.xprofile
  .select2-dropdown
  .select2-dropdown-footer
  .select2-dropdown-footer__bottom {
  display: flex;
  flex-direction: column;
}

.xprofile
  .select2-dropdown
  .select2-dropdown-footer
  .select2-dropdown-footer__form {
  position: relative;
  display: flex;
  gap: 12px;
  width: 100%;
  margin: 0;
}

.xprofile .select2-dropdown .select2-dropdown-footer input {
  width: 100%;
}

.xprofile .select2-dropdown .select2-dropdown-footer button {
  padding: 10px 8px;
  border-color: transparent;
}

.xprofile .select2-dropdown .select2-dropdown-footer button:disabled {
  pointer-events: none;
}

.xprofile .select2-dropdown .select2-dropdown-footer button:not(:hover) {
  background: transparent;
}

.xprofile .select2-dropdown .select2-dropdown-footer button:focus {
  background: var(--bb-secondary-button-background-hover);
}

.xprofile .select2-dropdown .select2-dropdown-footer .loading-mask {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 1;
}

.xprofile .select2-dropdown .select2-dropdown-footer .loader {
  display: none;
  width: 24px;
  height: 24px;
  border: 3px solid var(--bb-alternate-text-color);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 0.7s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.xprofile .select2-dropdown .select2-dropdown-footer__error {
  margin-top: 12px;
  color: #cf2e2e;
}
