/**
 * 搜索功能样式
 */

/* 搜索结果容器 */
.search-results-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.search-query-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* 搜索结果区域 */
.web-pages-section,
.read-results-section {
    margin-top: 15px;
}

.web-pages-section h3,
.read-results-section h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid #4CAF50;
}

/* 搜索结果项 */
.search-result-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.search-result-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.result-title {
    font-size: 16px;
    font-weight: bold;
    color: #1a0dab;
    text-decoration: none;
    flex: 1;
}

.result-title:hover {
    text-decoration: underline;
}

.result-site {
    font-size: 12px;
    color: #20c20e;
    background: rgba(32, 194, 14, 0.1);
    padding: 2px 8px;
    border-radius: 3px;
}

.result-url {
    font-size: 12px;
    color: #006621;
    margin-bottom: 8px;
    word-break: break-all;
}

.result-snippet {
    font-size: 14px;
    color: #545454;
    line-height: 1.6;
    margin-bottom: 8px;
}

.result-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #70757a;
}

.result-date,
.result-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.result-score {
    color: #ff9800;
    font-weight: bold;
}

/* 阅读结果项 */
.read-result-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.read-result-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.read-result-url {
    font-size: 12px;
    color: #006621;
    margin-bottom: 8px;
    word-break: break-all;
}

.read-result-url a {
    color: #1a0dab;
    text-decoration: none;
}

.read-result-url a:hover {
    text-decoration: underline;
}

.read-result-description,
.read-result-keywords {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.read-result-keywords {
    font-style: italic;
}

.read-result-content {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.read-result-content summary {
    cursor: pointer;
    color: #1a0dab;
    font-weight: 500;
    padding: 5px 0;
}

.read-result-content summary:hover {
    color: #0056b3;
}

.content-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 错误提示 */
.search-error {
    padding: 15px;
    background: #ffebee;
    color: #c62828;
    border-radius: 6px;
    border-left: 4px solid #c62828;
    font-weight: bold;
}

/* 加载更多按钮 */
.search-load-more {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-load-more:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-results-container {
        padding: 15px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-site {
        align-self: flex-start;
    }
    
    .result-meta {
        flex-direction: column;
        gap: 5px;
    }
}
