@use "@tencentcloud/uikit-base-component-react/dist/styles/theme/util" as *;

.SearchUserAdvanced {
  padding: 10px 20px;
  @include theme() {
    background-color: get(bg-color-operate);
  }
  display: flex;
  gap: 24px;
}

.SearchUserAdvanced__filter-row {
  position: relative;
}

.SearchUserAdvanced__filter-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
  transition: all 0.3s;
}

.SearchUserAdvanced__filter-label {
  @include theme() {
    color: get(text-color-secondary);
  }
  font-size: 14px;
}

.SearchUserAdvanced__filter-value {
  @include theme() {
    color: get(text-color-primary);
  }
  font-size: 14px;
  flex: 1;
}

.SearchUserAdvanced__arrow {
  font-size: 12px;
  @include theme() {
    color: get(text-color-disabled);
  }
  transition: transform 0.3s;
}

.SearchUserAdvanced__arrow--up {
  transform: rotate(180deg);
}

.SearchUserAdvanced__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  padding: 8px 0;
  @include theme() {
    background-color: get(bg-color-operate);
    box-shadow: 0 2px 6px 0 get(shadow-color), 0 8px 24px 0 get(shadow-color);
  }
  border-radius: 8px;
  z-index: 10;
  min-width: 68px;
}

.SearchUserAdvanced__option {
  line-height: 22px;
  padding: 5px 20px;
  @include theme() {
    color: get(text-color-primary);
  }
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;

  &:hover {
    @include theme() {
      background-color: get(list-color-focused);
      color: get(text-color-link);
    }
  }
}

.SearchUserAdvanced__age-inputs {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;

  span {
    @include theme() {
      color: get(text-color-secondary);
    }
    font-size: 14px;
  }
}

.SearchUserAdvanced__age-input {
  width: 48px;
  height: 32px;
  padding: 0 8px;
  @include theme() {
    border: 1px solid get(stroke-color-primary);
    background-color: get(bg-color-input);
    color: get(text-color-primary);
  }
  border-radius: 4px;
  outline: none;
  font-size: 14px;
  text-align: center;

  &:hover {
    @include light() {
      border-color: #f0f2f7;
    }
    @include dark() {
      border-color: #2b2c30;
    }
  }

  &:focus {
    @include theme() {
      border-color: get(text-color-link);
    }
  }

  &::placeholder {
    @include theme() {
      color: get(text-color-disabled);
    }
  }

  // 隐藏数字输入框的上下箭头
  &::-webkit-inner-spin-button,
  &::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  &[type=number] {
    -moz-appearance: textfield;
  }
}

.SearchUserAdvanced__confirm-button {
  margin-left: 8px;
  padding: 0 12px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: none;
  @include theme() {
    color: get(text-color-link);
  }
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;

  &:hover {
    @include theme() {
      color: get(button-color-primary-hover);
    }
  }

  &:active {
    @include theme() {
      color: get(button-color-primary-active);
    }
  }
}

.SearchUserAdvanced__action-sheet-mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  @include theme() {
    background: rgba(0, 0, 0, 0.4);
  }
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.SearchUserAdvanced__action-sheet-panel {
  width: 100%;
  @include theme() {
    background-color: get(bg-color-operate);
    box-shadow: 0 -2px 8px get(shadow-color);
  }
  border-radius: 12px 12px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  animation: SearchUserAdvanced-slideUp .2s;
}

@keyframes SearchUserAdvanced-slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.SearchUserAdvanced__action-sheet-option {
  padding: 16px 0;
  text-align: center;
  @include theme() {
    color: get(text-color-primary);
    border-bottom: 1px solid get(floating-color-operate);
  }
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s;

  &:hover {
    @include theme() {
      background-color: get(bg-color-bubble-own);
      color: get(text-color-link);
    }
  }
}

.SearchUserAdvanced__action-sheet-cancel {
  padding: 16px 0;
  text-align: center;
  font-size: 16px;
  border-radius: 0;
  @include theme() {
    border-top: 5px solid get(floating-color-operate);
    color: get(text-color-secondary);
  }
}

.SearchUserAdvanced__action-sheet-confirm {
  width: 100%;
  padding: 16px 0;
  @include theme() {
    background-color: get(text-color-link);
    color: get(text-color-primary);
  }
  border: none;
  font-size: 16px;
}

.SearchUserAdvanced__filter-row-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.SearchUserAdvanced__filter-icon {
  @include theme() {
    color: get(text-color-link);
  }
}

.SearchUserAdvanced__filter-text {
  @include theme() {
    color: get(text-color-secondary);
  }
  font-size: 14px;
}

.SearchUserAdvanced__age-inputs-sheet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 0 0;
}

.SearchUserAdvanced__filter-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  @include theme() {
    background: get(bg-color-default);
  }
}

.SearchUserAdvanced__filter-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}

.SearchUserAdvanced__back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.SearchUserAdvanced__header-title {
  flex: 1;
  text-align: center;
  padding-right: 40px;
  font-size: 17px;
  font-weight: 500;
  @include theme() {
    color: get(text-color-primary);
  }
}

.SearchUserAdvanced__filter-page-main {
  padding: 4px 16px 20px;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  @include theme() {
    background: get(bg-color-operate);
    box-shadow: 0 0 24 0 get(shadow-color);
  }
}

.SearchUserAdvanced__bottom-line {
  @include theme() {
    border-bottom: 1px solid get(shadow-color);
  }
}

.SearchUserAdvanced__filter-page-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
}

.SearchUserAdvanced__filter-page-label {
  font-size: 16px;
  @include theme() {
    color: get(text-color-primary);
  }
}

.SearchUserAdvanced__filter-page-value {
  display: flex;
  align-items: center;
  font-size: 16px;
  gap: 8px;
  @include theme() {
    color: get(text-color-secondary);
  }
}

.SearchUserAdvanced__filter-page-footer {
  width: 100%;
  padding-top: 40px;
}

.SearchUserAdvanced__filter-confirm-button {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  @include theme() {
    background: get(text-color-link);
    color: #fff;
  }
}
