/* WordPress Internal Links Frontend Styles */

/* 内链关键词样式 */
.wpi-internal-link {
    color: #0073aa !important;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: color 0.3s ease;
    position: relative;
    padding-right: 16px;
    padding-top: 2px;
    background: transparent !important;
}

.wpi-internal-link:hover {
    color: #005a87 !important;
    text-decoration: none !important;
}

.wpi-internal-link:visited {
    color: #0073aa !important;
}

/* 放大镜图标 - 使用SVG图标，距离文字更近 */
.wpi-internal-link::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 12px;
    height: 14px;
    background-image: url('../iconHighlight.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    filter: hue-rotate(200deg) saturate(1.5);
}

.wpi-internal-link:hover::after {
    opacity: 1;
}

/* 移除之前的手柄样式 */
.wpi-internal-link::before {
    display: none;
}

/* 针对不同链接类型的样式 */
.wpi-internal-link[data-wpi-url*="?s="]::after {
    filter: hue-rotate(200deg) saturate(1.5); /* 搜索页面 - 蓝色 */
}

.wpi-internal-link[data-wpi-url*="/tag/"]::after {
    filter: hue-rotate(120deg) saturate(1.5); /* 标签页面 - 绿色 */
}

.wpi-internal-link[data-wpi-url*="custom"]::after {
    filter: hue-rotate(280deg) saturate(1.5); /* 自定义链接 - 紫色 */
}

/* 确保在标题中的链接也保持样式 */
h1 .wpi-internal-link,
h2 .wpi-internal-link,
h3 .wpi-internal-link,
h4 .wpi-internal-link,
h5 .wpi-internal-link,
h6 .wpi-internal-link {
    color: #0073aa !important;
    border-bottom: none !important;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .wpi-internal-link::after {
        width: 10px;
        height: 12px;
        right: 0;
        top: 1px;
    }
    
    .wpi-internal-link {
        padding-right: 14px;
        padding-top: 1px;
    }
} 