/* 日期筛选组件样式 */
.date-filter-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-filter-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    min-width: 200px;
    justify-content: space-between;
}

.date-filter-trigger:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.date-filter-trigger.active {
    border-color: #007bff;
    background: #f8f9ff;
}

.date-filter-icon {
    font-size: 16px;
    color: #666;
}

.date-filter-text {
    flex: 1;
    text-align: left;
}

.date-filter-arrow {
    font-size: 12px;
    color: #999;
    transition: transform 0.2s ease;
}

.date-filter-trigger.active .date-filter-arrow {
    transform: rotate(180deg);
}

.date-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 16px;
    margin-top: 4px;
    display: none;
}

.date-filter-dropdown.show {
    display: block;
}

.date-filter-content {
    display: flex;
    gap: 16px;
    background: white; /* 确保整个内容区域背景为白色 */
    border-radius: 6px; /* 添加圆角 */
    padding: 0; /* 移除内边距，由子元素控制 */
}

.date-range-section {
    flex: 1;
    min-width: 200px;
    background: white; /* 确保自定义日期区域背景为白色 */
    padding: 12px; /* 添加内边距 */
    border-radius: 6px 0 0 6px; /* 左侧圆角 */
    border-right: 1px solid #f0f0f0; /* 添加分隔线 */
}

.date-range-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input-row label {
    font-size: 12px;
    color: #666;
    min-width: 40px;
}

.date-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.date-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.quick-dates-section {
    flex: 1;
    min-width: 150px;
    background: white; /* 确保快速选择区域有白色背景 */
    padding: 12px; /* 添加内边距与左侧保持一致 */
    border-radius: 0 6px 6px 0; /* 右侧圆角 */
}

.quick-dates-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: white; /* 确保标题背景为白色 */
}

.quick-dates-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: white; /* 确保列表背景为白色 */
    padding: 0;
    margin: 0;
}

.quick-date-item {
    padding: 8px 12px;
    border: none;
    background: white !important; /* 强制设置白色背景 */
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    transition: all 0.2s ease;
    margin: 0; /* 移除外边距 */
}

.quick-date-item:hover {
    background: #f5f5f5 !important; /* 添加 !important 确保优先级 */
}

.quick-date-item.active {
    background: #007bff !important; /* 添加 !important 确保优先级 */
    color: white;
}

.date-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.date-filter-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.date-filter-btn:hover {
    background: #f5f5f5;
}

.date-filter-btn.primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.date-filter-btn.primary:hover {
    background: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .date-filter-dropdown {
        left: -50px;
        right: -50px;
    }
    
    .date-filter-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .date-range-section,
    .quick-dates-section {
        min-width: auto;
    }
}

/* 调整分类搜索输入框宽度 */
.category-search-group {
    flex: 0.8;
    min-width: 150px;
}

.category-select-group {
    flex: 1;
    min-width: 180px;
}

/* 日期筛选组件在筛选行中的布局 */
.filter-group.date-filter-wrapper {
    min-width: 200px;
}

.filter-group.date-filter-wrapper label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

