/**
 * 自定义搜索样式
 * Custom Search Styles
 * 
 * 功能 (Features):
 * - 优化搜索结果显示 (Optimize search results display)
 * - 增强搜索高亮效果 (Enhance search highlighting)
 * - 改善无结果提示样式 (Improve no-results message styling)
 * 
 * 需求 (Requirements): 6.2, 6.5
 */

/* 搜索结果高亮样式 (Search result highlighting) */
.md-search-result mark {
    background-color: #ffeb3b;
    color: #000;
    padding: 0.1em 0.2em;
    border-radius: 2px;
    font-weight: 500;
}

/* 暗色模式下的搜索高亮 (Dark mode search highlighting) */
[data-md-color-scheme="slate"] .md-search-result mark {
    background-color: #ffd54f;
    color: #000;
}

/* 自定义无结果内容样式 (Custom no-results content styling) */
.custom-no-results {
    animation: fadeIn 0.3s ease-in;
}

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

/* 搜索建议列表样式 (Search suggestions list styling) */
.custom-no-results ul {
    list-style-type: disc;
    color: var(--md-default-fg-color--light);
}

.custom-no-results ul li {
    margin-bottom: 0.3rem;
    line-height: 1.6;
}

/* 热门搜索和分类链接悬停效果 (Popular searches and category links hover effect) */
.custom-no-results a {
    transition: all 0.2s ease;
}

.custom-no-results a:hover {
    color: var(--md-accent-fg-color) !important;
}

/* 搜索结果项间距优化 (Search result item spacing optimization) */
.md-search-result__item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-search-result__item:last-child {
    border-bottom: none;
}

/* 搜索结果标题样式 (Search result title styling) */
.md-search-result__title {
    font-weight: 600;
    color: var(--md-primary-fg-color);
}

/* 搜索结果摘要样式 (Search result excerpt styling) */
.md-search-result__teaser {
    color: var(--md-default-fg-color--light);
    line-height: 1.6;
    margin-top: 0.3rem;
}

/* 搜索输入框焦点样式 (Search input focus styling) */
.md-search__input:focus {
    border-color: var(--md-primary-fg-color);
    box-shadow: 0 0 0 2px rgba(var(--md-primary-fg-color--rgb), 0.1);
}

/* 搜索结果计数样式 (Search result count styling) */
.md-search-result__meta {
    font-size: 0.9rem;
    color: var(--md-default-fg-color--light);
    padding: 0.5rem 1rem;
    background-color: var(--md-default-bg-color);
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* 响应式设计 - 移动设备 (Responsive design - mobile) */
@media screen and (max-width: 76.1875em) {
    .custom-no-results {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .custom-no-results h3 {
        font-size: 1rem;
    }
    
    .custom-no-results h4 {
        font-size: 0.9rem;
    }
}
