/* 
 * 搜索结果样式修复 - 改进版
 * 用于确保所有页面的搜索结果显示一致
 * 与首页、分类页和详情页的卡片样式保持一致
 */

/* 搜索结果工具卡片布局 */
body[data-search-mode="true"] .tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
}

/* 搜索图标大小修复 */
body[data-search-mode="true"] .search-icon {
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
    stroke-width: 1.5 !important;
    color: rgba(17, 24, 39, 1) !important;
}

/* 确保搜索结果与首页卡片样式一致 */
body[data-search-mode="true"] .tool-card {
    background-color: #fff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: none !important;
    transition: none !important;
    position: relative !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 294px !important;
    border: none !important;
}

/* 搜索卡片悬停效果与首页保持一致 */
body[data-search-mode="true"] .tool-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 搜索卡片图片样式 */
body[data-search-mode="true"] .tool-card__image {
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    min-height: 180px !important;
    height: 180px !important;
    border-radius: 8px !important;
    margin-bottom: 0 !important;
}

/* 搜索卡片图片内部样式 */
body[data-search-mode="true"] .tool-card__image img {
    position: relative !important;
    z-index: 10 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: transform 0.5s ease !important;
}

/* 搜索卡片悬停时图片缩放效果 */
body[data-search-mode="true"] .tool-card:hover .tool-card__image img {
    transform: scale(1.15) !important;
}

/* 搜索结果访问量显示 */
body[data-search-mode="true"] .tool-views-count {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    z-index: 20 !important;
    flex-direction: row-reverse !important;
}

/* 精选标签 */
body[data-search-mode="true"] .tool-card__featured {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background-color: rgba(165, 244, 103, 1) !important;
    color: rgba(17, 24, 39, 1) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    line-height: 20px !important;
    z-index: 20 !important;
}

/* 搜索卡片内容区域 */
body[data-search-mode="true"] .tool-card__content {
    padding: 12px 0 8px !important;
    position: relative !important;
    background-color: #FFFFFF !important;
    margin-top: 0 !important;
}

/* 搜索卡片标题 */
body[data-search-mode="true"] .tool-card__title {
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    color: #111827 !important;
    margin: 0 0 8px 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
}

/* 搜索卡片描述 */
body[data-search-mode="true"] .tool-card__description {
    font-size: 14px !important;
    line-height: 20px !important;
    color: #6B7280 !important;
    margin: 0 0 8px 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    max-height: 40px !important;
}

/* 搜索卡片底部区域 */
body[data-search-mode="true"] .tool-card__footer {
    padding: 0 0 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #FFFFFF !important;
    position: relative !important;
    margin-top: auto !important;
}

/* 搜索卡片标签容器 */
body[data-search-mode="true"] .tool-card__tags {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    max-width: 60% !important;
}

/* 搜索卡片标签 */
body[data-search-mode="true"] .tool-tag {
    background-color: #EEF2F7 !important;
    color: #303747 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 120px !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
}

/* 搜索卡片标签悬停效果 */
body[data-search-mode="true"] .tool-tag:hover {
    background-color: #111827 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
}

/* 搜索卡片访问按钮容器 */
body[data-search-mode="true"] .tool-card__actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* 搜索卡片访问按钮 */
body[data-search-mode="true"] .tool-card__visit {
    background-color: transparent !important;
    color: #111827 !important;
    border: 1px solid #C9C9C9 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    transition: all 0.2s ease !important;
}

/* 搜索卡片访问按钮悬停效果 */
body[data-search-mode="true"] .tool-card__visit:hover {
    background-color: rgba(165, 244, 103, 1) !important;
    border-color: rgba(165, 244, 103, 1) !important;
    color: #111827 !important;
}

/* 搜索卡片访问按钮图标 */
body[data-search-mode="true"] .tool-card__visit .arrow-icon {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 1.5 !important;
}

/* 无搜索结果提示样式 */
body[data-search-mode="true"] .no-results-simple {
    width: 100% !important;
    text-align: center !important;
    padding: 40px 20px !important;
    box-sizing: border-box !important;
}

body[data-search-mode="true"] .no-results-simple h2 {
    font-size: 20px !important;
    margin: 15px 0 !important;
    color: #333 !important;
}

body[data-search-mode="true"] .no-results-simple p {
    font-size: 16px !important;
    color: #666 !important;
    margin-bottom: 20px !important;
}

body[data-search-mode="true"] .no-results-icon {
    font-size: 48px !important;
    color: #ccc !important;
    margin-bottom: 15px !important;
}

/* 确保非移动端搜索结果卡片有适当的宽度 */
@media (min-width: 577px) {
    body[data-search-mode="true"] .tool-card {
        width: calc(25% - 18px) !important;
        max-width: 320px !important;
    }
    
    /* 在平板设备上显示三列 */
    @media (max-width: 992px) {
        body[data-search-mode="true"] .tool-card {
            width: calc(33.333% - 16px) !important;
        }
    }
    
    /* 在小平板设备上显示两列 */
    @media (max-width: 768px) {
        body[data-search-mode="true"] .tool-card {
            width: calc(50% - 12px) !important;
        }
    }
}

/* 移动端搜索结果样式 */
@media (max-width: 576px) {
    /* 移动端搜索容器 */
    body[data-search-mode="true"] .tools-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 16px !important;
    }
    
    /* 移动端搜索卡片 */
    body[data-search-mode="true"] .tool-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    body[data-search-mode="true"] .search-icon {
        font-size: 24px !important;
        width: 24px !important;
        height: 24px !important;
        stroke-width: 1.5 !important;
    }
} 