/* 增强筛选功能样式 */
.enhanced-filter {
    background-color: #fff;
    border: 1px solid #e6e6e6;
    margin-bottom: 15px;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

/* 筛选标签导航 */
.filter-tabs {
    background-color: #f8f8f8;
    border-bottom: 1px solid #e6e6e6;
}

.tab-nav {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tab-item {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-item:hover {
    background-color: #f0f0f0;
}

.tab-item.active {
    background-color: #fff;
    border-bottom: 2px solid #ff7700;
    color: #ff7700;
}

.tab-item span {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
}

.tab-item .arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #666;
    transition: transform 0.3s ease;
}

.tab-item.active .arrow {
    border-top: 4px solid #D40000;
    transform: rotate(180deg);
}

/* 筛选内容区域 */
.filter-content {
    padding: 15px;
}

.filter-panel {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-section {
    margin-bottom: 15px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding-left: 5px;
    border-left: 3px solid #ff7700;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-option {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background-color: #e6e6e6;
    border-color: #ccc;
    color: #333;
    text-decoration: none;
}

.filter-option.active {
    background-color: #ff9900;
    border-color: #ff9900;
    color: #fff;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .enhanced-filter {
        margin-bottom: 10px;
    }
    
    .tab-nav {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
    }
    
    .tab-item {
        flex: none;
        padding: 10px 15px;
        min-width: 80px;
        font-size: 13px;
    }
    
    .filter-options {
        gap: 8px;
    }
    
    .filter-option {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .filter-title {
        font-size: 13px;
    }
    
    .filter-content {
        padding: 10px;
    }
    
    .filter-section {
        margin-bottom: 12px;
    }
    
    .filter-results-summary {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .filter-reset {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* 移动端布局 */
.enhanced-filter.mobile-layout {
    position: relative;
}

.enhanced-filter.mobile-layout .filter-tabs {
   
    top: 0;
    z-index: 100;
    background-color: #f8f8f8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.enhanced-filter.mobile-layout .tab-nav {
   /* display: flex;*/
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.enhanced-filter.mobile-layout .filter-content {
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.enhanced-filter.mobile-layout .filter-panel {
    padding-bottom: 15px;
}

/* 小屏幕设备 */
@media (max-width: 480px) {
    .tab-item {
        padding: 8px 12px;
        min-width: 70px;
        font-size: 12px;
    }
    
    .filter-option {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .filter-title {
        font-size: 12px;
    }
    
    .filter-content {
        padding: 8px;
    }
    
    .filter-section {
        margin-bottom: 10px;
    }
}

/* 兼容原有样式 */
.filter-legacy {
    padding: 10px 0;
}

/* 高级筛选选项 */
.filter-advanced {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e6e6e6;
}

.filter-advanced-toggle {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-advanced-toggle:hover {
    background-color: #e6e6e6;
    border-color: #ccc;
}

.filter-advanced-content {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.filter-advanced-content.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

/* 筛选结果统计 */
.filter-results-summary {
    margin-top: 2px;
    padding: 8px 12px;
    background-color: #f0f7ff;
    border: 1px solid #d2e8fc;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
}

.filter-results-summary .count {
    font-weight: bold;
    color: #D40000;
}

/* 筛选重置按钮 */
.filter-reset {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-reset:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

/* 加载状态 */
.filter-loading {
    position: relative;
    min-height: 100px;
}

.filter-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8) url("../images/global/loading.gif") no-repeat center;
    background-size: 24px 24px;
    z-index: 10;
}