/**
 * WP 锚文本工具 - 编辑器样式
 * 
 * @package WP_Anchor_Tool
 * @since 1.0.0
 */

/* ============================================
   编辑器样式
   ============================================ */

/* 链接工具栏弹窗样式 */
.wp-anchor-tool-link-popover {
    z-index: 100000;
}

.wp-anchor-tool-link-popover .components-popover__content {
    min-width: 300px;
    max-width: 400px;
}

/* 相关阅读块样式 */
.wp-anchor-tool-related-posts {
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    margin: 10px 0;
    background: #fff;
    min-height: 60px;
}

/* 搜索结果样式 */
.wp-anchor-tool-related-posts .search-results {
    margin-top: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.wp-anchor-tool-related-posts .search-results ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.wp-anchor-tool-related-posts .search-results li {
    margin: 5px 0;
    padding: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.wp-anchor-tool-related-posts .search-results li:last-child {
    border-bottom: none;
}

/* 相关阅读块预览样式 */
.wp-anchor-tool-related-posts .related-posts-preview {
    padding: 10px;
}

.wp-anchor-tool-related-posts .related-posts-preview h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.wp-anchor-tool-related-posts .related-posts-preview ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-anchor-tool-related-posts .related-posts-preview li {
    margin: 8px 0;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #0073aa;
    transition: background 0.3s ease;
}

.wp-anchor-tool-related-posts .related-posts-preview li:hover {
    background: #f0f0f0;
}

.wp-anchor-tool-related-posts .related-posts-preview li a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    display: block;
    transition: color 0.3s ease;
}

.wp-anchor-tool-related-posts .related-posts-preview li a:hover {
    color: #0073aa;
}

/* ============================================
   前端显示样式
   ============================================ */

/* 锚文本链接样式 */
.wp-anchor-tool-link {
    text-decoration: underline;
    color: #0073aa;
    transition: color 0.3s ease;
}

.wp-anchor-tool-link:hover {
    color: #005177;
    text-decoration: underline;
}

/* 相关阅读块前端样式 */
.wp-anchor-tool-related-posts {
    margin: 30px 0;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wp-anchor-tool-related-posts .related-posts-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.wp-anchor-tool-related-posts .related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-anchor-tool-related-posts .related-posts-list li {
    margin: 12px 0;
    padding: 12px 15px;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.wp-anchor-tool-related-posts .related-posts-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    background: #fafafa;
}

.wp-anchor-tool-related-posts .related-posts-list li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    display: block;
    transition: color 0.3s ease;
    line-height: 1.5;
}

.wp-anchor-tool-related-posts .related-posts-list li a:hover {
    color: #0073aa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wp-anchor-tool-related-posts {
        padding: 20px;
        margin: 20px 0;
    }
    
    .wp-anchor-tool-related-posts .related-posts-title {
        font-size: 20px;
    }
    
    .wp-anchor-tool-related-posts .related-posts-list li a {
        font-size: 15px;
    }
}

/* 加载状态 */
.wp-anchor-tool-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #666;
}

.wp-anchor-tool-loading .spinner {
    margin-right: 10px;
}

