/* Element Plus - Dark Theme Overrides */

/* 基础变量覆盖 */
html.dark {
  --el-bg-color: #171922;
  --el-bg-color-overlay: #171922;
  --el-text-color-primary: #ffffff;
  --el-text-color-regular: #a1a1aa;
  --el-border-color: #2a2c36;
  --el-border-color-light: #2a2c36;
  --el-fill-color-blank: #171922;
  --el-color-primary: #ff9500;
}

/* el-select 统一样式 */
html.dark .el-select {
  --el-select-input-focus-border-color: #ff9500;
}

html.dark .el-select .el-input__wrapper,
html.dark .el-select .el-select__wrapper {
  background-color: #1a1c25 !important;
  border: 1px solid #2a2c36;
  border-radius: 8px;
  transition: all 0.2s ease;
  padding: 2px 11px;
  min-height: 42px;
  box-shadow: none !important;
}

html.dark .el-select:hover .el-input__wrapper,
html.dark .el-select:hover .el-select__wrapper {
  background-color: #1a1c25 !important;
  border-color: #ff9500;
}

html.dark .el-select .el-input__wrapper.is-focus,
html.dark .el-select .el-select__wrapper.is-focus {
  border-color: #ff9500;
}

html.dark .el-select .el-input__inner {
  color: #ffffff;
  line-height: 1.5;
}

html.dark .el-select .el-input__inner::placeholder {
  color: #6b7280;
}

/* 下拉箭头 */
html.dark .el-select .el-input__suffix .el-select__caret {
  color: #71717a;
  transition: transform 0.3s;
}

html.dark .el-select .el-input__suffix .el-select__caret.is-reverse {
  transform: rotate(180deg);
}

/* 下拉菜单 */
.el-select-dropdown.el-popper,
html.dark .el-select-dropdown {
  background-color: #1a1c25 !important;
  border: 1px solid #2a2c36 !important;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

html.dark .el-select-dropdown__list {
  background-color: #1a1c25 !important;
}

html.dark .el-select-dropdown__item {
  color: #ffffff !important;
  padding: 8px 12px;
  transition: all 0.2s;
}

html.dark .el-select-dropdown__item:hover,
html.dark .el-select-dropdown__item.hover {
  background-color: #1a1c25 !important;
}

html.dark .el-select-dropdown__item.is-selected {
  color: #ff9500 !important;
  font-weight: 600;
  background-color: transparent;
}

html.dark .el-select-dropdown__item.is-selected::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: #ff9500;
  border-radius: 50%;
  margin-right: 8px;
}

html.dark .el-select-dropdown__empty {
  color: #71717a;
  padding: 20px 0;
}

/* 选中项文字居中 */
html.dark .el-select .el-select__wrapper {
  display: flex;
  align-items: center;
}

/* 多选标签 */
html.dark .el-select .el-tag {
  background-color: #2a2c36;
  border-color: transparent;
  color: #ffffff;
  border-radius: 4px;
}

/* el-checkbox 暗色主题 - 金黄色选中 */
html.dark .el-checkbox {
  --el-checkbox-checked-text-color: #ffb700;
  --el-checkbox-checked-bg-color: #ffb700;
  --el-checkbox-checked-border-color: #ffb700;
  --el-checkbox-input-border-color-hover: #ffb700;
}

html.dark .el-checkbox .el-checkbox__input.is-checked .el-checkbox__inner {
  background-color: #ffb700;
  border-color: #ffb700;
}

html.dark .el-checkbox .el-checkbox__input.is-checked .el-checkbox__inner::after {
  border-color: #1f2937;
}

html.dark .el-checkbox .el-checkbox__label {
  color: #e5e7eb;
}

html.dark .el-checkbox:hover .el-checkbox__inner {
  border-color: #ffb700;
}

/* popper 箭头 */
.el-popper.is-light,
html.dark .el-popper.is-light {
  background: #1a1c25 !important;
  border: 1px solid #2a2c36 !important;
}

.el-popper.is-light .el-popper__arrow::before,
html.dark .el-popper.is-light .el-popper__arrow::before {
  background: #1a1c25 !important;
  border-color: #2a2c36 !important;
}

/* el-pagination */
html.dark .el-pagination {
  --el-pagination-bg-color: #374151;
  --el-pagination-text-color: #ffffff;
  --el-pagination-button-disabled-bg-color: #1f2230;
}

html.dark .el-pagination .el-pager li {
  background-color: #374151;
  color: #ffffff;
}

html.dark .el-pagination .el-pager li:hover {
  color: #ff9500;
}

html.dark .el-pagination .el-pager li.is-active {
  background-color: #ff9500;
  color: #ffffff;
}

/* 自定义下拉菜单类 */
.dark-select-dropdown {
  background-color: #1a1c25 !important;
  border: 1px solid #2a2c36 !important;
}

.dark-select-dropdown .el-select-dropdown__item {
  color: #ffffff !important;
  background-color: transparent !important;
}

.dark-select-dropdown .el-select-dropdown__item:hover,
.dark-select-dropdown .el-select-dropdown__item.hover {
  background-color: #1a1c25 !important;
}

.dark-select-dropdown .el-select-dropdown__item.is-selected {
  color: #ff9500 !important;
  background-color: transparent !important;
}
