.ai-filter-date-value-input {
  display: inline-block;
  width: 200px;
  flex-shrink: 0;

  .ai-filter-date-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;

    .ai-filter-date-trigger {
      width: 100%;
      cursor: pointer;
      padding-right: 24px;

      input {
        cursor: pointer;
      }
    }

    .ai-filter-date-arrow {
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      color: #999;
      font-size: 12px;
      user-select: none;
      pointer-events: none;
    }
  }
}

// 下拉菜单包装器
.ai-filter-date-popup-wrapper {
  background-color: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

// 下拉菜单的卡片样式
.ai-filter-date-popup {
  padding: 4px 0;
  min-width: 175px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;

  // 自定义滚动条样式
  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
  }

  &::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 3px;

    &:hover {
      background: #bfbfbf;
    }
  }
}

.ai-filter-date-option {
  min-height: 36px;
  justify-content: center;
  align-items: center;
  display: flex;
  padding: 2px 12px;
  cursor: pointer;
  transition:
    background-color 0.2s,
    box-shadow 0.2s;
  font-size: 12px;
  color: #262626;
  line-height: 1.5;

  &:hover {
    color: var(--menu-color-hover, #284cc0);
    background-color: var(--menu-background-hover, #eef1f7);
    width: 100%;
  }

  &.ai-filter-date-option-selected {
    color: var(--menu-color-hover, #284cc0);
    background-color: var(--menu-background-hover, #eef1f7);
  }

  &.ai-filter-date-option-hovered {
    background-color: #f5f5f5;
  }

  .ai-filter-date-option-label {
    display: flex;
    gap: 4px;
    align-items: center;
    width: 100%;
  }

  // 动态选项（未来/过去 N 天）的 NumberPicker
  &.ai-filter-date-option-days {
    .ai-filter-date-number-picker-wrapper {
      .ai-filter-date-days-number-picker {
        width: 80px;
        margin-right: 4px;
        height: 28px;
      }
    }
  }

  // 日期范围选项样式
  &.ai-filter-date-option-range {
    cursor: default;
    padding: 8px 12px;

    .ai-filter-date-range-wrapper {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    // 日期区间 label 容器纵向排列，错误提示排在输入框下方
    .ai-filter-date-option-label {
      flex-direction: column;
      align-items: stretch;
    }

    .ai-filter-date-range-input-wrapper {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;

      > span {
        font-size: 12px;
        color: #666;
        flex-shrink: 0;
      }

      .ai-filter-date-range-separator {
        cursor: pointer;
        user-select: none;
        padding: 0 4px;
        transition: color 0.2s;

        &.ai-filter-date-range-separator-selected {
          color: #284cc0;
        }
      }

      .ai-filter-date-range-input {
        width: 150px;
        flex: 0 0 auto;
        min-width: 0;
      }
    }

    .ai-filter-date-range-error {
      margin-top: 4px;
      font-size: 11px;
      color: #f53f3f;
      line-height: 1.4;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 100%;
    }
  }

  // 固定日期选项的日期选择器（内联显示）
  &.ai-filter-date-fixed-date-option {
    cursor: default;

    .ai-filter-date-date-picker-inline {
      width: 100%;
      margin-top: 8px;
    }
  }
}

// 日期选择器侧边栏 - 显示在右侧
.ai-filter-date-date-picker-sidebar {
  border-left: 1px solid #e8e8e8;
  padding: 12px;
  min-width: 180px;
  background-color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: center;

  // 未来/过去天数的布局 - 同一行显示
  &.ai-filter-date-option-days {
    .ai-filter-date-option-label {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .ai-filter-date-number-picker-wrapper {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
    }
  }
}
